diff options
Diffstat (limited to 'js/src/tests/ecma_7/TypedObject/arrayzerolen.js')
-rw-r--r-- | js/src/tests/ecma_7/TypedObject/arrayzerolen.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/src/tests/ecma_7/TypedObject/arrayzerolen.js b/js/src/tests/ecma_7/TypedObject/arrayzerolen.js new file mode 100644 index 000000000..c8cdf2f54 --- /dev/null +++ b/js/src/tests/ecma_7/TypedObject/arrayzerolen.js @@ -0,0 +1,17 @@ +// |reftest| skip-if(!this.hasOwnProperty("TypedObject")) +var BUGNUMBER = 926401; +var summary = 'TypedObjects ArrayType implementation'; + +// Test creation of zero-length array + +function runTest() { + var T = TypedObject; + var Color = new T.StructType({'r': T.uint8, 'g': T.uint8, 'b': T.uint8}); + var Rainbow = Color.array(0); + var theOneISawWasJustBlack = new Rainbow([]); + if (typeof reportCompare === "function") + reportCompare(true, true); + print("Tests complete"); +} + +runTest(); |