diff options
Diffstat (limited to 'js/src/jit-test/tests/collections/Array-of-generic-2.js')
-rw-r--r-- | js/src/jit-test/tests/collections/Array-of-generic-2.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/collections/Array-of-generic-2.js b/js/src/jit-test/tests/collections/Array-of-generic-2.js new file mode 100644 index 000000000..203e58b00 --- /dev/null +++ b/js/src/jit-test/tests/collections/Array-of-generic-2.js @@ -0,0 +1,11 @@ +// Array.of passes the number of arguments to the constructor it calls. + +var hits = 0; +function Herd(n) { + assertEq(arguments.length, 1); + assertEq(n, 5); + hits++; +} +Herd.of = Array.of; +Herd.of("sheep", "cattle", "elephants", "whales", "seals"); +assertEq(hits, 1); |