fix test case for Function.call(), add test case for Function.apply()
git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4309 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
parent
ef41232ece
commit
74911f269e
|
@ -0,0 +1,5 @@
|
|||
function bar(y) { return y + 3; }
|
||||
|
||||
var p = bar;
|
||||
p.apply(null, [7]);
|
||||
|
|
@ -1 +1,5 @@
|
|||
(function foo(x) { return x; }).call(null, 3);
|
||||
function foo(x) { return x; }
|
||||
|
||||
var z = foo;
|
||||
z.call(null, 3);
|
||||
|
||||
|
|
|
@ -292,6 +292,12 @@ public abstract class TestSimpleCallGraphShape extends TestJSCallGraphShape {
|
|||
// TODO assert that foo() is reachable
|
||||
}
|
||||
|
||||
@Test public void testFunctionDotApply() throws IOException, IllegalArgumentException, CancelException {
|
||||
Util.makeScriptCG("tests", "function_apply.js");
|
||||
// TODO assert that bar() is reachable
|
||||
}
|
||||
|
||||
|
||||
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