diff options
Diffstat (limited to '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')
46 files changed, 2335 insertions, 0 deletions
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); + } +} + |