js/src/jit-test/tests/collections/Array-of-generic-2.js

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:61c5ff7ff47a
1 // Array.of passes the number of arguments to the constructor it calls.
2
3 var hits = 0;
4 function Herd(n) {
5 assertEq(arguments.length, 1);
6 assertEq(n, 5);
7 hits++;
8 }
9 Herd.of = Array.of;
10 Herd.of("sheep", "cattle", "elephants", "whales", "seals");
11 assertEq(hits, 1);

mercurial