1 // check value of arguments inside recursion
3 var expected
= [null,99,1,2,3,3,2,1,99,null];
7 shouldBe("mf.arguments", "expected[expno++]");
9 shouldBe("mf.arguments[0]", "expected[expno++]");
13 shouldBe("mf.arguments[0]", "expected[expno++]");
17 shouldBe("mf.arguments", "expected[expno++]");
20 // check internal properties of arguments
26 var foundArgs
= false;
28 var ReadOnlyOK
= false;
29 var DontDeleteOK
= false;
30 var DontEnumOK
= false;
34 var newargs
= new Object();
35 f
.arguments
= newargs
;
36 ReadOnlyOK
= (f
.arguments
!= newargs
);
39 DontDeleteOK
= !delete(f
.arguments
);
40 if (f
.arguments
== undefined || !f
.hasOwnProperty("arguments"))
44 var foundArgs
= false;
49 DontEnumOK
= !foundArgs
;
52 shouldBeTrue("ReadOnlyOK");
53 shouldBeTrue("DontDeleteOK");
54 shouldBeTrue("DontEnumOK");
56 // Check that parameter variables are bound to the corresponding
57 // elements in the arguments array
67 function dupargs(x
,x
,x
)
72 arglength
= arguments
.length
;
74 newarg0
= arguments
[0];
75 newarg1
= arguments
[1];
76 newarg2
= arguments
[2];
86 shouldBe("arglength","3");
87 shouldBe("newarg0","1");
88 shouldBe("newarg1","2");
89 shouldBe("newarg2","999");
90 shouldBe("newx","888");