strengthen checking of argument specialization test
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4533 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
9b2b4c6f51
commit
99564d6e06
|
@ -20,5 +20,9 @@ function z() {
|
||||||
print("z");
|
print("z");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function wrong() {
|
||||||
|
print("wrong");
|
||||||
|
}
|
||||||
|
|
||||||
a(x);
|
a(x);
|
||||||
a(y, z);
|
a(y, z, wrong);
|
||||||
|
|
|
@ -27,7 +27,7 @@ public abstract class TestArgumentSensitivity extends TestJSCallGraphShape {
|
||||||
"tests/args.js",
|
"tests/args.js",
|
||||||
new String[] { "tests/args.js/a" } },
|
new String[] { "tests/args.js/a" } },
|
||||||
new Object[] { "tests/args.js/a", new String[] { "tests/args.js/x"} },
|
new Object[] { "tests/args.js/a", new String[] { "tests/args.js/x"} },
|
||||||
new Object[] { "tests/args.js/a", new String[] { "tests/args.js/y", "tests/args.js/z" } } };
|
new Object[] { "tests/args.js/a", new String[] { "tests/args.js/y", "tests/args.js/z", "!tests/args.js/wrong" } } };
|
||||||
|
|
||||||
@Test public void testArgs() throws IOException, IllegalArgumentException, CancelException, ClassHierarchyException {
|
@Test public void testArgs() throws IOException, IllegalArgumentException, CancelException, ClassHierarchyException {
|
||||||
JavaScriptLoaderFactory loaders = JSCallGraphBuilderUtil.makeLoaders();
|
JavaScriptLoaderFactory loaders = JSCallGraphBuilderUtil.makeLoaders();
|
||||||
|
|
|
@ -135,8 +135,10 @@ public abstract class TestCallGraphShape extends WalaTestCase {
|
||||||
CallSiteReference sr = (CallSiteReference) sites.next();
|
CallSiteReference sr = (CallSiteReference) sites.next();
|
||||||
|
|
||||||
Iterator dsts = getNodes(CG, targetName).iterator();
|
Iterator dsts = getNodes(CG, targetName).iterator();
|
||||||
Assert.assertTrue("cannot find " + targetName, dsts.hasNext());
|
if (! checkAbsence) {
|
||||||
|
Assert.assertTrue("cannot find " + targetName, dsts.hasNext());
|
||||||
|
}
|
||||||
|
|
||||||
while (dsts.hasNext()) {
|
while (dsts.hasNext()) {
|
||||||
CGNode dst = (CGNode) dsts.next();
|
CGNode dst = (CGNode) dsts.next();
|
||||||
for (Iterator tos = CG.getPossibleTargets(src, sr).iterator(); tos.hasNext();) {
|
for (Iterator tos = CG.getPossibleTargets(src, sr).iterator(); tos.hasNext();) {
|
||||||
|
|
Loading…
Reference in New Issue