blob: 15f7eac828a2ddcbb619d797123f1155e8d78714 [file] [log] [blame]
Tests for Array.of
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS Array.of.length is 0
PASS Array.of.name is 'of'
PASS Array.of(1) is [1]
PASS Array.of(1, 2) is [1, 2]
PASS Array.of(1, 2, 3) is [1, 2, 3]
PASS Array.of() is []
PASS Array.of(undefined) is [undefined]
PASS Array.of('hello') is ['hello']
Construct nested Array with Array.of(Array.of(1, 2, 3), Array.of(4, 5, 6, 7, 8)).
PASS x.length is 2
PASS x[0].length is 3
PASS x[1].length is 5
Check that a setter isn't called.
PASS Array.of(1, 2, 3) did not throw exception.
PASS Array.of.call(Foo, 'a', 'b', 'c') instanceof Foo is true
PASS Array.of.call(Foo, 'a', 'b', 'c').givenLength is 3
PASS var foo = Array.of.call(Foo, 'a', 'b', 'c'); [foo.length, foo[0], foo[1], foo[2]] is [3, 'a', 'b', 'c']
PASS successfullyParsed is true
TEST COMPLETE