diff options
Diffstat (limited to 'external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects')
116 files changed, 4064 insertions, 0 deletions
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.1_The_Number_Constructor_Called_as_a_Function/S15.7.1.1_A1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.1_The_Number_Constructor_Called_as_a_Function/S15.7.1.1_A1.js new file mode 100644 index 000000000..10da19f0a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.1_The_Number_Constructor_Called_as_a_Function/S15.7.1.1_A1.js @@ -0,0 +1,39 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.1.1_A1; + * @section: 15.7.1.1; + * @assertion: Number([value]) returns a number value (not a Number object) computed by ToNumber(value) if value was supplied; + * @description: Used values "10", 10, new String("10"), new Object(10) and "abc"; +*/ + +//CHECK#1 +if( typeof Number("10") !== "number" ) { + $ERROR('#1: typeof Number("10") should be "number", actual is "'+typeof Number("10")+'"'); +} + +//CHECK#2 +if( typeof Number(10) !== "number" ) { + $ERROR('#2: typeof Number(10) should be "number", actual is "'+typeof Number(10)+'"'); +} + +//CHECK#3 +if( typeof Number(new String("10")) !== "number" ) { + $ERROR('#3: typeof Number(new String("10")) should be "number", actual is "'+typeof Number(new String("10"))+'"'); +} + +//CHECK#4 +if( typeof Number(new Object(10)) !== "number" ) { + $ERROR('#4: typeof Number(new Object(10)) should be "number", actual is "'+typeof Number(new Object(10))+'"'); +} + +//CHECK #5 +if( typeof Number("abc") !== "number" ) { + $ERROR('#5: typeof Number("abc") should be "number", actual is "'+typeof Number("abc")+'"'); +} + +//CHECK #6 +if( !isNaN(Number("abc"))) { + $ERROR('#6: Number("abc")) should be NaN'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.1_The_Number_Constructor_Called_as_a_Function/S15.7.1.1_A2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.1_The_Number_Constructor_Called_as_a_Function/S15.7.1.1_A2.js new file mode 100644 index 000000000..77bd87a84 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.1_The_Number_Constructor_Called_as_a_Function/S15.7.1.1_A2.js @@ -0,0 +1,22 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.1.1_A2; + * @section: 15.7.1.1; + * @assertion: Number() returns +0; + * @description: Call Number() and check result; +*/ + +//CHECK#1 +if( typeof Number() !== "number" ) { + $ERROR('#1: typeof Number() should be "number", actual is "'+typeof Number()+'"'); +} + +//CHECK#2 +if( Number() !== 0 ) { + $ERROR('#2: Number() === 0, actual is '+Number()); +} else if( 1/Number() !== Number.POSITIVE_INFINITY ) { + $ERROR('#2: Number() === +0, actual is '+Number()); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.2_The_Number_Constructor/S15.7.2.1_A1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.2_The_Number_Constructor/S15.7.2.1_A1.js new file mode 100644 index 000000000..7bd549518 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.2_The_Number_Constructor/S15.7.2.1_A1.js @@ -0,0 +1,54 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.2.1_A1; + * @section: 15.7.2.1; + * @assertion: When Number is called as part of a new expression it is + * a constructor: it initialises the newly created object; + * @description: Checking type of the newly created object and it value; +*/ + +//CHECK#1 +if (typeof new Number() !== "object") { + $ERROR("#1: typeof new Number() === 'object'"); +} + +//CHECK#2 +if (new Number() === undefined) { + $ERROR("#2: new Number() should not be undefined"); +} + +//CHECK#3 +var x3 = new Number(); +if(typeof x3 !== "object"){ + $ERROR("#3: typeof new Number() === 'object'"); +} + +//CHECK#4 +var x4 = new Number(); +if(x4 === undefined){ + $ERROR("#4: new Number() should not be undefined"); +} + +//CHECK#5 +if (typeof new Number(10) !== "object") { + $ERROR("#5: typeof new Number(10) === 'object'"); +} + +//CHECK#6 +if (new Number(10) === undefined) { + $ERROR("#6: new Number(10) should not be undefined"); +} + +//CHECK#7 +var x7 = new Number(10); +if(typeof x7 !== "object"){ + $ERROR("#7: typeof new Number(10) === 'object'"); +} + +//CHECK#8 +var x8 = new Number(10); +if(x8 === undefined){ + $ERROR("#8: new Number(10) should not be undefined"); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.2_The_Number_Constructor/S15.7.2.1_A2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.2_The_Number_Constructor/S15.7.2.1_A2.js new file mode 100644 index 000000000..fcf738567 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.2_The_Number_Constructor/S15.7.2.1_A2.js @@ -0,0 +1,29 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.2.1_A2; + * @section: 15.7.2.1; + * @assertion: The [[Prototype]] property of the newly constructed object + * is set to the original Number prototype object, the one that is the + * initial value of Number.prototype; + * @description: Checking prototype property of the newly created objects; +*/ + +// CHECK#1 +var x1 = new Number(1); +if (typeof x1.constructor.prototype !== "object") { + $ERROR('#1: typeof x1.constructor.prototype === "object"'); +} + +//CHECK#2 +var x2 = new Number(2); +if (!Number.prototype.isPrototypeOf(x2)) { + $ERROR('#2: Number.prototype.isPrototypeOf(x2)'); +} + +//CHECK#3 +var x3 = new Number(3); +if (Number.prototype !== x3.constructor.prototype) { + $ERROR('#3: Number.prototype === x3.constructor.prototype'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.2_The_Number_Constructor/S15.7.2.1_A3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.2_The_Number_Constructor/S15.7.2.1_A3.js new file mode 100644 index 000000000..3008843b7 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.2_The_Number_Constructor/S15.7.2.1_A3.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.2.1_A3; + * @section: 15.7.2.1; + * @assertion: The [[Value]] property of the newly constructed object + * is set to ToNumber(value) if value was supplied, else to +0; + * @description: Checking value of the newly created object; +*/ + +//CHECK#1 +var x1 = new Number(1); +if (x1.valueOf() !== 1) { + $ERROR('#1: var x1 = new Number(1); x1.valueOf() === 1'); +} + +//CHECK#2 +var x2 = new Number(); +if (x2.valueOf() !== 0) { + $ERROR('#2.1: var x2 = new Number(); x2.valueOf() === 0'); +} else if( 1/x2.valueOf() !== Number.POSITIVE_INFINITY ) { + $ERROR('#2.2: var x2 = new Number(); x2.valueOf() === +0'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.2_The_Number_Constructor/S15.7.2.1_A4.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.2_The_Number_Constructor/S15.7.2.1_A4.js new file mode 100644 index 000000000..788ef319c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.2_The_Number_Constructor/S15.7.2.1_A4.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.2.1_A4; + * @section: 15.7.2.1; + * @assertion: The [[Class]] property of the newly constructed object + * is set to "Number"; + * @description: For testing toString function is used; +*/ + +delete Number.prototype.toString; + +var obj = new Number(); + +//CHECK#1 +if (obj.toString() !== "[object Number]") { + $ERROR('#1: The [[Class]] property of the newly constructed object is set to "Number"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A1_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A1_T1.js new file mode 100644 index 000000000..f9361f6fb --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A1_T1.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.1_A1_T1; + * @section: 15.7.3.1; + * @assertion: The Number property "prototype" has { DontEnum, DontDelete, ReadOnly } attributes; + * @description: Checking if varying the Number.prototype property fails; +*/ + +//CHECK#1 +var x = Number.prototype; +Number.prototype = 1; +if (Number.prototype !== x) { + $ERROR('#1: The Number.prototype property has the attributes ReadOnly'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A1_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A1_T2.js new file mode 100644 index 000000000..5c07e1251 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A1_T2.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.1_A1_T2; + * @section: 15.7.3.1; + * @assertion: The Number property "prototype" has { DontEnum, DontDelete, ReadOnly } attributes; + * @description: Checking if deleting the Number.prototype property fails; + * @strict_mode_negative +*/ + +// CHECK#1 +if (delete Number.prototype !== false) { + $ERROR('#1: The Number.prototype property has the attributes DontDelete'); +} + +if (!Number.hasOwnProperty('prototype')) { + $FAIL('#2: The Number.prototype property has the attributes DontDelete'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A1_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A1_T3.js new file mode 100644 index 000000000..16ef37d26 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A1_T3.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.1_A1_T3; + * @section: 15.7.3.1; + * @assertion: The Number property "prototype" has { DontEnum, DontDelete, ReadOnly } attributes; + * @description: Checking if enumerating the Number.prototype property fails; +*/ + +if (Number.propertyIsEnumerable('prototype')) { + $ERROR('#1: The Number.prototype property has the attribute DontEnum'); +} + +for(x in Number) { + if(x === "prototype") { + $ERROR('#2: The Number.prototype has the attribute DontEnum'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A2_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A2_T1.js new file mode 100644 index 000000000..e092bcc7c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A2_T1.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. + +/** + * @name: S15.7.3.1_A2_T1; + * @section: 15.7.3.1; + * @assertion: Number.prototype is itself Number object; + * @description: Checking type of Number.prototype property - test based on + * deleting Number.prototype.toString; +*/ + +//CHECK#1 +if (typeof Number.prototype !== "object") { + $ERROR('#1: typeof Number.prototype === "object"'); +} + +delete Number.prototype.toString; + +if (Number.prototype.toString() !== "[object Number]") { + $ERROR('#3: The [[Class]] property of the Number prototype object is set to "Number"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A2_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A2_T2.js new file mode 100644 index 000000000..6d5c12758 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A2_T2.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. + +/** + * @name: S15.7.3.1_A2_T2; + * @section: 15.7.3.1; + * @assertion: Number.prototype is itself Number object; + * @description: Checking type of Number.prototype property - test based on + * overwriting of Number.prototype.toString; +*/ + +//CHECK#1 +if (typeof Number.prototype !== "object") { + $ERROR('#1: typeof Number.prototype === "object"'); +} + +Number.prototype.toString = Object.prototype.toString; + +if (Number.prototype.toString() !== "[object Number]") { + $ERROR('#3: The [[Class]] property of the Number prototype object is set to "Number"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A3.js new file mode 100644 index 000000000..215ee69bf --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.1_Number.prototype/S15.7.3.1_A3.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.1_A3; + * @section: 15.7.3.1; + * @assertion: Number.prototype value is +0; + * @description: Checking value of Number.prototype property; +*/ + +//CHECK#1 +if (Number.prototype != 0) { + $ERROR('#2: Number.prototype == +0'); +} else if( 1/Number.prototype != Number.POSITIVE_INFINITY){ + $ERROR('#2: Number.prototype == +0'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.2_Number.MAX_VALUE/S15.7.3.2_A1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.2_Number.MAX_VALUE/S15.7.3.2_A1.js new file mode 100644 index 000000000..003933ea1 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.2_Number.MAX_VALUE/S15.7.3.2_A1.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.2_A1; + * @section: 15.7.3.2; + * @assertion: Number.MAX_VALUE is approximately 1.7976931348623157e308; + * @description: Checking Number.MAX_VALUE value; +*/ + +$INCLUDE("math_precision.js"); +$INCLUDE("math_isequal.js"); + +// CHECK#1 +if (!isEqual(Number.MAX_VALUE, 1.7976931348623157e308)) { + $ERROR('#1: Number.MAX_VALUE approximately equal to 1.7976931348623157e308'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.2_Number.MAX_VALUE/S15.7.3.2_A2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.2_Number.MAX_VALUE/S15.7.3.2_A2.js new file mode 100644 index 000000000..2f66dacde --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.2_Number.MAX_VALUE/S15.7.3.2_A2.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.2_A2; + * @section: 15.7.3.2; + * @assertion: Number.MAX_VALUE is ReadOnly; + * @description: Checking if varying Number.MAX_VALUE fails; +*/ + +// CHECK#1 +var x = Number.MAX_VALUE; +Number.MAX_VALUE = 1; +if (Number.MAX_VALUE !== x) { + $ERROR('#1: x = Number.MAX_VALUE; Number.MAX_VALUE = 1; Number.MAX_VALUE === x'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.2_Number.MAX_VALUE/S15.7.3.2_A3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.2_Number.MAX_VALUE/S15.7.3.2_A3.js new file mode 100644 index 000000000..74a4ba268 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.2_Number.MAX_VALUE/S15.7.3.2_A3.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.2_A3; + * @section: 15.7.3.2; + * @assertion: Number.MAX_VALUE is DontDelete; + * @description: Checking if deleting Number.MAX_VALUE fails; + * @strict_mode_negative +*/ + +// CHECK#1 +if (delete Number.MAX_VALUE !== false) { + $ERROR('#1: delete Number.MAX_VALUE === false'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.2_Number.MAX_VALUE/S15.7.3.2_A4.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.2_Number.MAX_VALUE/S15.7.3.2_A4.js new file mode 100644 index 000000000..46dee3a16 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.2_Number.MAX_VALUE/S15.7.3.2_A4.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.2_A4; + * @section: 15.7.3.2; + * @assertion: Number.MAX_VALUE has the attribute DontEnum; + * @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'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.3_Number.MIN_VALUE/S15.7.3.3_A1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.3_Number.MIN_VALUE/S15.7.3.3_A1.js new file mode 100644 index 000000000..56e331836 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.3_Number.MIN_VALUE/S15.7.3.3_A1.js @@ -0,0 +1,17 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.3_A1; + * @section: 15.7.3.3; + * @assertion: Number.MIN_VALUE is approximately 5e-324; + * @description: Checking Number.MIN_VALUE value; +*/ + +$INCLUDE("math_precision.js"); +$INCLUDE("math_isequal.js"); + +// CHECK#1 +if (!isEqual(Number.MIN_VALUE, 5e-324)) { + $ERROR('#1: Number.MIN_VALUE approximately equal to 5e-324'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.3_Number.MIN_VALUE/S15.7.3.3_A2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.3_Number.MIN_VALUE/S15.7.3.3_A2.js new file mode 100644 index 000000000..14af8d289 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.3_Number.MIN_VALUE/S15.7.3.3_A2.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.3_A2; + * @section: 15.7.3.3; + * @assertion: Number.MIN_VALUE is ReadOnly; + * @description: Checking if varying Number.MIN_VALUE fails; +*/ + +// CHECK#1 +var x = Number.MIN_VALUE; +Number.MIN_VALUE = 1; +if (Number.MIN_VALUE !== x) { + $ERROR('#1: x = Number.MIN_VALUE; Number.MIN_VALUE = 1; Number.MIN_VALUE === x'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.3_Number.MIN_VALUE/S15.7.3.3_A3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.3_Number.MIN_VALUE/S15.7.3.3_A3.js new file mode 100644 index 000000000..c166cd3e9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.3_Number.MIN_VALUE/S15.7.3.3_A3.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.3_A3; + * @section: 15.7.3.3; + * @assertion: Number.MIN_VALUE is DontDelete; + * @description: Checking if deleting Number.MIN_VALUE fails; + * @strict_mode_negative +*/ + +//CHECK#1 +if (delete Number.MIN_VALUE !== false) { + $ERROR('#1: delete Number.MIN_VALUE === false'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.3_Number.MIN_VALUE/S15.7.3.3_A4.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.3_Number.MIN_VALUE/S15.7.3.3_A4.js new file mode 100644 index 000000000..1e55a72f1 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.3_Number.MIN_VALUE/S15.7.3.3_A4.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.3_A4; + * @section: 15.7.3.3; + * @assertion: Number.MIN_VALUE has the attribute DontEnum; + * @description: Checking if enumerating Number.MIN_VALUE fails; +*/ + +//CHECK#1 +for(var x in Number) { + if(x === "MIN_VALUE") { + $ERROR('#1: Number.MIN_VALUE has the attribute DontEnum'); + } +} + +if (Number.propertyIsEnumerable('MIN_VALUE')) { + $ERROR('#2: Number.MIN_VALUE has the attribute DontEnum'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.4_Number.NaN/S15.7.3.4_A1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.4_Number.NaN/S15.7.3.4_A1.js new file mode 100644 index 000000000..ba287c313 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.4_Number.NaN/S15.7.3.4_A1.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.4_A1; + * @section: 15.7.3.4; + * @assertion: Number.NaN is Not-a-Number; + * @description: Checking isNaN(Number.NaN); +*/ + +// CHECK#1 +if (isNaN(Number.NaN) !== true) { + $ERROR('#1: Number.NaN === Not-a-Number'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.4_Number.NaN/S15.7.3.4_A2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.4_Number.NaN/S15.7.3.4_A2.js new file mode 100644 index 000000000..bef1a7a06 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.4_Number.NaN/S15.7.3.4_A2.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.4_A2; + * @section: 15.7.3.4; + * @assertion: Number.NaN is ReadOnly; + * @description: Checking if varying Number.NaN fails; +*/ + +// CHECK#1 +Number.NaN = 1; +if (isNaN(Number.NaN) !== true) { + $ERROR('#1: Number.NaN = 1; Number.NaN === Not-a-Number'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.4_Number.NaN/S15.7.3.4_A3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.4_Number.NaN/S15.7.3.4_A3.js new file mode 100644 index 000000000..b8f427cab --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.4_Number.NaN/S15.7.3.4_A3.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.4_A3; + * @section: 15.7.3.4; + * @assertion: Number.NaN is DontDelete; + * @description: Checking if deleting Number.NaN fails; + * @strict_mode_negative +*/ + +// CHECK#1 +if (delete Number.NaN !== false) { + $ERROR('#1: delete Number.NaN === false'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.4_Number.NaN/S15.7.3.4_A4.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.4_Number.NaN/S15.7.3.4_A4.js new file mode 100644 index 000000000..b129a4d77 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.4_Number.NaN/S15.7.3.4_A4.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.4_A4; + * @section: 15.7.3.4; + * @assertion: Number.NaN has the attribute DontEnum; + * @description: Checking if enumerating Number.NaN fails; +*/ + +//CHECK#1 +for(var x in Number) { + if(x === "NaN") { + $ERROR('#1: Number.NaN has the attribute DontEnum'); + } +} + +if (Number.propertyIsEnumerable('NaN')) { + $ERROR('#2: Number.NaN has the attribute DontEnum'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.5_Number.NEGATIVE_INFINITY/S15.7.3.5_A1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.5_Number.NEGATIVE_INFINITY/S15.7.3.5_A1.js new file mode 100644 index 000000000..aea96e07b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.5_Number.NEGATIVE_INFINITY/S15.7.3.5_A1.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. + +/** + * @name: S15.7.3.5_A1; + * @section: 15.7.3.5; + * @assertion: Number.NEGATIVE_INFINITY is -Infinity; + * @description: Checking sign and finiteness of Number.NEGATIVE_INFINITY; +*/ + +// CHECK#1 +if (isFinite(Number.NEGATIVE_INFINITY) !== false) { + $ERROR('#1: Number.NEGATIVE_INFINITY === Not-a-Finite'); +} else { + if ((Number.NEGATIVE_INFINITY < 0) !== true) { + $ERROR('#1: Number.NEGATIVE_INFINITY === -Infinity'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.5_Number.NEGATIVE_INFINITY/S15.7.3.5_A2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.5_Number.NEGATIVE_INFINITY/S15.7.3.5_A2.js new file mode 100644 index 000000000..b9eb44bb6 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.5_Number.NEGATIVE_INFINITY/S15.7.3.5_A2.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.5_A2; + * @section: 15.7.3.5; + * @assertion: Number.NEGATIVE_INFINITY is ReadOnly; + * @description: Checking if varying Number.NEGATIVE_INFINITY fails; +*/ + +// CHECK#1 +Number.NEGATIVE_INFINITY = 1; +if (isFinite(Number.NEGATIVE_INFINITY)) { + $ERROR('#1: Number.NEGATIVE_INFINITY = 1; Number.NEGATIVE_INFINITY === -Infinity'); +} else { + if (Number.NEGATIVE_INFINITY >= 0) { + $ERROR('#1: Number.NEGATIVE_INFINITY = 1; Number.NEGATIVE_INFINITY === -Infinity'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.5_Number.NEGATIVE_INFINITY/S15.7.3.5_A3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.5_Number.NEGATIVE_INFINITY/S15.7.3.5_A3.js new file mode 100644 index 000000000..f898c7a49 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.5_Number.NEGATIVE_INFINITY/S15.7.3.5_A3.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.5_A3; + * @section: 15.7.3.5; + * @assertion: Number.NEGATIVE_INFINITY is DontDelete; + * @description: Checking if deleting Number.NEGATIVE_INFINITY fails; + * @strict_mode_negative +*/ + +// CHECK#1 +if (delete Number.NEGATIVE_INFINITY !== false) { + $ERROR('#1: delete Number.NEGATIVE_INFINITY === false'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.5_Number.NEGATIVE_INFINITY/S15.7.3.5_A4.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.5_Number.NEGATIVE_INFINITY/S15.7.3.5_A4.js new file mode 100644 index 000000000..105d708d1 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.5_Number.NEGATIVE_INFINITY/S15.7.3.5_A4.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.5_A4; + * @section: 15.7.3.5; + * @assertion: Number.NEGATIVE_INFINITY has the attribute DontEnum; + * @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/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.6_Number.POSITIVE_INFINITY/S15.7.3.6_A1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.6_Number.POSITIVE_INFINITY/S15.7.3.6_A1.js new file mode 100644 index 000000000..1e442e874 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.6_Number.POSITIVE_INFINITY/S15.7.3.6_A1.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. + +/** + * @name: S15.7.3.6_A1; + * @section: 15.7.3.6; + * @assertion: Number.POSITIVE_INFINITY is +Infinity; + * @description: Checking sign and finiteness of Number.POSITIVE_INFINITY; +*/ + +// CHECK#1 +if (isFinite(Number.POSITIVE_INFINITY) !== false) { + $ERROR('#1: Number.POSITIVE_INFINITY === Not-a-Finite'); +} else { + if ((Number.POSITIVE_INFINITY > 0) !== true) { + $ERROR('#1: Number.POSITIVE_INFINITY === +Infinity'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.6_Number.POSITIVE_INFINITY/S15.7.3.6_A2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.6_Number.POSITIVE_INFINITY/S15.7.3.6_A2.js new file mode 100644 index 000000000..bd5e8f7cb --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.6_Number.POSITIVE_INFINITY/S15.7.3.6_A2.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.6_A2; + * @section: 15.7.3.6; + * @assertion: Number.POSITIVE_INFINITY is ReadOnly; + * @description: Checking if varying Number.POSITIVE_INFINITY fails; +*/ + +// CHECK#1 +Number.POSITIVE_INFINITY = 1; +if (isFinite(Number.POSITIVE_INFINITY)) { + $ERROR('#1: Number.POSITIVE_INFINITY = 1; Number.POSITIVE_INFINITY === +Infinity'); +} else { + if (Number.POSITIVE_INFINITY <= 0) { + $ERROR('#1: Number.POSITIVE_INFINITY = 1; Number.POSITIVE_INFINITY === +Infinity'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.6_Number.POSITIVE_INFINITY/S15.7.3.6_A3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.6_Number.POSITIVE_INFINITY/S15.7.3.6_A3.js new file mode 100644 index 000000000..8e8fd41fc --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.6_Number.POSITIVE_INFINITY/S15.7.3.6_A3.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.6_A3; + * @section: 15.7.3.6; + * @assertion: Number.POSITIVE_INFINITY is DontDelete; + * @description: Checking if deleting Number.POSITIVE_INFINITY fails; + * @strict_mode_negative +*/ + +// CHECK#1 +if (delete Number.POSITIVE_INFINITY !== false) { + $ERROR('#1: delete Number.POSITIVE_INFINITY === false'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.6_Number.POSITIVE_INFINITY/S15.7.3.6_A4.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.6_Number.POSITIVE_INFINITY/S15.7.3.6_A4.js new file mode 100644 index 000000000..2dd66d164 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/15.7.3.6_Number.POSITIVE_INFINITY/S15.7.3.6_A4.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3.6_A4; + * @section: 15.7.3.6; + * @assertion: Number.POSITIVE_INFINITY has the attribute DontEnum; + * @description: Checking if enumerating Number.POSITIVE_INFINITY fails; +*/ + +//CHECK#1 +for(var x in Number) { + if(x === "POSITIVE_INFINITY") { + $ERROR('#1: Number.POSITIVE_INFINITY has the attribute DontEnum'); + } +} + +if (Number.propertyIsEnumerable('POSITIVE_INFINITY')) { + $ERROR('#2: Number.POSITIVE_INFINITY has the attribute DontEnum'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A1.js new file mode 100644 index 000000000..bf9c53762 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A1.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3_A1; + * @section: 15.7.3; + * @assertion: The Number constructor has the property "prototype"; + * @description: Checking existence of the property "prototype"; + */ + +if(!Number.hasOwnProperty("prototype")){ + $ERROR('#1: The Number constructor has the property "prototype"'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A2.js new file mode 100644 index 000000000..4110bca7e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A2.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3_A2; + * @section: 15.7.3; + * @assertion: The Number constructor has the property "MAX_VALUE"; + * @description: Checking existence of the property "MAX_VALUE"; + */ + +if(!Number.hasOwnProperty("MAX_VALUE")){ + $ERROR('#1: The Number constructor has the property "MAX_VALUE"'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A3.js new file mode 100644 index 000000000..814c4e710 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A3.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3_A3; + * @section: 15.7.3; + * @assertion: The Number constructor has the property "MIN_VALUE"; + * @description: Checking existence of the property "MIN_VALUE"; + */ + +if(!Number.hasOwnProperty("MIN_VALUE")){ + $ERROR('#1: The Number constructor has the property "MIN_VALUE"'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A4.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A4.js new file mode 100644 index 000000000..0f9d15c5e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A4.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3_A4; + * @section: 15.7.3; + * @assertion: The Number constructor has the property "NaN"; + * @description: Checking existence of the property "NaN"; + */ + +if(!Number.hasOwnProperty("NaN")){ + $ERROR('#1: The Number constructor has the property "NaN"'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A5.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A5.js new file mode 100644 index 000000000..6d5bef400 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A5.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3_A5; + * @section: 15.7.3; + * @assertion: The Number constructor has the property "NEGATIVE_INFINITY"; + * @description: Checking existence of the property "NEGATIVE_INFINITY"; + */ + +if(!Number.hasOwnProperty("NEGATIVE_INFINITY")){ + $ERROR('#1: The Number constructor has the property "NEGATIVE_INFINITY"'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A6.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A6.js new file mode 100644 index 000000000..03b665296 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A6.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.3_A6; + * @section: 15.7.3; + * @assertion: The Number constructor has the property "POSITIVE_INFINITY"; + * @description: Checking existence of the property "POSITIVE_INFINITY"; + */ + +if(!Number.hasOwnProperty("POSITIVE_INFINITY")){ + $ERROR('#1: The Number constructor has the property "POSITIVE_INFINITY"'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A7.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A7.js new file mode 100644 index 000000000..df4084894 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A7.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.7.3_A7; +* @section: 15.7.3; +* @assertion: The value of the internal [[Prototype]] property of the Number +* constructor is the Function prototype object; +* @description: Checking Function.prototype.isPrototypeOf(Number); +*/ + +//CHECK#1 +if (!(Function.prototype.isPrototypeOf(Number))) { + $ERROR('#1: the value of the internal [[Prototype]] property of the Number constructor is the Function prototype object.'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A8.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A8.js new file mode 100644 index 000000000..a94f3732d --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.3_Properties_of_Number_Constructor/S15.7.3_A8.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S15.7.3_A8; +* @section: 15.7.3; +* @assertion: Number constructor has length property whose value is 1; +* @description: Checking Number.length property; +*/ + +//CHECK#1 +if (!Number.hasOwnProperty("length")){ + $ERROR('#1: Number constructor has length property'); +} + +//CHECK#2 +if (Number.length !== 1) { + $ERROR('#2: Number constructor length property value is 1'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.1_Number.prototype.constructor/S15.7.4.1_A1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.1_Number.prototype.constructor/S15.7.4.1_A1.js new file mode 100644 index 000000000..86f4e69ca --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.1_Number.prototype.constructor/S15.7.4.1_A1.js @@ -0,0 +1,16 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.1_A1; + * @section: 15.7.4.1; + * @assertion: The initial value of Number.prototype.constructor is the + * built-in Number constructor; + * @description: Compare Number.prototype.constructor with Number; +*/ + +//CHECK#1 +if(Number.prototype.constructor !== Number){ + $ERROR('#1: Number.prototype.constructor === Number'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A1_T01.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A1_T01.js new file mode 100644 index 000000000..84df44553 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A1_T01.js @@ -0,0 +1,51 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A1_T01; + * @section: 15.7.4.2; + * @assertion: toString: If radix is the number 10 or undefined, then this + * number value is given as an argument to the ToString operator. + * the resulting string value is returned; + * @description: undefined radix; +*/ + +//CHECK#1 +if(Number.prototype.toString() !== "0"){ + $ERROR('#1: Number.prototype.toString() === "0"'); +} + +//CHECK#2 +if((new Number()).toString() !== "0"){ + $ERROR('#2: (new Number()).toString() === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString() !== "0"){ + $ERROR('#3: (new Number(0)).toString() === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString() !== "-1"){ + $ERROR('#4: (new Number(-1)).toString() === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString() !== "1"){ + $ERROR('#5: (new Number(1)).toString() === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString() !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString() === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString() !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString() === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString() !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString() === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A1_T02.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A1_T02.js new file mode 100644 index 000000000..6048f024e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A1_T02.js @@ -0,0 +1,51 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A1_T02; + * @section: 15.7.4.2; + * @assertion: toString: If radix is the number 10 or undefined, then this + * number value is given as an argument to the ToString operator. + * the resulting string value is returned; + * @description: radix is 10; +*/ + +//CHECK#1 +if(Number.prototype.toString(10) !== "0"){ + $ERROR('#1: Number.prototype.toString(10) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(10) !== "0"){ + $ERROR('#2: (new Number()).toString(10) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(10) !== "0"){ + $ERROR('#3: (new Number(0)).toString(10) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(10) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(10) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(10) !== "1"){ + $ERROR('#5: (new Number(1)).toString(10) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(10) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(10) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(10) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(10) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(10) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(10) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A1_T03.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A1_T03.js new file mode 100644 index 000000000..bc7dccd3f --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A1_T03.js @@ -0,0 +1,51 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A1_T03; + * @section: 15.7.4.2; + * @assertion: toString: If radix is the number 10 or undefined, then this + * number value is given as an argument to the ToString operator. + * the resulting string value is returned; + * @description: radix is undefined value; +*/ + +//CHECK#1 +if(Number.prototype.toString(undefined) !== "0"){ + $ERROR('#1: Number.prototype.toString(undefined) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(undefined) !== "0"){ + $ERROR('#2: (new Number()).toString(undefined) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(undefined) !== "0"){ + $ERROR('#3: (new Number(0)).toString(undefined) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(undefined) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(undefined) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(undefined) !== "1"){ + $ERROR('#5: (new Number(1)).toString(undefined) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(undefined) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(undefined) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(undefined) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(undefined) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(undefined) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(undefined) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T01.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T01.js new file mode 100644 index 000000000..8a86633fb --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T01.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T01; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 2; +*/ + +//CHECK#1 +if(Number.prototype.toString(2) !== "0"){ + $ERROR('#1: Number.prototype.toString(2) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(2) !== "0"){ + $ERROR('#2: (new Number()).toString(2) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(2) !== "0"){ + $ERROR('#3: (new Number(0)).toString(2) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(2) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(2) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(2) !== "1"){ + $ERROR('#5: (new Number(1)).toString(2) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(2) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(2) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(2) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(2) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(2) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(2) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T02.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T02.js new file mode 100644 index 000000000..e031f44fc --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T02.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T02; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 3; +*/ + +//CHECK#1 +if(Number.prototype.toString(3) !== "0"){ + $ERROR('#1: Number.prototype.toString(3) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(3) !== "0"){ + $ERROR('#2: (new Number()).toString(3) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(3) !== "0"){ + $ERROR('#3: (new Number(0)).toString(3) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(3) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(3) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(3) !== "1"){ + $ERROR('#5: (new Number(1)).toString(3) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(3) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(3) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(3) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(3) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(3) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(3) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T03.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T03.js new file mode 100644 index 000000000..6857aa6d0 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T03.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T03; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 4; +*/ + +//CHECK#1 +if(Number.prototype.toString(4) !== "0"){ + $ERROR('#1: Number.prototype.toString(4) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(4) !== "0"){ + $ERROR('#2: (new Number()).toString(4) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(4) !== "0"){ + $ERROR('#3: (new Number(0)).toString(4) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(4) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(4) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(4) !== "1"){ + $ERROR('#5: (new Number(1)).toString(4) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(4) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(4) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(4) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(4) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(4) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(4) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T04.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T04.js new file mode 100644 index 000000000..444f03547 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T04.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T04; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 5; +*/ + +//CHECK#1 +if(Number.prototype.toString(5) !== "0"){ + $ERROR('#1: Number.prototype.toString(5) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(5) !== "0"){ + $ERROR('#2: (new Number()).toString(5) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(5) !== "0"){ + $ERROR('#3: (new Number(0)).toString(5) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(5) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(5) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(5) !== "1"){ + $ERROR('#5: (new Number(1)).toString(5) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(5) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(5) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(5) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(5) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(5) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(5) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T05.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T05.js new file mode 100644 index 000000000..0eb9f51d6 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T05.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T05; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 6; +*/ + +//CHECK#1 +if(Number.prototype.toString(6) !== "0"){ + $ERROR('#1: Number.prototype.toString(6) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(6) !== "0"){ + $ERROR('#2: (new Number()).toString(6) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(6) !== "0"){ + $ERROR('#3: (new Number(0)).toString(6) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(6) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(6) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(6) !== "1"){ + $ERROR('#5: (new Number(1)).toString(6) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(6) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(6) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(6) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(6) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(6) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(6) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T06.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T06.js new file mode 100644 index 000000000..8c1ef484b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T06.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T06; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 7; +*/ + +//CHECK#1 +if(Number.prototype.toString(7) !== "0"){ + $ERROR('#1: Number.prototype.toString(7) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(7) !== "0"){ + $ERROR('#2: (new Number()).toString(7) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(7) !== "0"){ + $ERROR('#3: (new Number(0)).toString(7) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(7) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(7) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(7) !== "1"){ + $ERROR('#5: (new Number(1)).toString(7) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(7) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(7) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(7) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(7) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(7) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(7) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T07.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T07.js new file mode 100644 index 000000000..8b8554ad7 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T07.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T07; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 8; +*/ + +//CHECK#1 +if(Number.prototype.toString(8) !== "0"){ + $ERROR('#1: Number.prototype.toString(8) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(8) !== "0"){ + $ERROR('#2: (new Number()).toString(8) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(8) !== "0"){ + $ERROR('#3: (new Number(0)).toString(8) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(8) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(8) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(8) !== "1"){ + $ERROR('#5: (new Number(1)).toString(8) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(8) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(8) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(8) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(8) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(8) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(8) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T08.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T08.js new file mode 100644 index 000000000..1eedcd387 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T08.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T08; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 9; +*/ + +//CHECK#1 +if(Number.prototype.toString(9) !== "0"){ + $ERROR('#1: Number.prototype.toString(9) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(9) !== "0"){ + $ERROR('#2: (new Number()).toString(9) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(9) !== "0"){ + $ERROR('#3: (new Number(0)).toString(9) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(9) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(9) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(9) !== "1"){ + $ERROR('#5: (new Number(1)).toString(9) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(9) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(9) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(9) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(9) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(9) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(9) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T09.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T09.js new file mode 100644 index 000000000..d9b04e8ab --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T09.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T09; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 11; +*/ + +//CHECK#1 +if(Number.prototype.toString(11) !== "0"){ + $ERROR('#1: Number.prototype.toString(11) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(11) !== "0"){ + $ERROR('#2: (new Number()).toString(11) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(11) !== "0"){ + $ERROR('#3: (new Number(0)).toString(11) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(11) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(11) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(11) !== "1"){ + $ERROR('#5: (new Number(1)).toString(11) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(11) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(11) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(11) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(11) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(11) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(11) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T10.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T10.js new file mode 100644 index 000000000..87f640f42 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T10.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T10; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 12; +*/ + +//CHECK#1 +if(Number.prototype.toString(12) !== "0"){ + $ERROR('#1: Number.prototype.toString(12) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(12) !== "0"){ + $ERROR('#2: (new Number()).toString(12) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(12) !== "0"){ + $ERROR('#3: (new Number(0)).toString(12) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(12) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(12) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(12) !== "1"){ + $ERROR('#5: (new Number(1)).toString(12) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(12) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(12) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(12) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(12) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(12) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(12) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T11.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T11.js new file mode 100644 index 000000000..8fba514a6 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T11.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T11; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 13; +*/ + +//CHECK#1 +if(Number.prototype.toString(13) !== "0"){ + $ERROR('#1: Number.prototype.toString(13) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(13) !== "0"){ + $ERROR('#2: (new Number()).toString(13) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(13) !== "0"){ + $ERROR('#3: (new Number(0)).toString(13) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(13) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(13) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(13) !== "1"){ + $ERROR('#5: (new Number(1)).toString(13) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(13) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(13) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(13) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(13) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(13) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(13) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T12.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T12.js new file mode 100644 index 000000000..101be9822 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T12.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T12; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 14; +*/ + +//CHECK#1 +if(Number.prototype.toString(14) !== "0"){ + $ERROR('#1: Number.prototype.toString(14) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(14) !== "0"){ + $ERROR('#2: (new Number()).toString(14) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(14) !== "0"){ + $ERROR('#3: (new Number(0)).toString(14) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(14) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(14) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(14) !== "1"){ + $ERROR('#5: (new Number(1)).toString(14) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(14) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(14) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(14) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(14) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(14) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(14) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T13.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T13.js new file mode 100644 index 000000000..288b33432 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T13.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T13; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 15; +*/ + +//CHECK#1 +if(Number.prototype.toString(15) !== "0"){ + $ERROR('#1: Number.prototype.toString(15) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(15) !== "0"){ + $ERROR('#2: (new Number()).toString(15) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(15) !== "0"){ + $ERROR('#3: (new Number(0)).toString(15) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(15) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(15) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(15) !== "1"){ + $ERROR('#5: (new Number(1)).toString(15) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(15) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(15) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(15) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(15) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(15) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(15) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T14.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T14.js new file mode 100644 index 000000000..3c99a17be --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T14.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T14; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 16; +*/ + +//CHECK#1 +if(Number.prototype.toString(16) !== "0"){ + $ERROR('#1: Number.prototype.toString(16) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(16) !== "0"){ + $ERROR('#2: (new Number()).toString(16) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(16) !== "0"){ + $ERROR('#3: (new Number(0)).toString(16) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(16) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(16) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(16) !== "1"){ + $ERROR('#5: (new Number(1)).toString(16) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(16) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(16) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(16) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(16) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(16) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(16) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T15.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T15.js new file mode 100644 index 000000000..53566eb72 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T15.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T15; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 17; +*/ + +//CHECK#1 +if(Number.prototype.toString(17) !== "0"){ + $ERROR('#1: Number.prototype.toString(17) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(17) !== "0"){ + $ERROR('#2: (new Number()).toString(17) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(17) !== "0"){ + $ERROR('#3: (new Number(0)).toString(17) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(17) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(17) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(17) !== "1"){ + $ERROR('#5: (new Number(1)).toString(17) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(17) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(17) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(17) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(17) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(17) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(17) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T16.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T16.js new file mode 100644 index 000000000..e4aeaf34f --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T16.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T16; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 18; +*/ + +//CHECK#1 +if(Number.prototype.toString(18) !== "0"){ + $ERROR('#1: Number.prototype.toString(18) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(18) !== "0"){ + $ERROR('#2: (new Number()).toString(18) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(18) !== "0"){ + $ERROR('#3: (new Number(0)).toString(18) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(18) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(18) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(18) !== "1"){ + $ERROR('#5: (new Number(1)).toString(18) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(18) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(18) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(18) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(18) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(18) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(18) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T17.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T17.js new file mode 100644 index 000000000..c2695f5db --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T17.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T17; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 19; +*/ + +//CHECK#1 +if(Number.prototype.toString(19) !== "0"){ + $ERROR('#1: Number.prototype.toString(19) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(19) !== "0"){ + $ERROR('#2: (new Number()).toString(19) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(19) !== "0"){ + $ERROR('#3: (new Number(0)).toString(19) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(19) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(19) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(19) !== "1"){ + $ERROR('#5: (new Number(1)).toString(19) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(19) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(19) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(19) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(19) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(19) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(19) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T18.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T18.js new file mode 100644 index 000000000..49a9a365e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T18.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T18; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 20; +*/ + +//CHECK#1 +if(Number.prototype.toString(20) !== "0"){ + $ERROR('#1: Number.prototype.toString(20) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(20) !== "0"){ + $ERROR('#2: (new Number()).toString(20) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(20) !== "0"){ + $ERROR('#3: (new Number(0)).toString(20) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(20) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(20) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(20) !== "1"){ + $ERROR('#5: (new Number(1)).toString(20) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(20) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(20) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(20) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(20) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(20) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(20) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T19.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T19.js new file mode 100644 index 000000000..7ca7d4093 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T19.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T19; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 21; +*/ + +//CHECK#1 +if(Number.prototype.toString(21) !== "0"){ + $ERROR('#1: Number.prototype.toString(21) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(21) !== "0"){ + $ERROR('#2: (new Number()).toString(21) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(21) !== "0"){ + $ERROR('#3: (new Number(0)).toString(21) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(21) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(21) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(21) !== "1"){ + $ERROR('#5: (new Number(1)).toString(21) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(21) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(21) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(21) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(21) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(21) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(21) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T20.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T20.js new file mode 100644 index 000000000..fc632d378 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T20.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T20; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 22; +*/ + +//CHECK#1 +if(Number.prototype.toString(22) !== "0"){ + $ERROR('#1: Number.prototype.toString(22) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(22) !== "0"){ + $ERROR('#2: (new Number()).toString(22) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(22) !== "0"){ + $ERROR('#3: (new Number(0)).toString(22) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(22) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(22) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(22) !== "1"){ + $ERROR('#5: (new Number(1)).toString(22) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(22) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(22) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(22) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(22) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(22) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(22) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T21.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T21.js new file mode 100644 index 000000000..a217412b9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T21.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T21; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 23; +*/ + +//CHECK#1 +if(Number.prototype.toString(23) !== "0"){ + $ERROR('#1: Number.prototype.toString(23) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(23) !== "0"){ + $ERROR('#2: (new Number()).toString(23) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(23) !== "0"){ + $ERROR('#3: (new Number(0)).toString(23) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(23) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(23) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(23) !== "1"){ + $ERROR('#5: (new Number(1)).toString(23) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(23) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(23) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(23) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(23) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(23) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(23) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T22.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T22.js new file mode 100644 index 000000000..a3c14f796 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T22.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T22; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 24; +*/ + +//CHECK#1 +if(Number.prototype.toString(24) !== "0"){ + $ERROR('#1: Number.prototype.toString(24) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(24) !== "0"){ + $ERROR('#2: (new Number()).toString(24) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(24) !== "0"){ + $ERROR('#3: (new Number(0)).toString(24) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(24) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(24) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(24) !== "1"){ + $ERROR('#5: (new Number(1)).toString(24) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(24) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(24) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(24) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(24) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(24) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(24) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T23.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T23.js new file mode 100644 index 000000000..0471ec426 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T23.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T23; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 25; +*/ + +//CHECK#1 +if(Number.prototype.toString(25) !== "0"){ + $ERROR('#1: Number.prototype.toString(25) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(25) !== "0"){ + $ERROR('#2: (new Number()).toString(25) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(25) !== "0"){ + $ERROR('#3: (new Number(0)).toString(25) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(25) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(25) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(25) !== "1"){ + $ERROR('#5: (new Number(1)).toString(25) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(25) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(25) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(25) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(25) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(25) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(25) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T24.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T24.js new file mode 100644 index 000000000..e4cdd5a10 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T24.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T24; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 26; +*/ + +//CHECK#1 +if(Number.prototype.toString(26) !== "0"){ + $ERROR('#1: Number.prototype.toString(26) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(26) !== "0"){ + $ERROR('#2: (new Number()).toString(26) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(26) !== "0"){ + $ERROR('#3: (new Number(0)).toString(26) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(26) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(26) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(26) !== "1"){ + $ERROR('#5: (new Number(1)).toString(26) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(26) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(26) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(26) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(26) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(26) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(26) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T25.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T25.js new file mode 100644 index 000000000..77ba1578b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T25.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T25; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 27; +*/ + +//CHECK#1 +if(Number.prototype.toString(27) !== "0"){ + $ERROR('#1: Number.prototype.toString(27) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(27) !== "0"){ + $ERROR('#2: (new Number()).toString(27) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(27) !== "0"){ + $ERROR('#3: (new Number(0)).toString(27) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(27) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(27) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(27) !== "1"){ + $ERROR('#5: (new Number(1)).toString(27) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(27) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(27) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(27) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(27) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(27) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(27) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T26.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T26.js new file mode 100644 index 000000000..11cb0f55c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T26.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T26; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 28; +*/ + +//CHECK#1 +if(Number.prototype.toString(28) !== "0"){ + $ERROR('#1: Number.prototype.toString(28) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(28) !== "0"){ + $ERROR('#2: (new Number()).toString(28) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(28) !== "0"){ + $ERROR('#3: (new Number(0)).toString(28) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(28) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(28) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(28) !== "1"){ + $ERROR('#5: (new Number(1)).toString(28) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(28) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(28) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(28) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(28) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(28) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(28) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T27.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T27.js new file mode 100644 index 000000000..92f149590 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T27.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T27; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 29; +*/ + +//CHECK#1 +if(Number.prototype.toString(29) !== "0"){ + $ERROR('#1: Number.prototype.toString(29) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(29) !== "0"){ + $ERROR('#2: (new Number()).toString(29) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(29) !== "0"){ + $ERROR('#3: (new Number(0)).toString(29) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(29) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(29) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(29) !== "1"){ + $ERROR('#5: (new Number(1)).toString(29) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(29) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(29) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(29) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(29) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(29) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(29) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T28.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T28.js new file mode 100644 index 000000000..8bbd3b23c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T28.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T28; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 30; +*/ + +//CHECK#1 +if(Number.prototype.toString(30) !== "0"){ + $ERROR('#1: Number.prototype.toString(30) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(30) !== "0"){ + $ERROR('#2: (new Number()).toString(30) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(30) !== "0"){ + $ERROR('#3: (new Number(0)).toString(30) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(30) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(30) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(30) !== "1"){ + $ERROR('#5: (new Number(1)).toString(30) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(30) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(30) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(30) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(30) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(30) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(30) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T29.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T29.js new file mode 100644 index 000000000..0bf12bbed --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T29.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T29; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 31; +*/ + +//CHECK#1 +if(Number.prototype.toString(31) !== "0"){ + $ERROR('#1: Number.prototype.toString(31) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(31) !== "0"){ + $ERROR('#2: (new Number()).toString(31) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(31) !== "0"){ + $ERROR('#3: (new Number(0)).toString(31) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(31) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(31) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(31) !== "1"){ + $ERROR('#5: (new Number(1)).toString(31) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(31) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(31) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(31) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(31) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(31) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(31) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T30.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T30.js new file mode 100644 index 000000000..a41f7be83 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T30.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T30; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 32; +*/ + +//CHECK#1 +if(Number.prototype.toString(32) !== "0"){ + $ERROR('#1: Number.prototype.toString(32) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(32) !== "0"){ + $ERROR('#2: (new Number()).toString(32) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(32) !== "0"){ + $ERROR('#3: (new Number(0)).toString(32) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(32) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(32) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(32) !== "1"){ + $ERROR('#5: (new Number(1)).toString(32) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(32) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(32) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(32) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(32) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(32) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(32) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T31.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T31.js new file mode 100644 index 000000000..334a78152 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T31.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T31; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 33; +*/ + +//CHECK#1 +if(Number.prototype.toString(33) !== "0"){ + $ERROR('#1: Number.prototype.toString(33) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(33) !== "0"){ + $ERROR('#2: (new Number()).toString(33) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(33) !== "0"){ + $ERROR('#3: (new Number(0)).toString(33) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(33) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(33) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(33) !== "1"){ + $ERROR('#5: (new Number(1)).toString(33) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(33) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(33) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(33) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(33) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(33) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(33) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T32.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T32.js new file mode 100644 index 000000000..b7a9cba80 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T32.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T32; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 34; +*/ + +//CHECK#1 +if(Number.prototype.toString(34) !== "0"){ + $ERROR('#1: Number.prototype.toString(34) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(34) !== "0"){ + $ERROR('#2: (new Number()).toString(34) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(34) !== "0"){ + $ERROR('#3: (new Number(0)).toString(34) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(34) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(34) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(34) !== "1"){ + $ERROR('#5: (new Number(1)).toString(34) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(34) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(34) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(34) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(34) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(34) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(34) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T33.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T33.js new file mode 100644 index 000000000..b3d901484 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T33.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T33; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 35; +*/ + +//CHECK#1 +if(Number.prototype.toString(35) !== "0"){ + $ERROR('#1: Number.prototype.toString(35) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(35) !== "0"){ + $ERROR('#2: (new Number()).toString(35) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(35) !== "0"){ + $ERROR('#3: (new Number(0)).toString(35) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(35) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(35) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(35) !== "1"){ + $ERROR('#5: (new Number(1)).toString(35) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(35) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(35) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(35) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(35) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(35) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(35) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T34.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T34.js new file mode 100644 index 000000000..9fa153309 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A2_T34.js @@ -0,0 +1,50 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A2_T34; + * @section: 15.7.4.2; + * @assertion: toString: If radix is an integer from 2 to 36, but not 10, + * the result is a string, the choice of which is implementation-dependent; + * @description: radix is 36; +*/ + +//CHECK#1 +if(Number.prototype.toString(36) !== "0"){ + $ERROR('#1: Number.prototype.toString(36) === "0"'); +} + +//CHECK#2 +if((new Number()).toString(36) !== "0"){ + $ERROR('#2: (new Number()).toString(36) === "0"'); +} + +//CHECK#3 +if((new Number(0)).toString(36) !== "0"){ + $ERROR('#3: (new Number(0)).toString(36) === "0"'); +} + +//CHECK#4 +if((new Number(-1)).toString(36) !== "-1"){ + $ERROR('#4: (new Number(-1)).toString(36) === "-1"'); +} + +//CHECK#5 +if((new Number(1)).toString(36) !== "1"){ + $ERROR('#5: (new Number(1)).toString(36) === "1"'); +} + +//CHECK#6 +if((new Number(Number.NaN)).toString(36) !== "NaN"){ + $ERROR('#6: (new Number(Number.NaN)).toString(36) === "NaN"'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).toString(36) !== "Infinity"){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(36) === "Infinity"'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).toString(36) !== "-Infinity"){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(36) === "-Infinity"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A3_T01.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A3_T01.js new file mode 100644 index 000000000..6a3950f2d --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A3_T01.js @@ -0,0 +1,73 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A3_T01; + * @section: 15.7.4.2; + * @assertion: toString: radix should be an integer between 2 and 36; + * @description: radix is 1; +*/ + +//CHECK#1 +try{ + var n = Number.prototype.toString(1); + $ERROR('#1: Number.prototype.toString(1) should throw an Error'); +} +catch(e){ +} + +//CHECK#2 +try{ + var n = (new Number()).toString(1); + $ERROR('#2: (new Number()).toString(1) should throw an Error'); +} +catch(e){ +} + +//CHECK#3 +try{ + var n = (new Number(0)).toString(1); + $ERROR('#3: (new Number(0)).toString(1) should throw an Error'); +} +catch(e){ +} + +//CHECK#4 +try{ + var n = (new Number(-1)).toString(1); + $ERROR('#4: (new Number(-1)).toString(1) should throw an Error'); +} +catch(e){ +} + +//CHECK#5 +try{ + var n =(new Number(1)).toString(1); + $ERROR('#5: (new Number(1)).toString(1) should throw an Error'); +} +catch(e){ +} + +//CHECK#6 +try{ + var n =(new Number(Number.NaN)).toString(1); + $ERROR('#6: (new Number(Number.NaN)).toString(1) should throw an Error'); +} +catch(e){ +} + +//CHECK#7 +try{ + var n =(new Number(Number.POSITIVE_INFINITY)).toString(1); + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(1) should throw an Error'); +} +catch(e){ +} + +//CHECK#8 +try{ + var n =(new Number(Number.NEGATIVE_INFINITY)).toString(1); + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(1) should throw an Error'); +} +catch(e){ +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A3_T02.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A3_T02.js new file mode 100644 index 000000000..d40f4e8f4 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A3_T02.js @@ -0,0 +1,73 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A3_T02; + * @section: 15.7.4.2; + * @assertion: toString: radix should be an integer between 2 and 36; + * @description: radix is 37; +*/ + +//CHECK#1 +try{ + var n =Number.prototype.toString(37); + $ERROR('#1: Number.prototype.toString(37) should throw an Error'); +} +catch(e){ +} + +//CHECK#2 +try{ + var n =(new Number()).toString(37); + $ERROR('#2: (new Number()).toString(37) should throw an Error'); +} +catch(e){ +} + +//CHECK#3 +try{ + var n =(new Number(0)).toString(37); + $ERROR('#3: (new Number(0)).toString(37) should throw an Error'); +} +catch(e){ +} + +//CHECK#4 +try{ + var n =(new Number(-1)).toString(37); + $ERROR('#4: (new Number(-1)).toString(37) should throw an Error'); +} +catch(e){ +} + +//CHECK#5 +try{ + var n =(new Number(1)).toString(37); + $ERROR('#5: (new Number(1)).toString(37) should throw an Error'); +} +catch(e){ +} + +//CHECK#6 +try{ + var n =(new Number(Number.NaN)).toString(37); + $ERROR('#6: (new Number(Number.NaN)).toString(37) should throw an Error'); +} +catch(e){ +} + +//CHECK#7 +try{ + var n =(new Number(Number.POSITIVE_INFINITY)).toString(37); + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(37) should throw an Error'); +} +catch(e){ +} + +//CHECK#8 +try{ + var n =(new Number(Number.NEGATIVE_INFINITY)).toString(37); + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(37) should throw an Error'); +} +catch(e){ +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A3_T03.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A3_T03.js new file mode 100644 index 000000000..7c6a3de7c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A3_T03.js @@ -0,0 +1,73 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A3_T03; + * @section: 15.7.4.2; + * @assertion: toString: radix should be an integer between 2 and 36; + * @description: radix is null value; +*/ + +//CHECK#1 +try{ + var n = Number.prototype.toString(null); + $ERROR('#1: Number.prototype.toString(null) should throw an Error'); +} +catch(e){ +} + +//CHECK#2 +try{ + var n = (new Number()).toString(null); + $ERROR('#2: (new Number()).toString(null) should throw an Error'); +} +catch(e){ +} + +//CHECK#3 +try{ + var n = (new Number(0)).toString(null); + $ERROR('#3: (new Number(0)).toString(null) should throw an Error'); +} +catch(e){ +} + +//CHECK#4 +try{ + var n = (new Number(-1)).toString(null); + $ERROR('#4: (new Number(-1)).toString(null) should throw an Error'); +} +catch(e){ +} + +//CHECK#5 +try{ + var n = (new Number(1)).toString(null); + $ERROR('#5: (new Number(1)).toString(null) should throw an Error'); +} +catch(e){ +} + +//CHECK#6 +try{ + var n = (new Number(Number.NaN)).toString(null); + $ERROR('#6: (new Number(Number.NaN)).toString(null) should throw an Error'); +} +catch(e){ +} + +//CHECK#7 +try{ + var n = (new Number(Number.POSITIVE_INFINITY)).toString(null); + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(null) should throw an Error'); +} +catch(e){ +} + +//CHECK#8 +try{ + var n = (new Number(Number.NEGATIVE_INFINITY)).toString(null); + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(null) should throw an Error'); +} +catch(e){ +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A3_T04.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A3_T04.js new file mode 100644 index 000000000..fb55efc64 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A3_T04.js @@ -0,0 +1,73 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A3_T04; + * @section: 15.7.4.2; + * @assertion: toString: radix should be an integer between 2 and 36; + * @description: radix is 0; +*/ + +//CHECK#1 +try{ + var n = Number.prototype.toString(0); + $ERROR('#1: Number.prototype.toString(0) should throw an Error'); +} +catch(e){ +} + +//CHECK#2 +try{ + var n = (new Number()).toString(0); + $ERROR('#2: (new Number()).toString(0) should throw an Error'); +} +catch(e){ +} + +//CHECK#3 +try{ + var n = (new Number(0)).toString(0); + $ERROR('#3: (new Number(0)).toString(0) should throw an Error'); +} +catch(e){ +} + +//CHECK#4 +try{ + var n = (new Number(-1)).toString(0); + $ERROR('#4: (new Number(-1)).toString(0) should throw an Error'); +} +catch(e){ +} + +//CHECK#5 +try{ + var n = (new Number(1)).toString(0); + $ERROR('#5: (new Number(1)).toString(0) should throw an Error'); +} +catch(e){ +} + +//CHECK#6 +try{ + var n = (new Number(Number.NaN)).toString(0); + $ERROR('#6: (new Number(Number.NaN)).toString(0) should throw an Error'); +} +catch(e){ +} + +//CHECK#7 +try{ + var n = (new Number(Number.POSITIVE_INFINITY)).toString(0); + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(0) should throw an Error'); +} +catch(e){ +} + +//CHECK#8 +try{ + var n = (new Number(Number.NEGATIVE_INFINITY)).toString(0); + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(0) should throw an Error'); +} +catch(e){ +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A4_T01.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A4_T01.js new file mode 100644 index 000000000..a4af9788a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A4_T01.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A4_T01; + * @section: 15.7.4.2; + * @assertion: The toString function is not generic, it cannot be transferred + * to other kinds of objects for use as a method and there is should be + * a TypeError exception if its this value is not a Number object; + * @description: transferring to the String objects; +*/ + +//CHECK#1 +try{ + var s1 = new String(); + s1.toString = Number.prototype.toString; + var v1 = s1.toString(); + $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError, not '+e); + } +} + +//CHECK#2 +try{ + var s2 = new String(); + s2.myToString = Number.prototype.toString; + var v2 = s2.myToString(); + $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError, not '+e); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A4_T02.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A4_T02.js new file mode 100644 index 000000000..3c0a02f1a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A4_T02.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A4_T02; + * @section: 15.7.4.2; + * @assertion: The toString function is not generic, it cannot be transferred + * to other kinds of objects for use as a method and there is should be + * a TypeError exception if its this value is not a Number object; + * @description: transferring to the Boolean objects; +*/ + +//CHECK#1 +try{ + var s1 = new Boolean(); + s1.toString = Number.prototype.toString; + var v1 = s1.toString(); + $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError, not '+e); + } +} + +//CHECK#2 +try{ + var s2 = new Boolean(); + s2.myToString = Number.prototype.toString; + var v2 = s2.myToString(); + $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError, not '+e); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A4_T03.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A4_T03.js new file mode 100644 index 000000000..c2ba988b2 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A4_T03.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A4_T03; + * @section: 15.7.4.2; + * @assertion: The toString function is not generic, it cannot be transferred + * to other kinds of objects for use as a method and there is should be + * a TypeError exception if its this value is not a Number object; + * @description: transferring to the Date objects; +*/ + +//CHECK#1 +try{ + var s1 = new Date(); + s1.toString = Number.prototype.toString; + var v1 = s1.toString(); + $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError, not '+e); + } +} + +//CHECK#2 +try{ + var s2 = new Date(); + s2.myToString = Number.prototype.toString; + var v2 = s2.myToString(); + $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError, not '+e); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A4_T04.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A4_T04.js new file mode 100644 index 000000000..70f213b97 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A4_T04.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A4_T04; + * @section: 15.7.4.2; + * @assertion: The toString function is not generic, it cannot be transferred + * to other kinds of objects for use as a method and there is should be + * a TypeError exception if its this value is not a Number object; + * @description: transferring to the Object objects; +*/ + +//CHECK#1 +try{ + var s1 = new Object(); + s1.toString = Number.prototype.toString; + var v1 = s1.toString(); + $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError, not '+e); + } +} + +//CHECK#2 +try{ + var s2 = new Object(); + s2.myToString = Number.prototype.toString; + var v2 = s2.myToString(); + $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError, not '+e); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A4_T05.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A4_T05.js new file mode 100644 index 000000000..62abc528d --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.2_Number.prototype.toString/S15.7.4.2_A4_T05.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.2_A4_T05; + * @section: 15.7.4.2; + * @assertion: The toString function is not generic, it cannot be transferred + * to other kinds of objects for use as a method and there is should be + * a TypeError exception if its this value is not a Number object; + * @description: transferring to the other objects; +*/ + +//CHECK#1 +try{ + var s1 = {x: 1}; + s1.toString = Number.prototype.toString; + var v1 = s1.toString(); + $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError, not '+e); + } +} + +//CHECK#2 +try{ + var s2 = {x: 1}; + s2.myToString = Number.prototype.toString; + var v2 = s2.myToString(); + $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError, not '+e); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A1_T01.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A1_T01.js new file mode 100644 index 000000000..c46587a12 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A1_T01.js @@ -0,0 +1,49 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.4_A1_T01; + * @section: 15.7.4.4; + * @assertion: Number.prototype.valueOf() returns this number value; + * @description: Call without argument; +*/ + +//CHECK#1 +if(Number.prototype.valueOf() !== 0){ + $ERROR('#1: Number.prototype.valueOf() === 0'); +} + +//CHECK#2 +if((new Number()).valueOf() !== 0){ + $ERROR('#2: (new Number()).valueOf() === 0'); +} + +//CHECK#3 +if((new Number(0)).valueOf() !== 0){ + $ERROR('#3: (new Number(0)).valueOf() === 0'); +} + +//CHECK#4 +if((new Number(-1)).valueOf() !== -1){ + $ERROR('#4: (new Number(-1)).valueOf() === -1'); +} + +//CHECK#5 +if((new Number(1)).valueOf() !== 1){ + $ERROR('#5: (new Number(1)).valueOf() === 1'); +} + +//CHECK#6 +if(!isNaN((new Number(Number.NaN)).valueOf())){ + $ERROR('#6: (new Number(Number.NaN)).valueOf() === NaN'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).valueOf() !== Number.POSITIVE_INFINITY){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).valueOf() === Infinity'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).valueOf() !== Number.NEGATIVE_INFINITY){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).valueOf() === -Infinity'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A1_T02.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A1_T02.js new file mode 100644 index 000000000..30f6dc713 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A1_T02.js @@ -0,0 +1,49 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.4_A1_T02; + * @section: 15.7.4.4; + * @assertion: Number.prototype.valueOf() returns this number value; + * @description: calling with argument; +*/ + +//CHECK#1 +if(Number.prototype.valueOf("argument") !== 0){ + $ERROR('#1: Number.prototype.valueOf("argument") === 0'); +} + +//CHECK#2 +if((new Number()).valueOf("argument") !== 0){ + $ERROR('#2: (new Number()).valueOf("argument") === 0'); +} + +//CHECK#3 +if((new Number(0)).valueOf("argument") !== 0){ + $ERROR('#3: (new Number(0)).valueOf("argument") === 0'); +} + +//CHECK#4 +if((new Number(-1)).valueOf("argument") !== -1){ + $ERROR('#4: (new Number(-1)).valueOf("argument") === -1'); +} + +//CHECK#5 +if((new Number(1)).valueOf("argument") !== 1){ + $ERROR('#5: (new Number(1)).valueOf("argument") === 1'); +} + +//CHECK#6 +if(!isNaN((new Number(Number.NaN)).valueOf("argument"))){ + $ERROR('#6: (new Number(Number.NaN)).valueOf("argument") === NaN'); +} + +//CHECK#7 +if((new Number(Number.POSITIVE_INFINITY)).valueOf("argument") !== Number.POSITIVE_INFINITY){ + $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).valueOf("argument") === Infinity'); +} + +//CHECK#8 +if((new Number(Number.NEGATIVE_INFINITY)).valueOf("argument") !== Number.NEGATIVE_INFINITY){ + $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).valueOf("argument") === -Infinity'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A2_T01.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A2_T01.js new file mode 100644 index 000000000..a88708ef9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A2_T01.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.4_A2_T01; + * @section: 15.7.4.4; + * @assertion: The valueOf function is not generic, it cannot be transferred + * to other kinds of objects for use as a method and there is should be + * a TypeError exception if its this value is not a Number object; + * @description: transferring to the String objects; +*/ + +//CHECK#1 +try{ + var s1 = new String(); + s1.valueOf = Number.prototype.valueOf; + var v1 = s1.valueOf(); + $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e); + } +} + +//CHECK#2 +try{ + var s2 = new String(); + s2.myValueOf = Number.prototype.valueOf; + var v2 = s2.myValueOf(); + $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A2_T02.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A2_T02.js new file mode 100644 index 000000000..285ac1533 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A2_T02.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.4_A2_T02; + * @section: 15.7.4.4; + * @assertion: The valueOf function is not generic, it cannot be transferred + * to other kinds of objects for use as a method and there is should be + * a TypeError exception if its this value is not a Number object; + * @description: transferring to the Boolean objects; +*/ + +//CHECK#1 +try{ + var s1 = new Boolean(); + s1.valueOf = Number.prototype.valueOf; + var v1 = s1.valueOf(); + $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e); + } +} + +//CHECK#2 +try{ + var s2 = new Boolean(); + s2.myValueOf = Number.prototype.valueOf; + var v2 = s2.myValueOf(); + $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A2_T03.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A2_T03.js new file mode 100644 index 000000000..6515d3a64 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A2_T03.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.4_A2_T03; + * @section: 15.7.4.4; + * @assertion: The valueOf function is not generic, it cannot be transferred + * to other kinds of objects for use as a method and there is should be + * a TypeError exception if its this value is not a Number object; + * @description: transferring to the Date objects; +*/ + +//CHECK#1 +try{ + var s1 = new Date(); + s1.valueOf = Number.prototype.valueOf; + var v1 = s1.valueOf(); + $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e); + } +} + +//CHECK#2 +try{ + var s2 = new Date(); + s2.myValueOf = Number.prototype.valueOf; + var v2 = s2.myValueOf(); + $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A2_T04.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A2_T04.js new file mode 100644 index 000000000..6b70d2077 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A2_T04.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.4_A2_T04; + * @section: 15.7.4.4; + * @assertion: The valueOf function is not generic, it cannot be transferred + * to other kinds of objects for use as a method and there is should be + * a TypeError exception if its this value is not a Number object; + * @description: transferring to the Object objects; +*/ + +//CHECK#1 +try{ + var s1 = new Object(); + s1.valueOf = Number.prototype.valueOf; + var v1 = s1.valueOf(); + $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e); + } +} + +//CHECK#2 +try{ + var s2 = new Object(); + s2.myValueOf = Number.prototype.valueOf; + var v2 = s2.myValueOf(); + $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A2_T05.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A2_T05.js new file mode 100644 index 000000000..d69ce0959 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.4_Number.prototype.valueOf/S15.7.4.4_A2_T05.js @@ -0,0 +1,38 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.4_A2_T05; + * @section: 15.7.4.4; + * @assertion: The valueOf function is not generic, it cannot be transferred + * to other kinds of objects for use as a method and there is should be + * a TypeError exception if its this value is not a Number object; + * @description: transferring to the other objects; +*/ + +//CHECK#1 +try{ + var s1 = {x: 1}; + s1.valueOf = Number.prototype.valueOf; + var v1 = s1.valueOf(); + $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e); + } +} + +//CHECK#2 +try{ + var s2 = {x: 1}; + s2.myValueOf = Number.prototype.valueOf; + var v2 = s2.myValueOf(); + $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError'); +} +catch(e){ + if(!(e instanceof TypeError)){ + $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A1.1_T01.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A1.1_T01.js new file mode 100644 index 000000000..911af9eec --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A1.1_T01.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.5_A1.1_T01; + * @section: 15.7.4.5; + * @assertion: Step 1: Let f be ToInteger(fractionDigits). (If fractionDigits + * is undefined, this step produces the value 0); + * @description: calling on Number prototype object; +*/ + +//CHECK#1 +if(Number.prototype.toFixed() !== "0"){ + $ERROR('#1: Number.prototype.toFixed() === "0"'); +} + +//CHECK#2 +if(Number.prototype.toFixed(0) !== "0"){ + $ERROR('#2: Number.prototype.toFixed(0) === "0"'); +} + +//CHECK#3 +if(Number.prototype.toFixed(1) !== "0.0"){ + $ERROR('#3: Number.prototype.toFixed(1) === "0.0"'); +} + +//CHECK#4 +if(Number.prototype.toFixed(1.1) !== "0.0"){ + $ERROR('#4: Number.prototype.toFixed(1.1) === "0.0"'); +} + +//CHECK#5 +if(Number.prototype.toFixed(0.9) !== "0"){ + $ERROR('#5: Number.prototype.toFixed(0.9) === "0"'); +} + +//CHECK#6 +if(Number.prototype.toFixed("1") !== "0.0"){ + $ERROR('#6: Number.prototype.toFixed("1") === "0.0"'); +} + +//CHECK#7 +if(Number.prototype.toFixed("1.1") !== "0.0"){ + $ERROR('#7: Number.prototype.toFixed("1.1") === "0.0"'); +} + +//CHECK#8 +if(Number.prototype.toFixed("0.9") !== "0"){ + $ERROR('#8: Number.prototype.toFixed("0.9") === "0"'); +} + +//CHECK#9 +if(Number.prototype.toFixed(Number.NaN) !== "0"){ + $ERROR('#9: Number.prototype.toFixed(Number.NaN) === "0"'); +} + +//CHECK#10 +if(Number.prototype.toFixed("some string") !== "0"){ + $ERROR('#9: Number.prototype.toFixed("some string") === "0"'); +} + +//CHECK#10 +try{ + if(Number.prototype.toFixed(-0.1) !== "0"){ + $ERROR('#10: Number.prototype.toFixed(-0.1) === "0"'); + } +} +catch(e){ + $ERROR('#10: Number.prototype.toFixed(-0.1) should not throw '+e); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A1.1_T02.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A1.1_T02.js new file mode 100644 index 000000000..47cafb7ea --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A1.1_T02.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.5_A1.1_T02; + * @section: 15.7.4.5; + * @assertion: Step 1: Let f be ToInteger(fractionDigits). (If fractionDigits + * is undefined, this step produces the value 0); + * @description: calling on Number object; +*/ + +//CHECK#1 +if((new Number(1)).toFixed() !== "1"){ + $ERROR('#1: (new Number(1)).prototype.toFixed() === "1"'); +} + +//CHECK#2 +if((new Number(1)).toFixed(0) !== "1"){ + $ERROR('#2: (new Number(1)).prototype.toFixed(0) === "1"'); +} + +//CHECK#3 +if((new Number(1)).toFixed(1) !== "1.0"){ + $ERROR('#3: (new Number(1)).prototype.toFixed(1) === "1.0"'); +} + +//CHECK#4 +if((new Number(1)).toFixed(1.1) !== "1.0"){ + $ERROR('#4: (new Number(1)).toFixed(1.1) === "1.0"'); +} + +//CHECK#5 +if((new Number(1)).toFixed(0.9) !== "1"){ + $ERROR('#5: (new Number(1)).toFixed(0.9) === "1"'); +} + +//CHECK#6 +if((new Number(1)).toFixed("1") !== "1.0"){ + $ERROR('#6: (new Number(1)).toFixed("1") === "1.0"'); +} + +//CHECK#7 +if((new Number(1)).toFixed("1.1") !== "1.0"){ + $ERROR('#7: (new Number(1)).toFixed("1.1") === "1.0"'); +} + +//CHECK#8 +if((new Number(1)).toFixed("0.9") !== "1"){ + $ERROR('#8: (new Number(1)).toFixed("0.9") === "1"'); +} + +//CHECK#9 +if((new Number(1)).toFixed(Number.NaN) !== "1"){ + $ERROR('#9: (new Number(1)).toFixed(Number.NaN) === "1"'); +} + +//CHECK#10 +if((new Number(1)).toFixed("some string") !== "1"){ + $ERROR('#9: (new Number(1)).toFixed("some string") === "1"'); +} + +//CHECK#10 +try{ + if((new Number(1)).toFixed(-0.1) !== "1"){ + $ERROR('#10: (new Number(1)).toFixed(-0.1) === "1"'); + } +} +catch(e){ + $ERROR('#10: (new Number(1)).toFixed(-0.1) should not throw '+e); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A1.3_T01.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A1.3_T01.js new file mode 100644 index 000000000..4c031994c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A1.3_T01.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.5_A1.3_T01; + * @section: 15.7.4.5; + * @assertion: Step 4: If this number value is NaN, return the string "NaN"; + * @description: NaN is computed by new Number("string"); +*/ + +//CHECK#1 +if((new Number("a")).toFixed() !== "NaN"){ + $ERROR('#1: (new Number("a")).prototype.toFixed() === "NaN"'); +} + +//CHECK#2 +if((new Number("a")).toFixed(0) !== "NaN"){ + $ERROR('#2: (new Number("a")).prototype.toFixed(0) === "NaN"'); +} + +//CHECK#3 +if((new Number("a")).toFixed(1) !== "NaN"){ + $ERROR('#3: (new Number("a")).prototype.toFixed(1) === "NaN"'); +} + +//CHECK#4 +if((new Number("a")).toFixed(1.1) !== "NaN"){ + $ERROR('#4: (new Number("a")).toFixed(1.1) === "NaN"'); +} + +//CHECK#5 +if((new Number("a")).toFixed(0.9) !== "NaN"){ + $ERROR('#5: (new Number("a")).toFixed(0.9) === "NaN"'); +} + +//CHECK#6 +if((new Number("a")).toFixed("1") !== "NaN"){ + $ERROR('#6: (new Number("a")).toFixed("1") === "NaN"'); +} + +//CHECK#7 +if((new Number("a")).toFixed("1.1") !== "NaN"){ + $ERROR('#7: (new Number("a")).toFixed("1.1") === "NaN"'); +} + +//CHECK#8 +if((new Number("a")).toFixed("0.9") !== "NaN"){ + $ERROR('#8: (new Number("a")).toFixed("0.9") === "NaN"'); +} + +//CHECK#9 +if((new Number("a")).toFixed(Number.NaN) !== "NaN"){ + $ERROR('#9: (new Number("a")).toFixed(Number.NaN) === "NaN"'); +} + +//CHECK#10 +if((new Number("a")).toFixed("some string") !== "NaN"){ + $ERROR('#9: (new Number("a")).toFixed("some string") === "NaN"'); +} + +//CHECK#10 +try{ + s = (new Number("a")).toFixed(Number.POSITIVE_INFINITY); + $ERROR('#10: (new Number("a")).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not return NaN'); +} +catch(e){ + if(!(e instanceof RangeError)){ + $ERROR('#10: (new Number("a")).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not '+e); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A1.3_T02.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A1.3_T02.js new file mode 100644 index 000000000..177a68419 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A1.3_T02.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.5_A1.3_T02; + * @section: 15.7.4.5; + * @assertion: Step 4: If this number value is NaN, return the string "NaN"; + * @description: direct usage of NaN; +*/ + +//CHECK#1 +if(Number.NaN.toFixed() !== "NaN"){ + $ERROR('#1: Number.NaN.prototype.toFixed() === "NaN"'); +} + +//CHECK#2 +if(Number.NaN.toFixed(0) !== "NaN"){ + $ERROR('#2: Number.NaN.prototype.toFixed(0) === "NaN"'); +} + +//CHECK#3 +if(Number.NaN.toFixed(1) !== "NaN"){ + $ERROR('#3: Number.NaN.prototype.toFixed(1) === "NaN"'); +} + +//CHECK#4 +if(Number.NaN.toFixed(1.1) !== "NaN"){ + $ERROR('#4: Number.NaN.toFixed(1.1) === "NaN"'); +} + +//CHECK#5 +if(Number.NaN.toFixed(0.9) !== "NaN"){ + $ERROR('#5: Number.NaN.toFixed(0.9) === "NaN"'); +} + +//CHECK#6 +if(Number.NaN.toFixed("1") !== "NaN"){ + $ERROR('#6: Number.NaN.toFixed("1") === "NaN"'); +} + +//CHECK#7 +if(Number.NaN.toFixed("1.1") !== "NaN"){ + $ERROR('#7: Number.NaN.toFixed("1.1") === "NaN"'); +} + +//CHECK#8 +if(Number.NaN.toFixed("0.9") !== "NaN"){ + $ERROR('#8: Number.NaN.toFixed("0.9") === "NaN"'); +} + +//CHECK#9 +if(Number.NaN.toFixed(Number.NaN) !== "NaN"){ + $ERROR('#9: Number.NaN.toFixed(Number.NaN) === "NaN"'); +} + +//CHECK#10 +if(Number.NaN.toFixed("some string") !== "NaN"){ + $ERROR('#9: Number.NaN.toFixed("some string") === "NaN"'); +} + +//CHECK#10 +try{ + s = Number.NaN.toFixed(Number.POSITIVE_INFINITY); + $ERROR('#10: Number.NaN.toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not return NaN'); +} +catch(e){ + if(!(e instanceof RangeError)){ + $ERROR('#10: Number.NaN.toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not '+e); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A1.4_T01.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A1.4_T01.js new file mode 100644 index 000000000..1c28cd4e5 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A1.4_T01.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.5_A1.4_T01; + * @section: 15.7.4.5; + * @assertion: Step 9: If x >= 10^21, let m = ToString(x); + * @description: x is 10^21; +*/ + +//CHECK#1 +if((new Number(1e21)).toFixed() !== String(1e21)){ + $ERROR('#1: (new Number(1e21)).prototype.toFixed() === String(1e21)'); +} + +//CHECK#2 +if((new Number(1e21)).toFixed(0) !== String(1e21)){ + $ERROR('#2: (new Number(1e21)).prototype.toFixed(0) === String(1e21)'); +} + +//CHECK#3 +if((new Number(1e21)).toFixed(1) !== String(1e21)){ + $ERROR('#3: (new Number(1e21)).prototype.toFixed(1) === String(1e21)'); +} + +//CHECK#4 +if((new Number(1e21)).toFixed(1.1) !== String(1e21)){ + $ERROR('#4: (new Number(1e21)).toFixed(1.1) === String(1e21)'); +} + +//CHECK#5 +if((new Number(1e21)).toFixed(0.9) !== String(1e21)){ + $ERROR('#5: (new Number(1e21)).toFixed(0.9) === String(1e21)'); +} + +//CHECK#6 +if((new Number(1e21)).toFixed("1") !== String(1e21)){ + $ERROR('#6: (new Number(1e21)).toFixed("1") === String(1e21)'); +} + +//CHECK#7 +if((new Number(1e21)).toFixed("1.1") !== String(1e21)){ + $ERROR('#7: (new Number(1e21)).toFixed("1.1") === String(1e21)'); +} + +//CHECK#8 +if((new Number(1e21)).toFixed("0.9") !== String(1e21)){ + $ERROR('#8: (new Number(1e21)).toFixed("0.9") === String(1e21)'); +} + +//CHECK#9 +if((new Number(1e21)).toFixed(Number.NaN) !== String(1e21)){ + $ERROR('#9: (new Number(1e21)).toFixed(Number.NaN) === String(1e21)'); +} + +//CHECK#10 +if((new Number(1e21)).toFixed("some string") !== String(1e21)){ + $ERROR('#9: (new Number(1e21)).toFixed("some string") === String(1e21)'); +} + +//CHECK#10 +try{ + s = (new Number(1e21)).toFixed(Number.POSITIVE_INFINITY); + $ERROR('#10: (new Number(1e21)).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not return NaN'); +} +catch(e){ + if(!(e instanceof RangeError)){ + $ERROR('#10: (new Number(1e21)).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not '+e); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A2_T01.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A2_T01.js new file mode 100644 index 000000000..3426da074 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/15.7.4.5_Number.prototype.toFixed/S15.7.4.5_A2_T01.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4.5_A2_T01; + * @section: 15.7.4.5; + * @assertion: The length property of the toFixed method is 1; + * @description: Checking Number prototype itself; +*/ + +//CHECK#1 +if(Number.prototype.toFixed.hasOwnProperty("length") !== true){ + $ERROR('#1: The length property of the toFixed method is 1'); +} + +//CHECK#2 +if(Number.prototype.toFixed.length !== 1){ + $ERROR('#2: The length property of the toFixed method is 1'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A1.js new file mode 100644 index 000000000..ab5c760ab --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A1.js @@ -0,0 +1,28 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4_A1; + * @section: 15.7.4; + * @assertion: The Number prototype object is itself a Number object + * (its [[Class]] is "Number") whose value is +0; + * @description: Checking type and value of Number.prototype property; +*/ + +//CHECK#1 +if (typeof Number.prototype !== "object") { + $ERROR('#1: typeof Number.prototype === "object"'); +} + +//CHECK#2 +if (Number.prototype != 0) { + $ERROR('#2: Number.prototype == +0'); +} else if( 1/Number.prototype != Number.POSITIVE_INFINITY){ + $ERROR('#2: Number.prototype == +0'); +} + +delete Number.prototype.toString; + +if (Number.prototype.toString() !== "[object Number]") { + $ERROR('#3: The [[Class]] property of the Number prototype object is set to "Number"'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A2.js new file mode 100644 index 000000000..62f2025f2 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A2.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4_A2; + * @section: 15.7.4; + * @assertion: The value of the internal [[Prototype]] property of the Number + * prototype object is the Object prototype object; + * @description: Checking Object.prototype.isPrototypeOf(Number.prototype); +*/ + +//CHECK#1 +if (!Object.prototype.isPrototypeOf(Number.prototype)) { + $ERROR('#1: Object prototype object is the prototype of Number prototype object'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.1.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.1.js new file mode 100644 index 000000000..1f7c32adf --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.1.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4_A3.1; + * @section: 15.7.4; + * @assertion: The Number prototype object has the property constructor; + * @description: The test uses hasOwnProperty() method; +*/ + +//CHECK#1 +if(Number.prototype.hasOwnProperty("constructor") !== true){ + $ERROR('#1: The Number prototype object has the property constructor'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.2.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.2.js new file mode 100644 index 000000000..b87d8e441 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.2.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4_A3.2; + * @section: 15.7.4; + * @assertion: The Number prototype object has the property toString; + * @description: The test uses hasOwnProperty() method; +*/ + +//CHECK#1 +if(Number.prototype.hasOwnProperty("toString") !== true){ + $ERROR('#1: The Number prototype object has the property toString'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.3.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.3.js new file mode 100644 index 000000000..e93393fc6 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.3.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4_A3.3; + * @section: 15.7.4; + * @assertion: The Number prototype object has the property toLocaleString; + * @description: The test uses hasOwnProperty() method; +*/ + +//CHECK#1 +if(Number.prototype.hasOwnProperty("toLocaleString") !== true){ + $ERROR('#1: The Number prototype object has the property toLocaleString'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.4.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.4.js new file mode 100644 index 000000000..ecb000e19 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.4.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4_A3.4; + * @section: 15.7.4; + * @assertion: The Number prototype object has the property valueOf; + * @description: The test uses hasOwnProperty() method; +*/ + +//CHECK#1 +if(Number.prototype.hasOwnProperty("valueOf") !== true){ + $ERROR('#1: The Number prototype object has the property valueOf'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.5.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.5.js new file mode 100644 index 000000000..aee9eb019 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.5.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4_A3.5; + * @section: 15.7.4; + * @assertion: The Number prototype object has the property toFixed; + * @description: The test uses hasOwnProperty() method; +*/ + +//CHECK#1 +if(Number.prototype.hasOwnProperty("toFixed") !== true){ + $ERROR('#1: The Number prototype object has the property toFixed'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.6.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.6.js new file mode 100644 index 000000000..a60c3c8ba --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.6.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4_A3.6; + * @section: 15.7.4; + * @assertion: The Number prototype object has the property toExponential; + * @description: The test uses hasOwnProperty() method; +*/ + +//CHECK#1 +if(Number.prototype.hasOwnProperty("toExponential") !== true){ + $ERROR('#1: The Number prototype object has the property toExponential'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.7.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.7.js new file mode 100644 index 000000000..0e9e26554 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.4_Properties_of_the_Number_Prototype_Object/S15.7.4_A3.7.js @@ -0,0 +1,15 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.7.4_A3.7; + * @section: 15.7.4; + * @assertion: The Number prototype object has the property toPrecision; + * @description: The test uses hasOwnProperty() method; +*/ + +//CHECK#1 +if(Number.prototype.hasOwnProperty("toPrecision") !== true){ + $ERROR('#1: The Number prototype object has the property toPrecision'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T01.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T01.js new file mode 100644 index 000000000..fe3836f09 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T01.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. + +/** + * @name: S15.7.5_A1_T01; + * @section: 15.7.5; + * @assertion: Number instances have no special properties beyond those + * inherited from the Number prototype object; + * @description: Checking property constructor; +*/ + +//CHECK#1 +if((new Number()).hasOwnProperty("constructor") !== false){ + $ERROR('#1: Number instance must have no special property "constructor"'); +} + +//CHECK#2 +if((new Number()).constructor !== Number.prototype.constructor){ + $ERROR('#2: Number instance property "constructor" must be inherited from Number prototype object'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T02.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T02.js new file mode 100644 index 000000000..f204adf64 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T02.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. + +/** + * @name: S15.7.5_A1_T02; + * @section: 15.7.5; + * @assertion: Number instances have no special properties beyond those + * inherited from the Number prototype object; + * @description: Checking property toString; +*/ + +//CHECK#1 +if((new Number()).hasOwnProperty("toString") !== false){ + $ERROR('#1: Number instance must have no special property "toString"'); +} + +//CHECK#2 +if((new Number()).toString !== Number.prototype.toString){ + $ERROR('#2: Number instance property "toString" must be inherited from Number prototype object'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T03.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T03.js new file mode 100644 index 000000000..915d9482a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T03.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. + +/** + * @name: S15.7.5_A1_T03; + * @section: 15.7.5; + * @assertion: Number instances have no special properties beyond those + * inherited from the Number prototype object; + * @description: Checking property toLocaleString; +*/ + +//CHECK#1 +if((new Number()).hasOwnProperty("toLocaleString") !== false){ + $ERROR('#1: Number instance must have no special property "toLocaleString"'); +} + +//CHECK#2 +if((new Number()).toLocaleString !== Number.prototype.toLocaleString){ + $ERROR('#2: Number instance property "toLocaleString" must be inherited from Number prototype object'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T04.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T04.js new file mode 100644 index 000000000..a950ab5ff --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T04.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. + +/** + * @name: S15.7.5_A1_T04; + * @section: 15.7.5; + * @assertion: Number instances have no special properties beyond those + * inherited from the Number prototype object; + * @description: Checking property valueOf; +*/ + +//CHECK#1 +if((new Number()).hasOwnProperty("valueOf") !== false){ + $ERROR('#1: Number instance must have no special property "valueOf"'); +} + +//CHECK#2 +if((new Number()).valueOf !== Number.prototype.valueOf){ + $ERROR('#2: Number instance property "valueOf" must be inherited from Number prototype object'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T05.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T05.js new file mode 100644 index 000000000..337b8cba3 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T05.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. + +/** + * @name: S15.7.5_A1_T05; + * @section: 15.7.5; + * @assertion: Number instances have no special properties beyond those + * inherited from the Number prototype object; + * @description: Checking property toFixed; +*/ + +//CHECK#1 +if((new Number()).hasOwnProperty("toFixed") !== false){ + $ERROR('#1: Number instance must have no special property "toFixed"'); +} + +//CHECK#2 +if((new Number()).toFixed !== Number.prototype.toFixed){ + $ERROR('#2: Number instance property "toFixed" must be inherited from Number prototype object'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T06.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T06.js new file mode 100644 index 000000000..5f0bf3417 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T06.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. + +/** + * @name: S15.7.5_A1_T06; + * @section: 15.7.5; + * @assertion: Number instances have no special properties beyond those + * inherited from the Number prototype object; + * @description: Checking property toExponential; +*/ + +//CHECK#1 +if((new Number()).hasOwnProperty("toExponential") !== false){ + $ERROR('#1: Number instance must have no special property "toExponential"'); +} + +//CHECK#2 +if((new Number()).toExponential !== Number.prototype.toExponential){ + $ERROR('#2: Number instance property "toExponential" must be inherited from Number prototype object'); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T07.js b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T07.js new file mode 100644 index 000000000..4f7b3942f --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/15_Native_ECMA_Script_Objects/15.7_Number_Objects/15.7.5_Properties_of_Number_Instances/S15.7.5_A1_T07.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. + +/** + * @name: S15.7.5_A1_T07; + * @section: 15.7.5; + * @assertion: Number instances have no special properties beyond those + * inherited from the Number prototype object; + * @description: Checking property toPrecision; +*/ + +//CHECK#1 +if((new Number()).hasOwnProperty("toPrecision") !== false){ + $ERROR('#1: Number instance must have no special property "toPrecision"'); +} + +//CHECK#2 +if((new Number()).toPrecision !== Number.prototype.toPrecision){ + $ERROR('#2: Number instance property "toPrecision" must be inherited from Number prototype object'); +} + |