add an array test that doesn't quite work
This commit is contained in:
parent
5bcdb30014
commit
1bf2c64ba7
|
@ -2,9 +2,11 @@ var a = [];
|
|||
a[0] = function reachable() { print("reachable"); };
|
||||
a[1] = function also_reachable() { print("also reachable"); };
|
||||
a[2] = function reachable_too() { print("reachable, too"); };
|
||||
a["3"] = function reachable3() { print("reachable3"); };
|
||||
|
||||
var o = { toString: function() { return 2; } };
|
||||
|
||||
a["0"]();
|
||||
a[1.0]();
|
||||
a[o]();
|
||||
a[o]();
|
||||
a[3]();
|
|
@ -19,6 +19,7 @@ import junit.framework.Assert;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.ibm.wala.cast.ipa.callgraph.CAstCallGraphUtil;
|
||||
import com.ibm.wala.cast.js.ipa.callgraph.ForInContextSelector;
|
||||
import com.ibm.wala.cast.js.ipa.callgraph.JSCFABuilder;
|
||||
import com.ibm.wala.cast.js.ipa.callgraph.JSCallGraphUtil;
|
||||
|
@ -582,7 +583,8 @@ public abstract class TestSimpleCallGraphShape extends TestJSCallGraphShape {
|
|||
new Object[] { ROOT, new String[] { "tests/array_index_conv.js" } },
|
||||
new Object[] { "tests/array_index_conv.js", new String[] { "suffix:reachable",
|
||||
"suffix:also_reachable",
|
||||
"suffix:reachable_too" } }
|
||||
"suffix:reachable_too",
|
||||
"suffix:reachable3" } }
|
||||
};
|
||||
|
||||
@Test
|
||||
|
@ -608,6 +610,7 @@ public abstract class TestSimpleCallGraphShape extends TestJSCallGraphShape {
|
|||
verifyGraphAssertions(cg, assertionsForArrayIndexConv2);
|
||||
}
|
||||
|
||||
|
||||
protected IVector<Set<Pair<CGNode, Integer>>> computeIkIdToVns(PointerAnalysis pa) {
|
||||
|
||||
// Created by reversing the points to mapping for local pointer keys.
|
||||
|
|
Loading…
Reference in New Issue