diff options
Diffstat (limited to 'js/src/tests/non262/Tuple/from/this-null.js')
-rw-r--r-- | js/src/tests/non262/Tuple/from/this-null.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/src/tests/non262/Tuple/from/this-null.js b/js/src/tests/non262/Tuple/from/this-null.js new file mode 100644 index 0000000000..16f2bfe021 --- /dev/null +++ b/js/src/tests/non262/Tuple/from/this-null.js @@ -0,0 +1,14 @@ +// |reftest| skip-if(!this.hasOwnProperty("Tuple")) + +// this = null or undefined should not throw +var result = Tuple.from.call(null, #[]); + +assertEq(result, #[]); +result = Tuple.from.call(undefined, #[]); +assertEq(result, #[]); +result = Tuple.from.call({}, #[]); +assertEq(result, #[]); +result = Tuple.from.call(5, #[]); +assertEq(result, #[]); + +reportCompare(0, 0); |