From 7e55e5453804f77cc249e0ffed93c9712536441e Mon Sep 17 00:00:00 2001 From: Leonardo Balter <leonardo.balter@gmail.com> Date: Mon, 20 Jun 2016 12:49:38 -0400 Subject: [PATCH] Update and add tests for Number.NEGATIVE_INFINITY --- .../Number/NEGATIVE_INFINITY/S15.7.3.5_A3.js | 21 ------------------- .../Number/NEGATIVE_INFINITY/S15.7.3.5_A4.js | 19 ----------------- .../Number/NEGATIVE_INFINITY/prop-desc.js | 19 +++++++++++++++++ .../Number/NEGATIVE_INFINITY/value.js | 16 ++++++++++++++ 4 files changed, 35 insertions(+), 40 deletions(-) delete mode 100644 test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A3.js delete mode 100644 test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A4.js create mode 100644 test/built-ins/Number/NEGATIVE_INFINITY/prop-desc.js create mode 100644 test/built-ins/Number/NEGATIVE_INFINITY/value.js diff --git a/test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A3.js b/test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A3.js deleted file mode 100644 index c0f9c501e4..0000000000 --- a/test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A3.js +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: Number.NEGATIVE_INFINITY is DontDelete -es5id: 15.7.3.5_A3 -description: Checking if deleting Number.NEGATIVE_INFINITY fails -includes: [propertyHelper.js] ----*/ - -verifyNotConfigurable(Number, "NEGATIVE_INFINITY"); - -// CHECK#1 -try { - if (delete Number.NEGATIVE_INFINITY !== false) { - $ERROR('#1: delete Number.NEGATIVE_INFINITY === false'); - } -} catch (e) { - if (e instanceof Test262Error) throw e; - assert(e instanceof TypeError); -} diff --git a/test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A4.js b/test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A4.js deleted file mode 100644 index af3f480e8f..0000000000 --- a/test/built-ins/Number/NEGATIVE_INFINITY/S15.7.3.5_A4.js +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: Number.NEGATIVE_INFINITY has the attribute DontEnum -es5id: 15.7.3.5_A4 -description: Checking if enumerating Number.NEGATIVE_INFINITY fails ----*/ - -//CHECK#1 -for(var x in Number) { - if(x === "NEGATIVE_INFINITY") { - $ERROR('#1: Number.NEGATIVE_INFINITY has the attribute DontEnum'); - } -} - -if (Number.propertyIsEnumerable('NEGATIVE_INFINITY')) { - $ERROR('#2: Number.NEGATIVE_INFINITY has the attribute DontEnum'); -} diff --git a/test/built-ins/Number/NEGATIVE_INFINITY/prop-desc.js b/test/built-ins/Number/NEGATIVE_INFINITY/prop-desc.js new file mode 100644 index 0000000000..d921a0537e --- /dev/null +++ b/test/built-ins/Number/NEGATIVE_INFINITY/prop-desc.js @@ -0,0 +1,19 @@ +// Copyright (C) 2016 The V8 Project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 20.1.2.11 +esid: sec-number.negative_infinity +description: > + "NEGATIVE_INFINITY" property of Number +info: > + Number.NEGATIVE_INFINITY + + This property has the attributes { [[Writable]]: false, [[Enumerable]]: false, + [[Configurable]]: false }. +includes: [propertyHelper.js] +---*/ + +verifyNotEnumerable(Number, "NEGATIVE_INFINITY"); +verifyNotWritable(Number, "NEGATIVE_INFINITY"); +verifyNotConfigurable(Number, "NEGATIVE_INFINITY"); diff --git a/test/built-ins/Number/NEGATIVE_INFINITY/value.js b/test/built-ins/Number/NEGATIVE_INFINITY/value.js new file mode 100644 index 0000000000..1b9275c4fe --- /dev/null +++ b/test/built-ins/Number/NEGATIVE_INFINITY/value.js @@ -0,0 +1,16 @@ +// Copyright (C) 2016 The V8 Project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +es6id: 20.1.2.11 +esid: sec-number.negative_infinity +description: > + The value of Number.NEGATIVE_INFINITY is -Infinity +info: > + Number.NEGATIVE_INFINITY + + The value of Number.NEGATIVE_INFINITY is -∞. +includes: [propertyHelper.js] +---*/ + +assert.sameValue(Number.NEGATIVE_INFINITY, -Infinity); -- GitLab