diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Number/MAX_VALUE')
5 files changed, 62 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Number/MAX_VALUE/S15.7.3.2_A2.js b/js/src/tests/test262/built-ins/Number/MAX_VALUE/S15.7.3.2_A2.js new file mode 100644 index 0000000000..192f1b27f3 --- /dev/null +++ b/js/src/tests/test262/built-ins/Number/MAX_VALUE/S15.7.3.2_A2.js @@ -0,0 +1,18 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Number.MAX_VALUE is ReadOnly +es5id: 15.7.3.2_A2 +description: Checking if varying Number.MAX_VALUE fails +includes: [propertyHelper.js] +---*/ + +// CHECK#1 +var x = Number.MAX_VALUE; +verifyNotWritable(Number, "MAX_VALUE", null, 1); +if (Number.MAX_VALUE !== x) { + $ERROR('#1: x = Number.MAX_VALUE; Number.MAX_VALUE = 1; Number.MAX_VALUE === x'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/MAX_VALUE/S15.7.3.2_A3.js b/js/src/tests/test262/built-ins/Number/MAX_VALUE/S15.7.3.2_A3.js new file mode 100644 index 0000000000..5529b7a4b7 --- /dev/null +++ b/js/src/tests/test262/built-ins/Number/MAX_VALUE/S15.7.3.2_A3.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Number.MAX_VALUE is DontDelete +es5id: 15.7.3.2_A3 +description: Checking if deleting Number.MAX_VALUE fails +includes: [propertyHelper.js] +---*/ + +verifyNotConfigurable(Number, "MAX_VALUE"); + +// CHECK#1 +try { + if (delete Number.MAX_VALUE !== false) { + $ERROR('#1: delete Number.MAX_VALUE === false'); + } +} catch (e) { + if (e instanceof Test262Error) throw e; + assert(e instanceof TypeError); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/MAX_VALUE/S15.7.3.2_A4.js b/js/src/tests/test262/built-ins/Number/MAX_VALUE/S15.7.3.2_A4.js new file mode 100644 index 0000000000..39f499b4e8 --- /dev/null +++ b/js/src/tests/test262/built-ins/Number/MAX_VALUE/S15.7.3.2_A4.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +info: Number.MAX_VALUE has the attribute DontEnum +es5id: 15.7.3.2_A4 +description: Checking if enumerating Number.MAX_VALUE fails +---*/ + +//CHECK#1 +for (var x in Number) { + if (x === "MAX_VALUE") { + $ERROR('#1: Number.MAX_VALUE has the attribute DontEnum'); + } +} + +if (Number.propertyIsEnumerable('MAX_VALUE')) { + $ERROR('#2: Number.MAX_VALUE has the attribute DontEnum'); +} + +reportCompare(0, 0); diff --git a/js/src/tests/test262/built-ins/Number/MAX_VALUE/browser.js b/js/src/tests/test262/built-ins/Number/MAX_VALUE/browser.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/built-ins/Number/MAX_VALUE/browser.js diff --git a/js/src/tests/test262/built-ins/Number/MAX_VALUE/shell.js b/js/src/tests/test262/built-ins/Number/MAX_VALUE/shell.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/built-ins/Number/MAX_VALUE/shell.js |