diff options
Diffstat (limited to 'js/src/tests/ecma_7/TypedObject/simpleequiv.js')
-rw-r--r-- | js/src/tests/ecma_7/TypedObject/simpleequiv.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/js/src/tests/ecma_7/TypedObject/simpleequiv.js b/js/src/tests/ecma_7/TypedObject/simpleequiv.js new file mode 100644 index 000000000..144315262 --- /dev/null +++ b/js/src/tests/ecma_7/TypedObject/simpleequiv.js @@ -0,0 +1,25 @@ +// |reftest| skip-if(!this.hasOwnProperty("TypedObject")) +var BUGNUMBER = 922216; +var summary = 'TypedObjects Equivalent Numeric Types'; + +var T = TypedObject; + +function runTests() { + print(BUGNUMBER + ": " + summary); + + var simpleTypes = [ + T.int8, T.int16, T.int32, + T.uint8, T.uint16, T.uint32, + T.float32, T.float64, + T.Object, T.Any, T.string + ]; + + for (var i = 0; i < simpleTypes.length; i++) + for (var j = 0; j < simpleTypes.length; j++) + assertEq(i == j, simpleTypes[i].equivalent(simpleTypes[j])); + + reportCompare(true, true); + print("Tests complete"); +} + +runTests(); |