diff options
Diffstat (limited to 'external/contributions/Google/sputniktests/tests/Regression')
25 files changed, 794 insertions, 0 deletions
diff --git a/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T1.js b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T1.js new file mode 100644 index 000000000..8718cfd97 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T1.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_R2.3_T1; + * @section: 11.13.2; + * @description: Result is not ToNumber(Undefined) * ToNumber(AssignmentExpression); +*/ + +//CHECK#1 +try { + x *= new String("-1"); + if (isNaN(x) === true) { + $ERROR('#1: Result is not ToNumber32(Undefined) * ToNumber32(AssignmentExpression)'); + } else { + $ERROR('#1: x *= new String("-1") throw ReferenceError'); + } +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1: x *= new String("-1") throw ReferenceError'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T10.js b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T10.js new file mode 100644 index 000000000..741be780a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T10.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_R2.3_T10; + * @section: 11.13.2; + * @description: Result is not ToInt32(Undefined) ^ ToInt32(AssignmentExpression); +*/ + +//CHECK#1 +try { + x ^= new String("-1"); + if (x === -1) { + $ERROR('#1: Result is not ToInt32(Undefined) ^ ToInt32(AssignmentExpression)'); + } else { + $ERROR('#1: x ^= new String("-1") throw ReferenceError'); + } +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1: x ^= new String("-1") throw ReferenceError'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T11.js b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T11.js new file mode 100644 index 000000000..b820148c0 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T11.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_R2.3_T11; + * @section: 11.13.2; + * @description: Result is not ToInt32(Undefined) | ToInt32(AssignmentExpression); +*/ + +//CHECK#1 +try { + x |= new String("-1"); + if (x === -1) { + $ERROR('#1: Result is not ToInt32(Undefined) | ToInt32(AssignmentExpression)'); + } else { + $ERROR('#1: x |= new String("-1") throw ReferenceError'); + } +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1: x |= new String("-1") throw ReferenceError'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T2.js b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T2.js new file mode 100644 index 000000000..b654bc1c1 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T2.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_R2.3_T2; + * @section: 11.13.2; + * @description: Result is not ToNumber(Undefined) / ToNumber(AssignmentExpression); +*/ + +//CHECK#1 +try { + x /= new String("-1"); + if (isNaN(x) === true) { + $ERROR('#1: Result is not ToNumber32(Undefined) / ToNumber32(AssignmentExpression)'); + } else { + $ERROR('#1: x /= new String("-1") throw ReferenceError'); + } +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1: x /= new String("-1") throw ReferenceError'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T3.js b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T3.js new file mode 100644 index 000000000..e0498da11 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T3.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_R2.3_T3; + * @section: 11.13.2; + * @description: Result is not ToNumber(Undefined) % ToNumber(AssignmentExpression); +*/ + +//CHECK#1 +try { + x %= new String("-1"); + if (isNaN(x) === true) { + $ERROR('#1: Result is not ToNumber32(Undefined) % ToNumber32(AssignmentExpression)'); + } else { + $ERROR('#1: x %= new String("-1") throw ReferenceError'); + } +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1: x %= new String("-1") throw ReferenceError'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T4.js b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T4.js new file mode 100644 index 000000000..b2674c0a5 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T4.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_R2.3_T4; + * @section: 11.13.2; + * @description: Result is not ToNumber(Undefined) + ToNumber(AssignmentExpression); +*/ + +//CHECK#1 +try { + x += new String("-1"); + if (isNaN(x) === true) { + $ERROR('#1: Result is not ToNumber32(Undefined) + ToNumber32(AssignmentExpression)'); + } else { + $ERROR('#1: x += new String("-1") throw ReferenceError'); + } +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1: x += new String("-1") throw ReferenceError'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T5.js b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T5.js new file mode 100644 index 000000000..b15c58483 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T5.js @@ -0,0 +1,24 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_R2.3_T5; + * @section: 11.13.2; + * @description: Result is not ToNumber(Undefined) - ToNumber(AssignmentExpression); +*/ + +//CHECK#1 +try { + x -= new String("-1"); + if (isNaN(x) === true) { + $ERROR('#1: Result is not ToNumber32(Undefined) - ToNumber32(AssignmentExpression)'); + } else { + $ERROR('#1: x -= new String("-1") throw ReferenceError'); + } +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1: x -= new String("-1") throw ReferenceError'); + } +} + diff --git a/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T6.js b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T6.js new file mode 100644 index 000000000..935392e2c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T6.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_R2.3_T6; + * @section: 11.13.2; + * @description: Result is not ToInt32(Undefined) << ToInt32(AssignmentExpression); +*/ + +//CHECK#1 +try { + x <<= new String("-1"); + if (x === 0) { + $ERROR('#1: Result is not ToInt32(Undefined) << ToInt32(AssignmentExpression)'); + } else { + $ERROR('#1: x <<= new String("-1") throw ReferenceError'); + } +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1: x <<= new String("-1") throw ReferenceError'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T7.js b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T7.js new file mode 100644 index 000000000..23294e7ec --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T7.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_R2.3_T7; + * @section: 11.13.2; + * @description: Result is not ToInt32(Undefined) >> ToInt32(AssignmentExpression); +*/ + +//CHECK#1 +try { + x >>= new String("-1"); + if (x === 0) { + $ERROR('#1: Result is not ToInt32(Undefined) >> ToInt32(AssignmentExpression)'); + } else { + $ERROR('#1: x >>= new String("-1") throw ReferenceError'); + } +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1: x >>= new String("-1") throw ReferenceError'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T8.js b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T8.js new file mode 100644 index 000000000..cf0140762 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T8.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_R2.3_T8; + * @section: 11.13.2; + * @description: Result is not ToInt32(Undefined) >>> ToInt32(AssignmentExpression); +*/ + +//CHECK#1 +try { + x >>>= new String("-1"); + if (x === 0) { + $ERROR('#1: Result is not ToInt32(Undefined) >>> ToInt32(AssignmentExpression)'); + } else { + $ERROR('#1: x >>>= new String("-1") throw ReferenceError'); + } +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1: x >>>= new String("-1") throw ReferenceError'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T9.js b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T9.js new file mode 100644 index 000000000..6c9963e95 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S11.13.2_R2.3_T9.js @@ -0,0 +1,23 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_R2.3_T9; + * @section: 11.13.2; + * @description: Result is not ToInt32(Undefined) & ToInt32(AssignmentExpression); +*/ + +//CHECK#1 +try { + x &= new String("-1"); + if (x === 0) { + $ERROR('#1: Result is not ToInt32(Undefined) & ToInt32(AssignmentExpression)'); + } else { + $ERROR('#1: x &= new String("-1") throw ReferenceError'); + } +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1: x &= new String("-1") throw ReferenceError'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S12.6.4_R1.js b/external/contributions/Google/sputniktests/tests/Regression/S12.6.4_R1.js new file mode 100644 index 000000000..2a3a0de7d --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S12.6.4_R1.js @@ -0,0 +1,45 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S12.6.4_R1; + * @section: 12.6.4, 9.9; + * @description: The for-in statement must not throw TypeError for undefined + * values, cause it's a bug in the Standard; +*/ + +// CHECK#1 +try{ + var x1 = 1; + for(var y1 in undefined) x1 = 2; + if (x1 === 1) { + $PRINT("#1: passed"); + } else { + $ERROR("#1: The for-in statement must not fullfill, the value was changed"); + } +} +catch(e){ + if(e instanceof TypeError){ + $ERROR("#1: The for-in statement must not throw TypeError for undefined values, cause it's a bug in the Standard"); + } else { + $ERROR("#1: The for-in statement must not throw Error for undefined values, cause it's a bug in the Standard"); + } +} + +// CHECK#2 +try{ + var x2 = 1; + for(var y2 in this.foo) x2 = 2; + if (x2 === 1) { + $PRINT("#1: passed"); + } else { + $ERROR("#1: The for-in statement must not fullfill, the value was changed"); + } +} +catch(e){ + if(e instanceof TypeError){ + $ERROR("#1: The for-in statement must not throw TypeError for undefined values, cause it's a bug in the Standard"); + } else { + $ERROR("#1: The for-in statement must not throw Error for undefined values, cause it's a bug in the Standard"); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S12.6.4_R2.js b/external/contributions/Google/sputniktests/tests/Regression/S12.6.4_R2.js new file mode 100644 index 000000000..8be5846ca --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S12.6.4_R2.js @@ -0,0 +1,45 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S12.6.4_R2; + * @section: 12.6.4, 9.9; + * @description: The for-in statement must not throw TypeError for null + * values, cause it's a bug in the Standard; +*/ + +// CHECK#1 +try{ + var x1 = 1; + for(var y1 in null) x1 = 2; + if (x1 === 1) { + $PRINT("#1: passed"); + } else { + $ERROR("#1: The for-in statement must not fullfill, the value was changed"); + } +} +catch(e){ + if(e instanceof TypeError){ + $ERROR("#1: The for-in statement must not throw TypeError for null values, cause it's a bug in the Standard"); + } else { + $ERROR("#1: The for-in statement must not throw Error for null values, cause it's a bug in the Standard"); + } +} + +// CHECK#2 +try{ + var x2 = 1; + for(var y2 in 'bbb'.match(/aaa/)) x2 = 2; + if (x2 === 1) { + $PRINT("#1: passed"); + } else { + $ERROR("#1: The for-in statement must not fullfill, the value was changed"); + } +} +catch(e){ + if(e instanceof TypeError){ + $ERROR("#1: The for-in statement must not throw TypeError for null values, cause it's a bug in the Standard"); + } else { + $ERROR("#1: The for-in statement must not throw Error for null values, cause it's a bug in the Standard"); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R1.js b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R1.js new file mode 100644 index 000000000..682575171 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R1.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.1.1.1_R1; + * @section: 15.1.1.1, 9.3; + * @description: The NaN is not ReadOnly, check Number for resettability of result; +*/ + +// CHECK#1 +NaN = true; +Number(); +if (NaN !== true) { + NaN = true; + Number(); + if (NaN === true) { + $ERROR('#1: Resettability of result'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R2.1.js b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R2.1.js new file mode 100644 index 000000000..1a90460b0 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R2.1.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.1.1.1_R2.1; + * @section: 15.1.1.1, 15.1.2, 15.1.3; + * @description: The NaN is not ReadOnly, check isNaN Functions that use ToNumber; +*/ + +// CHECK#1 +NaN = 1; +if (isNaN(NaN) !== false) { + $ERROR('#1: NaN = 1; isNaN(NaN) === false'); +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R2.2.js b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R2.2.js new file mode 100644 index 000000000..f9c18f33e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R2.2.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.1.1.1_R2.2; + * @section: 15.1.1.1, 15.1.2, 15.1.3; + * @description: The NaN is not ReadOnly, check isFinite Functions that use ToNumber; +*/ + +// CHECK#1 +NaN = 1; +if (isFinite(NaN) !== true) { + $ERROR('#1: NaN = 1; isFinite(NaN) === true'); +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R3.1.js b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R3.1.js new file mode 100644 index 000000000..fc3bfbe25 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R3.1.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.1.1.1_R3.1; + * @section: 15.1.1.1, 15.1.2.4; + * @description: The NaN is not ReadOnly, check isNaN for resettability of result; +*/ + +// CHECK#1 +NaN = 1; +isNaN(); +if (NaN !== 1) { + NaN = 1; + isNaN(); + if (NaN === 1) { + $ERROR('#1: isNaN resettability of result for NaN value'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R3.2.js b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R3.2.js new file mode 100644 index 000000000..4a3d88a35 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R3.2.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.1.1.1_R3.2; + * @section: 15.1.1.1, 15.1.2.4; + * @description: The NaN is not ReadOnly, check isFinite for resettability of result +*/ + +// CHECK#1 +NaN = 1; +isFinite(); +if (NaN !== 1) { + NaN = 1; + isFinite(); + if (NaN === 1) { + $ERROR('#1: isFinite resettability of result for NaN value'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R4.js b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R4.js new file mode 100644 index 000000000..1470dddd5 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.1_R4.js @@ -0,0 +1,140 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.1.1.1_R4; + * @section: 15.1.1.1, 11; + * @description: The NaN is not ReadOnly, check Operators that use ToNumber; +*/ + +// CHECK#1 +NaN = true; +NaN++; +if (NaN !== 2) { + $ERROR('#1: NaN = true; NaN++; NaN === 2'); +} + +// CHECK#2 +NaN = true; +NaN--; +if (NaN !== 0) { + $ERROR('#2: NaN = true; NaN--; NaN === 0'); +} + +// CHECK#3 +NaN = true; +++NaN; +if (NaN !== 2) { + $ERROR('#3: NaN = true; ++NaN; NaN === 2'); +} + +// CHECK#4 +NaN = true; +--NaN; +if (NaN !== 0) { + $ERROR('#4: NaN = true; --NaN; NaN === 0'); +} + +// CHECK#5 +NaN = true; ++NaN; +if (NaN !== true) { + $ERROR('#5: NaN = true; +NaN; NaN === true'); + +} +// CHECK#6 +NaN = true; +-NaN; +if (NaN !== true) { + $ERROR('#6: NaN = true; -NaN; NaN === true'); +} +// CHECK#7 +NaN = true; +NaN * 1; +if (NaN !== true) { + $ERROR('#7: NaN = true; NaN * 1; NaN === true'); +} + +// CHECK#8 +NaN = true; +NaN / 1; +if (NaN !== true) { + $ERROR('#8: NaN = true; NaN / 1; NaN === true'); +} + +// CHECK#9 +NaN = true; +NaN % 1; +if (NaN !== true) { + $ERROR('#9: NaN = true; NaN % 1; NaN === true'); +} + +// CHECK#10 +NaN = true; +NaN + 1; +if (NaN !== true) { + $ERROR('#10: NaN = true; NaN + 1; NaN === true'); +} + +// CHECK#11 +NaN = true; +NaN - 1; +if (NaN !== true) { + $ERROR('#11: NaN = true; NaN - 1; NaN === true'); +} + +// CHECK#12 +NaN = true; +NaN > 1; +if (NaN !== true) { + $ERROR('#12: NaN = true; NaN > 1; NaN === true'); +} + +// CHECK#13 +NaN = true; +NaN < 1; +if (NaN !== true) { + $ERROR('#13: NaN = true; NaN < 1; NaN === true'); +} + +// CHECK#14 +NaN = true; +NaN >= 1; +if (NaN !== true) { + $ERROR('#14: NaN = true; NaN >= 1; NaN === true'); +} + +// CHECK#15 +NaN = true; +NaN <= 1; +if (NaN !== true) { + $ERROR('#15: NaN = true; NaN <= 1; NaN === true'); +} + +// CHECK#16 +NaN = true; +NaN == true; +if (NaN !== true) { + $ERROR('#16: NaN = true; NaN == true; NaN === true'); +} + +// CHECK#17 +NaN = true; +NaN != 1; +if (NaN !== true) { + $ERROR('#17: NaN = true; NaN != 1; NaN === true'); +} + +// CHECK#18 +NaN = true; +NaN === true; +if (NaN !== true) { + $ERROR('#18: NaN = true; NaN === true; NaN === true'); +} + +// CHECK#19 +NaN = true; +NaN !== true; +if (NaN !== true) { + $ERROR('#19: NaN = true; NaN !== true; NaN === true'); +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R1.js b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R1.js new file mode 100644 index 000000000..8e9a69ea6 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R1.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.1.1.2_R1; + * @section: 15.1.1.2, 9.3; + * @description: The Infinity is not ReadOnly, check Number for resettability of result; +*/ + +// CHECK#1 +Infinity = false; +Number(); +if (Infinity !== false) { + Infinity = false; + Number(); + if (Infinity === false) { + $ERROR('#1: Resettability of result'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R2.1.js b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R2.1.js new file mode 100644 index 000000000..4cabefc2b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R2.1.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.1.1.2_R2.1; + * @section: 15.1.1.2, 15.1.2, 15.1.3; + * @description: The Infinity is not ReadOnly, check isNaN Functions that use ToNumber; +*/ + +// CHECK#1 +Infinity = "string"; +if (isNaN(Infinity) !== true) { + $ERROR('#1: Infinity = "string"; isNaN(Infinity) === true'); +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R2.2.js b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R2.2.js new file mode 100644 index 000000000..4b75c98bb --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R2.2.js @@ -0,0 +1,14 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.1.1.2_R2.2; + * @section: 15.1.1.2, 15.1.2, 15.1.3; + * @description: The Infinity is not ReadOnly, check isFinite Functions that use ToNumber; +*/ + +// CHECK#1 +Infinity = 0; +if (isFinite(Infinity) !== true) { + $ERROR('#1: Infinity = 0; isFinite(Infinity) === true'); +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R3.1.js b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R3.1.js new file mode 100644 index 000000000..916559cc9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R3.1.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.1.1.2_R3.1; + * @section: 15.1.1.2, 15.1.2.4; + * @description: The Infinity is not ReadOnly, check isNaN for resettability of result; +*/ + +// CHECK#1 +Infinity = "0"; +isNaN(); +if (Infinity !== "0") { + Infinity = "0"; + isNaN(); + if (Infinity === "0") { + $ERROR('#1: isNaN resettability of result for Infinity value'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R3.2.js b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R3.2.js new file mode 100644 index 000000000..e34ae2e19 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R3.2.js @@ -0,0 +1,19 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.1.1.2_R3.2; + * @section: 15.1.1.2, 15.1.2.4; + * @description: The Infinity is not ReadOnly, check isFinite for resettability of result +*/ + +// CHECK#1 +Infinity = 0; +isFinite(); +if (Infinity !== 0) { + Infinity = 0; + isFinite(); + if (Infinity === 0) { + $ERROR('#1: isFinite resettability of result for Infinity value'); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R4.js b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R4.js new file mode 100644 index 000000000..aedca921e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Regression/S15.1.1.2_R4.js @@ -0,0 +1,140 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S15.1.1.2_R4; + * @section: 15.1.1.2, 11; + * @description: The Infinity is not ReadOnly, check Operators that use ToNumber; +*/ + +// CHECK#1 +Infinity = true; +Infinity++; +if (Infinity !== 2) { + $ERROR('#1: Infinity = true; Infinity++; Infinity === 2'); +} + +// CHECK#2 +Infinity = true; +Infinity--; +if (Infinity !== 0) { + $ERROR('#2: Infinity = true; Infinity--; Infinity === 0'); +} + +// CHECK#3 +Infinity = true; +++Infinity; +if (Infinity !== 2) { + $ERROR('#3: Infinity = true; ++Infinity; Infinity === 2'); +} + +// CHECK#4 +Infinity = true; +--Infinity; +if (Infinity !== 0) { + $ERROR('#4: Infinity = true; --Infinity; Infinity === 0'); +} + +// CHECK#5 +Infinity = true; ++Infinity; +if (Infinity !== true) { + $ERROR('#5: Infinity = true; +Infinity; Infinity === true'); + +} +// CHECK#6 +Infinity = true; +-Infinity; +if (Infinity !== true) { + $ERROR('#6: Infinity = true; -Infinity; Infinity === true'); +} +// CHECK#7 +Infinity = true; +Infinity * 1; +if (Infinity !== true) { + $ERROR('#7: Infinity = true; Infinity * 1; Infinity === true'); +} + +// CHECK#8 +Infinity = true; +Infinity / 1; +if (Infinity !== true) { + $ERROR('#8: Infinity = true; Infinity / 1; Infinity === true'); +} + +// CHECK#9 +Infinity = true; +Infinity % 1; +if (Infinity !== true) { + $ERROR('#9: Infinity = true; Infinity % 1; Infinity === true'); +} + +// CHECK#10 +Infinity = true; +Infinity + 1; +if (Infinity !== true) { + $ERROR('#10: Infinity = true; Infinity + 1; Infinity === true'); +} + +// CHECK#11 +Infinity = true; +Infinity - 1; +if (Infinity !== true) { + $ERROR('#11: Infinity = true; Infinity - 1; Infinity === true'); +} + +// CHECK#12 +Infinity = true; +Infinity > 1; +if (Infinity !== true) { + $ERROR('#12: Infinity = true; Infinity > 1; Infinity === true'); +} + +// CHECK#13 +Infinity = true; +Infinity < 1; +if (Infinity !== true) { + $ERROR('#13: Infinity = true; Infinity < 1; Infinity === true'); +} + +// CHECK#14 +Infinity = true; +Infinity >= 1; +if (Infinity !== true) { + $ERROR('#14: Infinity = true; Infinity >= 1; Infinity === true'); +} + +// CHECK#15 +Infinity = true; +Infinity <= 1; +if (Infinity !== true) { + $ERROR('#15: Infinity = true; Infinity <= 1; Infinity === true'); +} + +// CHECK#16 +Infinity = true; +Infinity == true; +if (Infinity !== true) { + $ERROR('#16: Infinity = true; Infinity == true; Infinity === true'); +} + +// CHECK#17 +Infinity = true; +Infinity != 1; +if (Infinity !== true) { + $ERROR('#17: Infinity = true; Infinity != 1; Infinity === true'); +} + +// CHECK#18 +Infinity = true; +Infinity === true; +if (Infinity !== true) { + $ERROR('#18: Infinity = true; Infinity === true; Infinity === true'); +} + +// CHECK#19 +Infinity = true; +Infinity !== true; +if (Infinity !== true) { + $ERROR('#19: Infinity = true; Infinity !== true; Infinity === true'); +} |