diff options
Diffstat (limited to 'external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment')
220 files changed, 8785 insertions, 0 deletions
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T1.js new file mode 100644 index 000000000..49c929987 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T1.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S11.13.2_A1_T1; +* @section: 11.13.2; +* @assertion: White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed; +* @description: Checking by using eval, check operator is x *= y; +*/ + +//CHECK#1 +x = -1; +if ((eval("x\u0009*=\u0009-1")) !== 1) { + $ERROR('#1: x = -1; (x\\u0009*=\\u0009-1) === 1'); +} + +//CHECK#2 +x = -1; +if ((eval("x\u000B*=\u000B-1")) !== 1) { + $ERROR('#2: x = -1; (x\\u000B*=\\u000B-1) === 1'); +} + +//CHECK#3 +x = -1; +if ((eval("x\u000C*=\u000C-1")) !== 1) { + $ERROR('#3: x = -1; (x\\u000C*=\\u000C-1) === 1'); +} + +//CHECK#4 +x = -1; +if ((eval("x\u0020*=\u0020-1")) !== 1) { + $ERROR('#4: x = -1; (x\\u0020*=\\u0020-1) === 1'); +} + +//CHECK#5 +x = -1; +if ((eval("x\u00A0*=\u00A0-1")) !== 1) { + $ERROR('#5: x = -1; (x\\u00A0*=\\u00A0-1) === 1'); +} + +//CHECK#6 +x = -1; +if ((eval("x\u000A*=\u000A-1")) !== 1) { + $ERROR('#6: x = -1; (x\\u000A*=\\u000A-1) === 1'); +} + +//CHECK#7 +x = -1; +if ((eval("x\u000D*=\u000D-1")) !== 1) { + $ERROR('#7: x = -1; (x\\u000D*=\\u000D-1) === 1'); +} + +//CHECK#8 +x = -1; +if ((eval("x\u2028*=\u2028-1")) !== 1) { + $ERROR('#8: x = -1; (x\\u2028*=\\u2028-1) === 1'); +} + +//CHECK#9 +x = -1; +if ((eval("x\u2029*=\u2029-1")) !== 1) { + $ERROR('#9: x = -1; (x\\u2029*=\\u2029-1) === 1'); +} + + +//CHECK#10 +x = -1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029*=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-1")) !== 1) { + $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029*=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1) === 1'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T10.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T10.js new file mode 100644 index 000000000..cbbee8049 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T10.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S11.13.2_A1_T10; +* @section: 11.13.2; +* @assertion: White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed; +* @description: Checking by using eval, check operator is x ^= y; +*/ + +//CHECK#1 +x = 1; +if ((eval("x\u0009^=\u00091")) !== 0) { + $ERROR('#1: x = 1; (x\\u0009^=\\u00091) === 0'); +} + +//CHECK#2 +x = 1; +if ((eval("x\u000B^=\u000B1")) !== 0) { + $ERROR('#2: x = 1; (x\\u000B^=\\u000B1) === 0'); +} + +//CHECK#3 +x = 1; +if ((eval("x\u000C^=\u000C1")) !== 0) { + $ERROR('#3: x = 1; (x\\u000C^=\\u000C1) === 0'); +} + +//CHECK#4 +x = 1; +if ((eval("x\u0020^=\u00201")) !== 0) { + $ERROR('#4: x = 1; (x\\u0020^=\\u00201) === 0'); +} + +//CHECK#5 +x = 1; +if ((eval("x\u00A0^=\u00A01")) !== 0) { + $ERROR('#5: x = 1; (x\\u00A0^=\\u00A01) === 0'); +} + +//CHECK#6 +x = 1; +if ((eval("x\u000A^=\u000A1")) !== 0) { + $ERROR('#6: x = 1; (x\\u000A^=\\u000A1) === 0'); +} + +//CHECK#7 +x = 1; +if ((eval("x\u000D^=\u000D1")) !== 0) { + $ERROR('#7: x = 1; (x\\u000D^=\\u000D1) === 0'); +} + +//CHECK#8 +x = 1; +if ((eval("x\u2028^=\u20281")) !== 0) { + $ERROR('#8: x = 1; (x\\u2028^=\\u20281) === 0'); +} + +//CHECK#9 +x = 1; +if ((eval("x\u2029^=\u20291")) !== 0) { + $ERROR('#9: x = 1; (x\\u2029^=\\u20291) === 0'); +} + + +//CHECK#10 +x = 1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029^=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 0) { + $ERROR('#10: x = 1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029^=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 0'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T11.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T11.js new file mode 100644 index 000000000..a3639e7aa --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T11.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S11.13.2_A1_T11; +* @section: 11.13.2; +* @assertion: White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed; +* @description: Checking by using eval, check operator is x |= y; +*/ + +//CHECK#1 +x = 0; +if ((eval("x\u0009|=\u00091")) !== 1) { + $ERROR('#1: x = 0; (x\\u0009|=\\u00091) === 1'); +} + +//CHECK#2 +x = 0; +if ((eval("x\u000B|=\u000B1")) !== 1) { + $ERROR('#2: x = 0; (x\\u000B|=\\u000B1) === 1'); +} + +//CHECK#3 +x = 0; +if ((eval("x\u000C|=\u000C1")) !== 1) { + $ERROR('#3: x = 0; (x\\u000C|=\\u000C1) === 1'); +} + +//CHECK#4 +x = 0; +if ((eval("x\u0020|=\u00201")) !== 1) { + $ERROR('#4: x = 0; (x\\u0020|=\\u00201) === 1'); +} + +//CHECK#5 +x = 0; +if ((eval("x\u00A0|=\u00A01")) !== 1) { + $ERROR('#5: x = 0; (x\\u00A0|=\\u00A01) === 1'); +} + +//CHECK#6 +x = 0; +if ((eval("x\u000A|=\u000A1")) !== 1) { + $ERROR('#6: x = 0; (x\\u000A|=\\u000A1) === 1'); +} + +//CHECK#7 +x = 0; +if ((eval("x\u000D|=\u000D1")) !== 1) { + $ERROR('#7: x = 0; (x\\u000D|=\\u000D1) === 1'); +} + +//CHECK#8 +x = 0; +if ((eval("x\u2028|=\u20281")) !== 1) { + $ERROR('#8: x = 0; (x\\u2028|=\\u20281) === 1'); +} + +//CHECK#9 +x = 0; +if ((eval("x\u2029|=\u20291")) !== 1) { + $ERROR('#9: x = 0; (x\\u2029|=\\u20291) === 1'); +} + + +//CHECK#10 +x = 0; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029|=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 1) { + $ERROR('#10: x = 0; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029|=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 1'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T2.js new file mode 100644 index 000000000..75fde9ee4 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T2.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S11.13.2_A1_T2; +* @section: 11.13.2; +* @assertion: White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed; +* @description: Checking by using eval, check operator is x /= y; +*/ + +//CHECK#1 +x = -1; +if ((eval("x\u0009/=\u0009-1")) !== 1) { + $ERROR('#1: x = -1; (x\\u0009/=\\u0009-1) === 1'); +} + +//CHECK#2 +x = -1; +if ((eval("x\u000B/=\u000B-1")) !== 1) { + $ERROR('#2: x = -1; (x\\u000B/=\\u000B-1) === 1'); +} + +//CHECK#3 +x = -1; +if ((eval("x\u000C/=\u000C-1")) !== 1) { + $ERROR('#3: x = -1; (x\\u000C/=\\u000C-1) === 1'); +} + +//CHECK#4 +x = -1; +if ((eval("x\u0020/=\u0020-1")) !== 1) { + $ERROR('#4: x = -1; (x\\u0020/=\\u0020-1) === 1'); +} + +//CHECK#5 +x = -1; +if ((eval("x\u00A0/=\u00A0-1")) !== 1) { + $ERROR('#5: x = -1; (x\\u00A0/=\\u00A0-1) === 1'); +} + +//CHECK#6 +x = -1; +if ((eval("x\u000A/=\u000A-1")) !== 1) { + $ERROR('#6: x = -1; (x\\u000A/=\\u000A-1) === 1'); +} + +//CHECK#7 +x = -1; +if ((eval("x\u000D/=\u000D-1")) !== 1) { + $ERROR('#7: x = -1; (x\\u000D/=\\u000D-1) === 1'); +} + +//CHECK#8 +x = -1; +if ((eval("x\u2028/=\u2028-1")) !== 1) { + $ERROR('#8: x = -1; (x\\u2028/=\\u2028-1) === 1'); +} + +//CHECK#9 +x = -1; +if ((eval("x\u2029/=\u2029-1")) !== 1) { + $ERROR('#9: x = -1; (x\\u2029/=\\u2029-1) === 1'); +} + + +//CHECK#10 +x = -1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029/=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-1")) !== 1) { + $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029/=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1) === 1'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T3.js new file mode 100644 index 000000000..6b8381441 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T3.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S11.13.2_A1_T3; +* @section: 11.13.2; +* @assertion: White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed; +* @description: Checking by using eval, check operator is x %= y; +*/ + +//CHECK#1 +x = -1; +if ((eval("x\u0009%=\u0009-1")) !== 0) { + $ERROR('#1: x = -1; (x\\u0009%=\\u0009-1) === 0'); +} + +//CHECK#2 +x = -1; +if ((eval("x\u000B%=\u000B-1")) !== 0) { + $ERROR('#2: x = -1; (x\\u000B%=\\u000B-1) === 0'); +} + +//CHECK#3 +x = -1; +if ((eval("x\u000C%=\u000C-1")) !== 0) { + $ERROR('#3: x = -1; (x\\u000C%=\\u000C-1) === 0'); +} + +//CHECK#4 +x = -1; +if ((eval("x\u0020%=\u0020-1")) !== 0) { + $ERROR('#4: x = -1; (x\\u0020%=\\u0020-1) === 0'); +} + +//CHECK#5 +x = -1; +if ((eval("x\u00A0%=\u00A0-1")) !== 0) { + $ERROR('#5: x = -1; (x\\u00A0%=\\u00A0-1) === 0'); +} + +//CHECK#6 +x = -1; +if ((eval("x\u000A%=\u000A-1")) !== 0) { + $ERROR('#6: x = -1; (x\\u000A%=\\u000A-1) === 0'); +} + +//CHECK#7 +x = -1; +if ((eval("x\u000D%=\u000D-1")) !== 0) { + $ERROR('#7: x = -1; (x\\u000D%=\\u000D-1) === 0'); +} + +//CHECK#8 +x = -1; +if ((eval("x\u2028%=\u2028-1")) !== 0) { + $ERROR('#8: x = -1; (x\\u2028%=\\u2028-1) === 0'); +} + +//CHECK#9 +x = -1; +if ((eval("x\u2029%=\u2029-1")) !== 0) { + $ERROR('#9: x = -1; (x\\u2029%=\\u2029-1) === 0'); +} + + +//CHECK#10 +x = -1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029%=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-1")) !== 0) { + $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029%=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1) === 0'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T4.js new file mode 100644 index 000000000..8c31a7624 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T4.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S11.13.2_A1_T4; +* @section: 11.13.2; +* @assertion: White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed; +* @description: Checking by using eval, check operator is x += y; +*/ + +//CHECK#1 +x = -1; +if ((eval("x\u0009+=\u0009-1")) !== -2) { + $ERROR('#1: x = -1; (x\\u0009+=\\u0009-1) === -2'); +} + +//CHECK#2 +x = -1; +if ((eval("x\u000B+=\u000B-1")) !== -2) { + $ERROR('#2: x = -1; (x\\u000B+=\\u000B-1) === -2'); +} + +//CHECK#3 +x = -1; +if ((eval("x\u000C+=\u000C-1")) !== -2) { + $ERROR('#3: x = -1; (x\\u000C+=\\u000C-1) === -2'); +} + +//CHECK#4 +x = -1; +if ((eval("x\u0020+=\u0020-1")) !== -2) { + $ERROR('#4: x = -1; (x\\u0020+=\\u0020-1) === -2'); +} + +//CHECK#5 +x = -1; +if ((eval("x\u00A0+=\u00A0-1")) !== -2) { + $ERROR('#5: x = -1; (x\\u00A0+=\\u00A0-1) === -2'); +} + +//CHECK#6 +x = -1; +if ((eval("x\u000A+=\u000A-1")) !== -2) { + $ERROR('#6: x = -1; (x\\u000A+=\\u000A-1) === -2'); +} + +//CHECK#7 +x = -1; +if ((eval("x\u000D+=\u000D-1")) !== -2) { + $ERROR('#7: x = -1; (x\\u000D+=\\u000D-1) === -2'); +} + +//CHECK#8 +x = -1; +if ((eval("x\u2028+=\u2028-1")) !== -2) { + $ERROR('#8: x = -1; (x\\u2028+=\\u2028-1) === -2'); +} + +//CHECK#9 +x = -1; +if ((eval("x\u2029+=\u2029-1")) !== -2) { + $ERROR('#9: x = -1; (x\\u2029+=\\u2029-1) === -2'); +} + + +//CHECK#10 +x = -1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029+=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-1")) !== -2) { + $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029+=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1) === -2'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T5.js new file mode 100644 index 000000000..29acfef08 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T5.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S11.13.2_A1_T5; +* @section: 11.13.2; +* @assertion: White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed; +* @description: Checking by using eval, check operator is x -= y; +*/ + +//CHECK#1 +x = -1; +if ((eval("x\u0009-=\u00091")) !== -2) { + $ERROR('#1: x = -1; (x\\u0009-=\\u00091) === -2'); +} + +//CHECK#2 +x = -1; +if ((eval("x\u000B-=\u000B1")) !== -2) { + $ERROR('#2: x = -1; (x\\u000B-=\\u000B1) === -2'); +} + +//CHECK#3 +x = -1; +if ((eval("x\u000C-=\u000C1")) !== -2) { + $ERROR('#3: x = -1; (x\\u000C-=\\u000C1) === -2'); +} + +//CHECK#4 +x = -1; +if ((eval("x\u0020-=\u00201")) !== -2) { + $ERROR('#4: x = -1; (x\\u0020-=\\u00201) === -2'); +} + +//CHECK#5 +x = -1; +if ((eval("x\u00A0-=\u00A01")) !== -2) { + $ERROR('#5: x = -1; (x\\u00A0-=\\u00A01) === -2'); +} + +//CHECK#6 +x = -1; +if ((eval("x\u000A-=\u000A1")) !== -2) { + $ERROR('#6: x = -1; (x\\u000A-=\\u000A1) === -2'); +} + +//CHECK#7 +x = -1; +if ((eval("x\u000D-=\u000D1")) !== -2) { + $ERROR('#7: x = -1; (x\\u000D-=\\u000D1) === -2'); +} + +//CHECK#8 +x = -1; +if ((eval("x\u2028-=\u20281")) !== -2) { + $ERROR('#8: x = -1; (x\\u2028-=\\u20281) === -2'); +} + +//CHECK#9 +x = -1; +if ((eval("x\u2029-=\u20291")) !== -2) { + $ERROR('#9: x = -1; (x\\u2029-=\\u20291) === -2'); +} + + +//CHECK#10 +x = -1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029-=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== -2) { + $ERROR('#10: x = -1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === -2'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T6.js new file mode 100644 index 000000000..64d79188b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T6.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S11.13.2_A1_T6; +* @section: 11.13.2; +* @assertion: White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed; +* @description: Checking by using eval, check operator is x <<= y; +*/ + +//CHECK#1 +x = 1; +if ((eval("x\u0009<<=\u00091")) !== 2) { + $ERROR('#1: x = 1; (x\\u0009<<=\\u00091) === 2'); +} + +//CHECK#2 +x = 1; +if ((eval("x\u000B<<=\u000B1")) !== 2) { + $ERROR('#2: x = 1; (x\\u000B<<=\\u000B1) === 2'); +} + +//CHECK#3 +x = 1; +if ((eval("x\u000C<<=\u000C1")) !== 2) { + $ERROR('#3: x = 1; (x\\u000C<<=\\u000C1) === 2'); +} + +//CHECK#4 +x = 1; +if ((eval("x\u0020<<=\u00201")) !== 2) { + $ERROR('#4: x = 1; (x\\u0020<<=\\u00201) === 2'); +} + +//CHECK#5 +x = 1; +if ((eval("x\u00A0<<=\u00A01")) !== 2) { + $ERROR('#5: x = 1; (x\\u00A0<<=\\u00A01) === 2'); +} + +//CHECK#6 +x = 1; +if ((eval("x\u000A<<=\u000A1")) !== 2) { + $ERROR('#6: x = 1; (x\\u000A<<=\\u000A1) === 2'); +} + +//CHECK#7 +x = 1; +if ((eval("x\u000D<<=\u000D1")) !== 2) { + $ERROR('#7: x = 1; (x\\u000D<<=\\u000D1) === 2'); +} + +//CHECK#8 +x = 1; +if ((eval("x\u2028<<=\u20281")) !== 2) { + $ERROR('#8: x = 1; (x\\u2028<<=\\u20281) === 2'); +} + +//CHECK#9 +x = 1; +if ((eval("x\u2029<<=\u20291")) !== 2) { + $ERROR('#9: x = 1; (x\\u2029<<=\\u20291) === 2'); +} + + +//CHECK#10 +x = 1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029<<=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 2) { + $ERROR('#10: x = 1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029<<=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 2'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T7.js new file mode 100644 index 000000000..9e66bc81f --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T7.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S11.13.2_A1_T7; +* @section: 11.13.2; +* @assertion: White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed; +* @description: Checking by using eval, check operator is x >>= y; +*/ + +//CHECK#1 +x = 1; +if ((eval("x\u0009>>=\u00091")) !== 0) { + $ERROR('#1: x = 1; (x\\u0009>>=\\u00091) === 0'); +} + +//CHECK#2 +x = 1; +if ((eval("x\u000B>>=\u000B1")) !== 0) { + $ERROR('#2: x = 1; (x\\u000B>>=\\u000B1) === 0'); +} + +//CHECK#3 +x = 1; +if ((eval("x\u000C>>=\u000C1")) !== 0) { + $ERROR('#3: x = 1; (x\\u000C>>=\\u000C1) === 0'); +} + +//CHECK#4 +x = 1; +if ((eval("x\u0020>>=\u00201")) !== 0) { + $ERROR('#4: x = 1; (x\\u0020>>=\\u00201) === 0'); +} + +//CHECK#5 +x = 1; +if ((eval("x\u00A0>>=\u00A01")) !== 0) { + $ERROR('#5: x = 1; (x\\u00A0>>=\\u00A01) === 0'); +} + +//CHECK#6 +x = 1; +if ((eval("x\u000A>>=\u000A1")) !== 0) { + $ERROR('#6: x = 1; (x\\u000A>>=\\u000A1) === 0'); +} + +//CHECK#7 +x = 1; +if ((eval("x\u000D>>=\u000D1")) !== 0) { + $ERROR('#7: x = 1; (x\\u000D>>=\\u000D1) === 0'); +} + +//CHECK#8 +x = 1; +if ((eval("x\u2028>>=\u20281")) !== 0) { + $ERROR('#8: x = 1; (x\\u2028>>=\\u20281) === 0'); +} + +//CHECK#9 +x = 1; +if ((eval("x\u2029>>=\u20291")) !== 0) { + $ERROR('#9: x = 1; (x\\u2029>>=\\u20291) === 0'); +} + + +//CHECK#10 +x = 1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029>>=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 0) { + $ERROR('#10: x = 1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>>=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 0'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T8.js new file mode 100644 index 000000000..4835d3d01 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T8.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S11.13.2_A1_T8; +* @section: 11.13.2; +* @assertion: White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed; +* @description: Checking by using eval, check operator is x >>>= y; +*/ + +//CHECK#1 +x = 1; +if ((eval("x\u0009>>>=\u00091")) !== 0) { + $ERROR('#1: x = 1; (x\\u0009>>>=\\u00091) === 0'); +} + +//CHECK#2 +x = 1; +if ((eval("x\u000B>>>=\u000B1")) !== 0) { + $ERROR('#2: x = 1; (x\\u000B>>>=\\u000B1) === 0'); +} + +//CHECK#3 +x = 1; +if ((eval("x\u000C>>>=\u000C1")) !== 0) { + $ERROR('#3: x = 1; (x\\u000C>>>=\\u000C1) === 0'); +} + +//CHECK#4 +x = 1; +if ((eval("x\u0020>>>=\u00201")) !== 0) { + $ERROR('#4: x = 1; (x\\u0020>>>=\\u00201) === 0'); +} + +//CHECK#5 +x = 1; +if ((eval("x\u00A0>>>=\u00A01")) !== 0) { + $ERROR('#5: x = 1; (x\\u00A0>>>=\\u00A01) === 0'); +} + +//CHECK#6 +x = 1; +if ((eval("x\u000A>>>=\u000A1")) !== 0) { + $ERROR('#6: x = 1; (x\\u000A>>>=\\u000A1) === 0'); +} + +//CHECK#7 +x = 1; +if ((eval("x\u000D>>>=\u000D1")) !== 0) { + $ERROR('#7: x = 1; (x\\u000D>>>=\\u000D1) === 0'); +} + +//CHECK#8 +x = 1; +if ((eval("x\u2028>>>=\u20281")) !== 0) { + $ERROR('#8: x = 1; (x\\u2028>>>=\\u20281) === 0'); +} + +//CHECK#9 +x = 1; +if ((eval("x\u2029>>>=\u20291")) !== 0) { + $ERROR('#9: x = 1; (x\\u2029>>>=\\u20291) === 0'); +} + + +//CHECK#10 +x = 1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029>>>=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 0) { + $ERROR('#10: x = 1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>>>=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 0'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T9.js new file mode 100644 index 000000000..ee3413223 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A1_T9.js @@ -0,0 +1,70 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** +* @name: S11.13.2_A1_T9; +* @section: 11.13.2; +* @assertion: White Space and Line Terminator between LeftHandSideExpression and "@=" or between "@=" and AssignmentExpression are allowed; +* @description: Checking by using eval, check operator is x &= y; +*/ + +//CHECK#1 +x = 1; +if ((eval("x\u0009&=\u00091")) !== 1) { + $ERROR('#1: x = 1; (x\\u0009&=\\u00091) === 1'); +} + +//CHECK#2 +x = 1; +if ((eval("x\u000B&=\u000B1")) !== 1) { + $ERROR('#2: x = 1; (x\\u000B&=\\u000B1) === 1'); +} + +//CHECK#3 +x = 1; +if ((eval("x\u000C&=\u000C1")) !== 1) { + $ERROR('#3: x = 1; (x\\u000C&=\\u000C1) === 1'); +} + +//CHECK#4 +x = 1; +if ((eval("x\u0020&=\u00201")) !== 1) { + $ERROR('#4: x = 1; (x\\u0020&=\\u00201) === 1'); +} + +//CHECK#5 +x = 1; +if ((eval("x\u00A0&=\u00A01")) !== 1) { + $ERROR('#5: x = 1; (x\\u00A0&=\\u00A01) === 1'); +} + +//CHECK#6 +x = 1; +if ((eval("x\u000A&=\u000A1")) !== 1) { + $ERROR('#6: x = 1; (x\\u000A&=\\u000A1) === 1'); +} + +//CHECK#7 +x = 1; +if ((eval("x\u000D&=\u000D1")) !== 1) { + $ERROR('#7: x = 1; (x\\u000D&=\\u000D1) === 1'); +} + +//CHECK#8 +x = 1; +if ((eval("x\u2028&=\u20281")) !== 1) { + $ERROR('#8: x = 1; (x\\u2028&=\\u20281) === 1'); +} + +//CHECK#9 +x = 1; +if ((eval("x\u2029&=\u20291")) !== 1) { + $ERROR('#9: x = 1; (x\\u2029&=\\u20291) === 1'); +} + + +//CHECK#10 +x = 1; +if ((eval("x\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029&=\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20291")) !== 1) { + $ERROR('#10: x = 1; (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029&=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291) === 1'); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.1.js new file mode 100644 index 000000000..c06a6950d --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.1.js @@ -0,0 +1,25 @@ +// 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_A2.1_T1.1; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: Either Type is not Reference or GetBase is not null, check opeartor is "x *= y"; +*/ + +//CHECK#1 +var x = 1; +var z = (x *= -1); +if (z !== -1) { + $ERROR('#1: var x = 1; var z = (x *= -1); z === -1. Actual: ' + (z)); +} + +//CHECK#2 +var x = 1; +var y = -1; +var z = (x *= y); +if (z !== -1) { + $ERROR('#2: var x = 1; var y = -1; var z = (x *= y); z === -1. Actual: ' + (z)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.10.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.10.js new file mode 100644 index 000000000..eb5c46ff3 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.10.js @@ -0,0 +1,25 @@ +// 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_A2.1_T1.10; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: Either Type is not Reference or GetBase is not null, check opeartor is "x ^= y"; +*/ + +//CHECK#1 +var x = 1; +var z = (x ^= 1); +if (z !== 0) { + $ERROR('#1: var x = 1; var z = (x ^= 1); z === 0. Actual: ' + (z)); +} + +//CHECK#2 +var x = 1; +var y = 1; +var z = (x ^= y); +if (z !== 0) { + $ERROR('#2: var x = 1; var y = 1; var z = (x ^= y); z === 0. Actual: ' + (z)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.11.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.11.js new file mode 100644 index 000000000..55af9fc77 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.11.js @@ -0,0 +1,25 @@ +// 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_A2.1_T1.11; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: Either Type is not Reference or GetBase is not null, check opeartor is "x |= y"; +*/ + +//CHECK#1 +var x = 0; +var z = (x |= 1); +if (z !== 1) { + $ERROR('#1: var x = 0; var z = (x |= 1); z === 1. Actual: ' + (z)); +} + +//CHECK#2 +var x = 0; +var y = 1; +var z = (x |= y); +if (z !== 1) { + $ERROR('#2: var x = 0; var y = 1; var z = (x |= y); z === 1. Actual: ' + (z)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.2.js new file mode 100644 index 000000000..3483945e5 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.2.js @@ -0,0 +1,25 @@ +// 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_A2.1_T1.2; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: Either Type is not Reference or GetBase is not null, check opeartor is "x /= y"; +*/ + +//CHECK#1 +var x = 1; +var z = (x /= -1); +if (z !== -1) { + $ERROR('#1: var x = 1; var z = (x /= -1); z === -1. Actual: ' + (z)); +} + +//CHECK#2 +var x = 1; +var y = -1; +var z = (x /= y); +if (z !== -1) { + $ERROR('#2: var x = 1; var y = -1; var z = (x /= y); z === -1. Actual: ' + (z)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.3.js new file mode 100644 index 000000000..fd148ed24 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.3.js @@ -0,0 +1,25 @@ +// 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_A2.1_T1.3; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: Either Type is not Reference or GetBase is not null, check opeartor is "x %= y"; +*/ + +//CHECK#1 +var x = -1; +var z = (x %= 2); +if (z !== -1) { + $ERROR('#1: var x = -1; var z = (x %= 2); z === -1. Actual: ' + (z)); +} + +//CHECK#2 +var x = -1; +var y = 2; +var z = (x %= y); +if (z !== -1) { + $ERROR('#2: var x = -1; var y = 2; var z = (x %= y); z === -1. Actual: ' + (z)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.4.js new file mode 100644 index 000000000..776dbfdd5 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.4.js @@ -0,0 +1,25 @@ +// 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_A2.1_T1.4; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: Either Type is not Reference or GetBase is not null, check opeartor is "x += y"; +*/ + +//CHECK#1 +var x = 1; +var z = (x += 1); +if (z !== 2) { + $ERROR('#1: var x = 1; var z = (x += 1); z === 2. Actual: ' + (z)); +} + +//CHECK#2 +var x = 1; +var y = 1; +var z = (x += y); +if (z !== 2) { + $ERROR('#2: var x = 1; var y = 1; var z = (x += y); z === 2. Actual: ' + (z)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.5.js new file mode 100644 index 000000000..371f2462d --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.5.js @@ -0,0 +1,25 @@ +// 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_A2.1_T1.5; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: Either Type is not Reference or GetBase is not null, check opeartor is "x -= y"; +*/ + +//CHECK#1 +var x = 1; +var z = (x -= 1); +if (z !== 0) { + $ERROR('#1: var x = 1; var z = (x -= 1); z === 0. Actual: ' + (z)); +} + +//CHECK#2 +var x = 1; +var y = 1; +var z = (x -= y); +if (z !== 0) { + $ERROR('#2: var x = 1; var y = 1; var z = (x -= y); z === 0. Actual: ' + (z)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.6.js new file mode 100644 index 000000000..6ce2671d8 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.6.js @@ -0,0 +1,25 @@ +// 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_A2.1_T1.6; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: Either Type is not Reference or GetBase is not null, check opeartor is "x <<= y"; +*/ + +//CHECK#1 +var x = 1; +var z = (x <<= 1); +if (z !== 2) { + $ERROR('#1: var x = 1; var z = (x <<= 1); z === 2. Actual: ' + (z)); +} + +//CHECK#2 +var x = 1; +var y = 1; +var z = (x <<= y); +if (z !== 2) { + $ERROR('#2: var x = 1; var y = 1; var z = (x <<= y); z === 2. Actual: ' + (z)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.7.js new file mode 100644 index 000000000..24832642c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.7.js @@ -0,0 +1,25 @@ +// 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_A2.1_T1.7; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: Either Type is not Reference or GetBase is not null, check opeartor is "x >>= y"; +*/ + +//CHECK#1 +var x = 4; +var z = (x >>= 1); +if (z !== 2) { + $ERROR('#1: var x = 4; var z = (x >>= 1); z === 2. Actual: ' + (z)); +} + +//CHECK#2 +var x = 4; +var y = 1; +var z = (x >>= y); +if (z !== 2) { + $ERROR('#2: var x = 4; var y = 1; var z = (x >>= y); z === 2. Actual: ' + (z)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.8.js new file mode 100644 index 000000000..614b5c6c3 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.8.js @@ -0,0 +1,25 @@ +// 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_A2.1_T1.8; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: Either Type is not Reference or GetBase is not null, check opeartor is "x >>>= y"; +*/ + +//CHECK#1 +var x = 4; +var z = (x >>>= 1); +if (z !== 2) { + $ERROR('#1: var x = 4; var z = (x >>>= 1); z === 2. Actual: ' + (z)); +} + +//CHECK#2 +var x = 4; +var y = 1; +var z = (x >>>= y); +if (z !== 2) { + $ERROR('#2: var x = 4; var y = 1; var z = (x >>>= y); z === 2. Actual: ' + (z)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.9.js new file mode 100644 index 000000000..eaec2b218 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T1.9.js @@ -0,0 +1,25 @@ +// 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_A2.1_T1.9; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: Either Type is not Reference or GetBase is not null, check opeartor is "x &= y"; +*/ + +//CHECK#1 +var x = 1; +var z = (x &= 1); +if (z !== 1) { + $ERROR('#1: var x = 1; var z = (x &= 1); z === 1. Actual: ' + (z)); +} + +//CHECK#2 +var x = 1; +var y = 1; +var z = (x &= y); +if (z !== 1) { + $ERROR('#2: var x = 1; var y = 1; var z = (x &= y); z === 1. Actual: ' + (z)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.1.js new file mode 100644 index 000000000..1c01d09b5 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.1.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T2.1; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x *= y"; +*/ + +//CHECK#1 +try { + var x = 1; + var z = (x *= y); + $ERROR('#1.1: var x = 1; x *= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x *= y throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.10.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.10.js new file mode 100644 index 000000000..c876cd464 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.10.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T2.10; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x ^= y"; +*/ + +//CHECK#1 +try { + var x = 1; + var z = (x ^= y); + $ERROR('#1.1: var x = 1; x ^= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x ^= y throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.11.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.11.js new file mode 100644 index 000000000..82f7c979d --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.11.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T2.11; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x |= y"; +*/ + +//CHECK#1 +try { + var x = 1; + var z = (x |= y); + $ERROR('#1.1: var x = 1; x |= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x |= y throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.2.js new file mode 100644 index 000000000..80a072ded --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.2.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T2.2; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x /= y"; +*/ + +//CHECK#1 +try { + var x = 1; + var z = (x /= y); + $ERROR('#1.1: var x = 1; x /= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x /= y throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.3.js new file mode 100644 index 000000000..27a5e4add --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.3.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T2.3; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x %= y"; +*/ + +//CHECK#1 +try { + var x = 1; + var z = (x %= y); + $ERROR('#1.1: var x = 1; x %= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x %= y throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.4.js new file mode 100644 index 000000000..65b071b4d --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.4.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T2.4; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x += y"; +*/ + +//CHECK#1 +try { + var x = 1; + var z = (x += y); + $ERROR('#1.1: var x = 1; x += y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x += y throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.5.js new file mode 100644 index 000000000..2369768c8 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.5.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T2.5; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x -= y"; +*/ + +//CHECK#1 +try { + var x = 1; + var z = (x -= y); + $ERROR('#1.1: var x = 1; x -= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x -= y throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.6.js new file mode 100644 index 000000000..61fb6afdf --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.6.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T2.6; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x <<= y"; +*/ + +//CHECK#1 +try { + var x = 1; + var z = (x <<= y); + $ERROR('#1.1: var x = 1; x <<= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x <<= y throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.7.js new file mode 100644 index 000000000..11d468e2d --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.7.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T2.7; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x >>= y"; +*/ + +//CHECK#1 +try { + var x = 1; + var z = (x >>= y); + $ERROR('#1.1: var x = 1; x >>= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x >>= y throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.8.js new file mode 100644 index 000000000..5f644d515 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.8.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T2.8; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x >>>= y"; +*/ + +//CHECK#1 +try { + var x = 1; + var z = (x >>>= y); + $ERROR('#1.1: var x = 1; x >>>= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x >>>= y throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.9.js new file mode 100644 index 000000000..5514ae2f2 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T2.9.js @@ -0,0 +1,21 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T2.9; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is "x &= y"; +*/ + +//CHECK#1 +try { + var x = 1; + var z = (x &= y); + $ERROR('#1.1: var x = 1; x &= y throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: var x = 1; x &= y throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.1.js new file mode 100644 index 000000000..9fff16897 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.1.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T3.1; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x *= y"; +*/ + +//CHECK#1 +try { + var z = (x *= 1); + $ERROR('#1.1: x *= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x *= 1 throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.10.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.10.js new file mode 100644 index 000000000..3bd20a14b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.10.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T3.10; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x ^= y"; +*/ + +//CHECK#1 +try { + var z = (x ^= 1); + $ERROR('#1.1: x ^= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x ^= 1 throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.11.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.11.js new file mode 100644 index 000000000..1eb4b3609 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.11.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T3.11; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x |= y"; +*/ + +//CHECK#1 +try { + var z = (x |= 1); + $ERROR('#1.1: x |= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x |= 1 throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.2.js new file mode 100644 index 000000000..9670e3a11 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.2.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T3.2; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x /= y"; +*/ + +//CHECK#1 +try { + var z = (x /= 1); + $ERROR('#1.1: x /= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x /= 1 throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.3.js new file mode 100644 index 000000000..37745fbc1 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.3.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T3.3; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x %= y"; +*/ + +//CHECK#1 +try { + var z = (x %= 1); + $ERROR('#1.1: x %= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x %= 1 throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.4.js new file mode 100644 index 000000000..c021b0942 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.4.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T3.4; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x += y"; +*/ + +//CHECK#1 +try { + var z = (x += 1); + $ERROR('#1.1: x += 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x += 1 throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.5.js new file mode 100644 index 000000000..cc01c0716 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.5.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T3.5; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x -= y"; +*/ + +//CHECK#1 +try { + var z = (x -= 1); + $ERROR('#1.1: x -= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x -= 1 throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.6.js new file mode 100644 index 000000000..fdd0c0dd9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.6.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T3.6; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x <<= y"; +*/ + +//CHECK#1 +try { + var z = (x <<= 1); + $ERROR('#1.1: x <<= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x <<= 1 throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.7.js new file mode 100644 index 000000000..870e774a3 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.7.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T3.7; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x >>= y"; +*/ + +//CHECK#1 +try { + var z = (x >>= 1); + $ERROR('#1.1: x >>= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x >>= 1 throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.8.js new file mode 100644 index 000000000..162e7245a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.8.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T3.8; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x >>>= y"; +*/ + +//CHECK#1 +try { + var z = (x >>>= 1); + $ERROR('#1.1: x >>>= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x >>>= 1 throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.9.js new file mode 100644 index 000000000..704c63250 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.1_T3.9.js @@ -0,0 +1,20 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A2.1_T3.9; + * @section: 11.13.2; + * @assertion: Operator uses GetValue; + * @description: If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is "x &= y"; +*/ + +//CHECK#1 +try { + var z = (x &= 1); + $ERROR('#1.1: x &= 1 throw ReferenceError. Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: x &= 1 throw ReferenceError. Actual: ' + (e)); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T1.js new file mode 100644 index 000000000..12e694c59 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_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_A2.2_T1; + * @section: 11.13.2, 16; + * @assertion: Operator uses PutValue; + * @description: If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x *= y"; +* @negative +*/ + +//CHECK#1 +try { + var z = (1 *= 1); + $ERROR('#1.1: 1 *= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 *= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 *= 1); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T10.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T10.js new file mode 100644 index 000000000..a736ade20 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_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_A2.2_T10; + * @section: 11.13.2, 16; + * @assertion: Operator uses PutValue; + * @description: If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x ^= y"; +* @negative +*/ + +//CHECK#1 +try { + var z = (1 ^= 1); + $ERROR('#1.1: 1 ^= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 ^= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 ^= 1); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T11.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T11.js new file mode 100644 index 000000000..00d29a582 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_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_A2.2_T11; + * @section: 11.13.2, 16; + * @assertion: Operator uses PutValue; + * @description: If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x |= y"; +* @negative +*/ + +//CHECK#1 +try { + var z = (1 |= 1); + $ERROR('#1.1: 1 |= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 |= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 |= 1); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T2.js new file mode 100644 index 000000000..cd2ddd8bd --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_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_A2.2_T2; + * @section: 11.13.2, 16; + * @assertion: Operator uses PutValue; + * @description: If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x /= y"; +* @negative +*/ + +//CHECK#1 +try { + var z = (1 /= 1); + $ERROR('#1.1: 1 /= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 /= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 /= 1); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T3.js new file mode 100644 index 000000000..a284ae157 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_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_A2.2_T3; + * @section: 11.13.2, 16; + * @assertion: Operator uses PutValue; + * @description: If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x %= y"; +* @negative +*/ + +//CHECK#1 +try { + var z = (1 %= 1); + $ERROR('#1.1: 1 %= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 %= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 %= 1); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T4.js new file mode 100644 index 000000000..08e4e14ad --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_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_A2.2_T4; + * @section: 11.13.2, 16; + * @assertion: Operator uses PutValue; + * @description: If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x += y"; +* @negative +*/ + +//CHECK#1 +try { + var z = (1 += 1); + $ERROR('#1.1: 1 += 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 += 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 += 1); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T5.js new file mode 100644 index 000000000..4e10590ab --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T5.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_A2.2_T5; + * @section: 11.13.2, 16; + * @assertion: Operator uses PutValue; + * @description: If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x -= y"; +* @negative +*/ + +//CHECK#1 +try { + var z = (1 -= 1); + $ERROR('#1.1: 1 -= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 -= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 -= 1); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T6.js new file mode 100644 index 000000000..9fce0372e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_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_A2.2_T6; + * @section: 11.13.2, 16; + * @assertion: Operator uses PutValue; + * @description: If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x <<= y"; +* @negative +*/ + +//CHECK#1 +try { + var z = (1 <<= 1); + $ERROR('#1.1: 1 <<= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 <<= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 <<= 1); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T7.js new file mode 100644 index 000000000..9356b73d4 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_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_A2.2_T7; + * @section: 11.13.2, 16; + * @assertion: Operator uses PutValue; + * @description: If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x >>= y"; +* @negative +*/ + +//CHECK#1 +try { + var z = (1 >>= 1); + $ERROR('#1.1: 1 >>= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 >>= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 >>= 1); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T8.js new file mode 100644 index 000000000..3c27b24f9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_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_A2.2_T8; + * @section: 11.13.2, 16; + * @assertion: Operator uses PutValue; + * @description: If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x >>>= y"; +* @negative +*/ + +//CHECK#1 +try { + var z = (1 >>>= 1); + $ERROR('#1.1: 1 >>>= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 >>>= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 >>>= 1); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_T9.js new file mode 100644 index 000000000..0ac35ffea --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A2.2_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_A2.2_T9; + * @section: 11.13.2, 16; + * @assertion: Operator uses PutValue; + * @description: If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is "x &= y"; +* @negative +*/ + +//CHECK#1 +try { + var z = (1 &= 1); + $ERROR('#1.1: 1 &= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); +} +catch (e) { + if ((e instanceof ReferenceError) !== true) { + $ERROR('#1.2: 1 &= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); + } else { + var z = (1 &= 1); + } +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T1.js new file mode 100644 index 000000000..045da8110 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_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_A3.1_T1; + * @section: 11.13.2; + * @assertion: Operator x @= y uses PutValue(x, x @ y); + * @description: Checking Expression and Variable statements for x *= y; +*/ + +//CHECK#1 +var x = 1; +x *= -1; +if (x !== -1) { + $ERROR('#1: var x = 1; x *= -1; x === -1. Actual: ' + (x)); +} + +//CHECK#2 +y = 1; +y *= -1; +if (y !== -1) { + $ERROR('#2: y = 1; y *= -1; y === -1. Actual: ' + (y)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T10.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T10.js new file mode 100644 index 000000000..5ea0d2d3a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_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_A3.1_T10; + * @section: 11.13.2; + * @assertion: Operator x @= y uses PutValue(x, x @ y); + * @description: Checking Expression and Variable statements for x ^= y; +*/ + +//CHECK#1 +var x = 0; +x ^= 1; +if (x !== 1) { + $ERROR('#1: var x = 0; x ^= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +y = 1; +y ^= 0; +if (y !== 1) { + $ERROR('#2: y = 1; y ^= 0; y === 1. Actual: ' + (y)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T11.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T11.js new file mode 100644 index 000000000..542cd4fe3 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_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_A3.1_T11; + * @section: 11.13.2; + * @assertion: Operator x @= y uses PutValue(x, x @ y); + * @description: Checking Expression and Variable statements for x |= y; +*/ + +//CHECK#1 +var x = 0; +x |= 1; +if (x !== 1) { + $ERROR('#1: var x = 0; x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +y = 1; +y |= 0; +if (y !== 1) { + $ERROR('#2: y = 1; y |= 0; y === 1. Actual: ' + (y)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T2.js new file mode 100644 index 000000000..679c295f5 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_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_A3.1_T2; + * @section: 11.13.2; + * @assertion: Operator x @= y uses PutValue(x, x @ y); + * @description: Checking Expression and Variable statements for x /= y; +*/ + +//CHECK#1 +var x = 1; +x /= -1; +if (x !== -1) { + $ERROR('#1: var x = 1; x /= -1; x === -1. Actual: ' + (x)); +} + +//CHECK#2 +y = 1; +y /= -1; +if (y !== -1) { + $ERROR('#2: y = 1; y /= -1; y === -1. Actual: ' + (y)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T3.js new file mode 100644 index 000000000..cf65d0a05 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_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_A3.1_T3; + * @section: 11.13.2; + * @assertion: Operator x @= y uses PutValue(x, x @ y); + * @description: Checking Expression and Variable statements for x %= y; +*/ + +//CHECK#1 +var x = -1; +x %= 2; +if (x !== -1) { + $ERROR('#1: var x = -1; x %= 2; x === -1. Actual: ' + (x)); +} + +//CHECK#2 +y = -1; +y %= 2; +if (y !== -1) { + $ERROR('#2: y = -1; y %= 2; y === -1. Actual: ' + (y)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T4.js new file mode 100644 index 000000000..0cbcad1e5 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_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_A3.1_T4; + * @section: 11.13.2; + * @assertion: Operator x @= y uses PutValue(x, x @ y); + * @description: Checking Expression and Variable statements for x += y; +*/ + +//CHECK#1 +var x = 1; +x += 1; +if (x !== 2) { + $ERROR('#1: var x = 1; x += 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +y = 1; +y += 1; +if (y !== 2) { + $ERROR('#2: y = 1; y += 1; y === 2. Actual: ' + (y)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T5.js new file mode 100644 index 000000000..d84d38867 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T5.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_A3.1_T5; + * @section: 11.13.2; + * @assertion: Operator x @= y uses PutValue(x, x @ y); + * @description: Checking Expression and Variable statements for x -= y; +*/ + +//CHECK#1 +var x = -1; +x -= 1; +if (x !== -2) { + $ERROR('#1: var x = -1; x -= 1; x === -2. Actual: ' + (x)); +} + +//CHECK#2 +y = -1; +y -= 1; +if (y !== -2) { + $ERROR('#2: y = -1; y -= 1; y === -2. Actual: ' + (y)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T6.js new file mode 100644 index 000000000..70fd614fb --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_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_A3.1_T6; + * @section: 11.13.2; + * @assertion: Operator x @= y uses PutValue(x, x @ y); + * @description: Checking Expression and Variable statements for x <<= y; +*/ + +//CHECK#1 +var x = 1; +x <<= 1; +if (x !== 2) { + $ERROR('#1: var x = 1; x <<= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +y = 1; +y <<= 1; +if (y !== 2) { + $ERROR('#2: y = 1; y <<= 1; y === 2. Actual: ' + (y)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T7.js new file mode 100644 index 000000000..d8bb6964d --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_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_A3.1_T7; + * @section: 11.13.2; + * @assertion: Operator x @= y uses PutValue(x, x @ y); + * @description: Checking Expression and Variable statements for x >>= y; +*/ + +//CHECK#1 +var x = 4; +x >>= 1; +if (x !== 2) { + $ERROR('#1: var x = 4; x >>= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +y = 4; +y >>= 1; +if (y !== 2) { + $ERROR('#2: y = 4; y >>= 1; y === 2. Actual: ' + (y)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T8.js new file mode 100644 index 000000000..f43989be9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_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_A3.1_T8; + * @section: 11.13.2; + * @assertion: Operator x @= y uses PutValue(x, x @ y); + * @description: Checking Expression and Variable statements for x >>>= y; +*/ + +//CHECK#1 +var x = 4; +x >>>= 1; +if (x !== 2) { + $ERROR('#1: var x = 4; x >>>= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +y = 4; +y >>>= 1; +if (y !== 2) { + $ERROR('#2: y = 4; y >>>= 1; y === 2. Actual: ' + (y)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_T9.js new file mode 100644 index 000000000..6b8877e93 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.1_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_A3.1_T9; + * @section: 11.13.2; + * @assertion: Operator x @= y uses PutValue(x, x @ y); + * @description: Checking Expression and Variable statements for x &= y; +*/ + +//CHECK#1 +var x = 1; +x &= 1; +if (x !== 1) { + $ERROR('#1: var x = 1; x &= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +y = 1; +y &= 1; +if (y !== 1) { + $ERROR('#2: y = 1; y &= 1; y === 1. Actual: ' + (y)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T1.js new file mode 100644 index 000000000..bea8af649 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_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_A3.2_T1; + * @section: 11.13.2; + * @assertion: Operator x @= y returns x @ y; + * @description: Checking Expression and Variable statements for x *= y; +*/ + +//CHECK#1 +var x = 1; +var x1 = (x *= -1); +if (x1 !== -1) { + $ERROR('#1: var x = 1; var x1 = (x *= -1); x1 === -1. Actual: ' + (x1)); +} + +//CHECK#2 +y = 1; +y1 = (y *= -1); +if (y1 !== -1) { + $ERROR('#2: y = 1; y1 = (y *= -1); y1 === -1. Actual: ' + (y1)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T10.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T10.js new file mode 100644 index 000000000..d956f4f32 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_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_A3.2_T10; + * @section: 11.13.2; + * @assertion: Operator x @= y returns x @ y; + * @description: Checking Expression and Variable statements for x ^= y; +*/ + +//CHECK#1 +var x = 0; +var x1 = (x ^= 1); +if (x1 !== 1) { + $ERROR('#1: var x = 0; var x1 = (x ^= 1); x1 === 1. Actual: ' + (x1)); +} + +//CHECK#2 +y = 1; +y1 = (y ^= 0); +if (y1 !== 1) { + $ERROR('#2: y = 1; y1 = (y ^= 0); y1 === 1. Actual: ' + (y1)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T11.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T11.js new file mode 100644 index 000000000..f2031d604 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_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_A3.2_T11; + * @section: 11.13.2; + * @assertion: Operator x @= y returns x @ y; + * @description: Checking Expression and Variable statements for x |= y; +*/ + +//CHECK#1 +var x = 0; +var x1 = (x |= 1); +if (x1 !== 1) { + $ERROR('#1: var x = 0; var x1 = (x |= 1); x1 === 1. Actual: ' + (x1)); +} + +//CHECK#2 +y = 1; +y1 = (y |= 0); +if (y1 !== 1) { + $ERROR('#2: y = 1; y1 = (y |= 0); y1 === 1. Actual: ' + (y1)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T2.js new file mode 100644 index 000000000..bf3e4281d --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_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_A3.2_T2; + * @section: 11.13.2; + * @assertion: Operator x @= y returns x @ y; + * @description: Checking Expression and Variable statements for x /= y; +*/ + +//CHECK#1 +var x = 1; +var x1 = (x /= -1); +if (x1 !== -1) { + $ERROR('#1: var x = 1; var x1 = (x /= -1); x1 === -1. Actual: ' + (x1)); +} + +//CHECK#2 +y = 1; +y1 = (y /= -1); +if (y1 !== -1) { + $ERROR('#2: y = 1; y1 = (y /= -1); y1 === -1. Actual: ' + (y1)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T3.js new file mode 100644 index 000000000..2a4ecc387 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_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_A3.2_T3; + * @section: 11.13.2; + * @assertion: Operator x @= y returns x @ y; + * @description: Checking Expression and Variable statements for x %= y; +*/ + +//CHECK#1 +var x = -1; +var x1 = (x %= 2); +if (x1 !== -1) { + $ERROR('#1: var x = -1; var x1 = (x %= 2); x1 === -1. Actual: ' + (x1)); +} + +//CHECK#2 +y = -1; +y1 = (y %= 2); +if (y1 !== -1) { + $ERROR('#2: y = -1; y1 = (y %= 2); y1 === -1. Actual: ' + (y1)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T4.js new file mode 100644 index 000000000..827c19773 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_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_A3.2_T4; + * @section: 11.13.2; + * @assertion: Operator x @= y returns x @ y; + * @description: Checking Expression and Variable statements for x += y; +*/ + +//CHECK#1 +var x = 1; +var x1 = (x += 1); +if (x1 !== 2) { + $ERROR('#1: var x = 1; var x1 = (x += 1); x1 === 2. Actual: ' + (x1)); +} + +//CHECK#2 +y = 1; +y1 = (y += 1); +if (y1 !== 2) { + $ERROR('#2: y = 1; y1 = (y += 1); y1 === 2. Actual: ' + (y1)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T5.js new file mode 100644 index 000000000..d96373686 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T5.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_A3.2_T5; + * @section: 11.13.2; + * @assertion: Operator x @= y returns x @ y; + * @description: Checking Expression and Variable statements for x -= y; +*/ + +//CHECK#1 +var x = -1; +var x1 = (x -= 1); +if (x1 !== -2) { + $ERROR('#1: var x = -1; var x1 = (x -= 1); x1 === -2. Actual: ' + (x1)); +} + +//CHECK#2 +y = -1; +y1 = (y -= 1); +if (y1 !== -2) { + $ERROR('#2: y = -1; y1 = (y -= 1); y1 === -2. Actual: ' + (y1)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T6.js new file mode 100644 index 000000000..799bb4d38 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_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_A3.2_T6; + * @section: 11.13.2; + * @assertion: Operator x @= y returns x @ y; + * @description: Checking Expression and Variable statements for x <<= y; +*/ + +//CHECK#1 +var x = 1; +var x1 = (x <<= 1); +if (x1 !== 2) { + $ERROR('#1: var x = 1; var x1 = (x <<= 1); x1 === 2. Actual: ' + (x1)); +} + +//CHECK#2 +y = 1; +y1 = (y <<= 1); +if (y1 !== 2) { + $ERROR('#2: y = 1; y1 = (y <<= 1); y1 === 2. Actual: ' + (y1)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T7.js new file mode 100644 index 000000000..3d8efba58 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_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_A3.2_T7; + * @section: 11.13.2; + * @assertion: Operator x @= y returns x @ y; + * @description: Checking Expression and Variable statements for x >>= y; +*/ + +//CHECK#1 +var x = 4; +var x1 = (x >>= 1); +if (x1 !== 2) { + $ERROR('#1: var x = 4; var x1 = (x >>= 1); x1 === 2. Actual: ' + (x1)); +} + +//CHECK#2 +y = 4; +y1 = (y >>= 1); +if (y1 !== 2) { + $ERROR('#2: y = 4; y1 = (y >>= 1); y1 === 2. Actual: ' + (y1)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T8.js new file mode 100644 index 000000000..e27708a3f --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_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_A3.2_T8; + * @section: 11.13.2; + * @assertion: Operator x @= y returns x @ y; + * @description: Checking Expression and Variable statements for x >>>= y; +*/ + +//CHECK#1 +var x = 4; +var x1 = (x >>>= 1); +if (x1 !== 2) { + $ERROR('#1: var x = 4; var x1 = (x >>>= 1); x1 === 2. Actual: ' + (x1)); +} + +//CHECK#2 +y = 4; +y1 = (y >>>= 1); +if (y1 !== 2) { + $ERROR('#2: y = 4; y1 = (y >>>= 1); y1 === 2. Actual: ' + (y1)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_T9.js new file mode 100644 index 000000000..2cf6d4e78 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A3.2_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_A3.2_T9; + * @section: 11.13.2; + * @assertion: Operator x @= y returns x @ y; + * @description: Checking Expression and Variable statements for x &= y; +*/ + +//CHECK#1 +var x = 1; +var x1 = (x &= 1); +if (x1 !== 1) { + $ERROR('#1: var x = 1; var x1 = (x &= 1); x1 === 1. Actual: ' + (x1)); +} + +//CHECK#2 +y = 1; +y1 = (y &= 1); +if (y1 !== 1) { + $ERROR('#2: y = 1; y1 = (y &= 1); y1 === 1. Actual: ' + (y1)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T1.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T1.1.js new file mode 100644 index 000000000..73aaa2b52 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T1.1.js @@ -0,0 +1,37 @@ +// 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_A4.10_T1.1; + * @section: 11.13.2, 11.10.2; + * @assertion: The production x ^= y is the same as x = x ^ y; + * @description: Type(x) and Type(y) vary between primitive boolean and Boolean object; + */ + +//CHECK#1 +x = true; +x ^= true; +if (x !== 0) { + $ERROR('#1: x = true; x ^= true; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x ^= true; +if (x !== 0) { + $ERROR('#2: x = new Boolean(true); x ^= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x ^= new Boolean(true); +if (x !== 0) { + $ERROR('#3: x = true; x ^= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x ^= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = new Boolean(true); x ^= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T1.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T1.2.js new file mode 100644 index 000000000..d1684aded --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T1.2.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: S11.13.2_A4.10_T1.2; + * @section: 11.13.2, 11.10.2; + * @assertion: The production x ^= y is the same as x = x ^ y; + * @description: Type(x) and Type(y) vary between primitive number and Number object; +*/ + +//CHECK#1 +x = 1; +x ^= 1; +if (x !== 0) { + $ERROR('#1: x = 1; x ^= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x ^= 1; +if (x !== 0) { + $ERROR('#2: x = new Number(1); x ^= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x ^= new Number(1); +if (x !== 0) { + $ERROR('#3: x = 1; x ^= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x ^= new Number(1); +if (x !== 0) { + $ERROR('#4: x = new Number(1); x ^= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T1.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T1.3.js new file mode 100644 index 000000000..a6fa846b3 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T1.3.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: S11.13.2_A4.10_T1.3; + * @section: 11.13.2, 11.10.2; + * @assertion: The production x ^= y is the same as x = x ^ y; + * @description: Type(x) and Type(y) vary between primitive string and String object; +*/ + +//CHECK#1 +x = "1"; +x ^= "1"; +if (x !== 0) { + $ERROR('#1: x = "1"; x ^= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x ^= "1"; +if (x !== 0) { + $ERROR('#2: x = new String("1"); x ^= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x ^= new String("1"); +if (x !== 0) { + $ERROR('#3: x = "1"; x ^= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x ^= new String("1"); +if (x !== 0) { + $ERROR('#4: x = new String("1"); x ^= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x ^= "1"; +if (x !== 1) { + $ERROR('#5: x = "x"; x ^= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x ^= "x"; +if (x !== 1) { + $ERROR('#6: x = "1"; x ^= "x"; x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T1.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T1.4.js new file mode 100644 index 000000000..17a47f3ed --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T1.4.js @@ -0,0 +1,37 @@ +// 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_A4.10_T1.4; + * @section: 11.13.2, 11.10.2; + * @assertion: The production x ^= y is the same as x = x ^ y; + * @description: Type(x) and Type(y) vary between Null and Undefined; + */ + +//CHECK#1 +x = null; +x ^= undefined; +if (x !== 0) { + $ERROR('#1: x = null; x ^= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x ^= null; +if (x !== 0) { + $ERROR('#2: x = undefined; x ^= null; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x ^= undefined; +if (x !== 0) { + $ERROR('#3: x = undefined; x ^= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x ^= null; +if (x !== 0) { + $ERROR('#4: x = null; x ^= null; x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.1.js new file mode 100644 index 000000000..037f1f696 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.1.js @@ -0,0 +1,65 @@ +// 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_A4.10_T2.1; + * @section: 11.13.2, 11.10.2; + * @assertion: The production x ^= y is the same as x = x ^ y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object); + */ + +//CHECK#1 +x = true; +x ^= 1; +if (x !== 0) { + $ERROR('#1: x = true; x ^= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x ^= true; +if (x !== 0) { + $ERROR('#2: x = 1; x ^= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x ^= 1; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x ^= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x ^= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = 1; x ^= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x ^= new Number(1); +if (x !== 0) { + $ERROR('#5: x = true; x ^= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x ^= true; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x ^= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x ^= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x ^= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x ^= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x ^= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.2.js new file mode 100644 index 000000000..8627c9e9b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.2.js @@ -0,0 +1,79 @@ +// 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_A4.10_T2.2; + * @section: 11.13.2, 11.10.2; + * @assertion: The production x ^= y is the same as x = x ^ y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object); +*/ + +//CHECK#1 +x = "1"; +x ^= 1; +if (x !== 0) { + $ERROR('#1: x = "1"; x ^= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x ^= "1"; +if (x !== 0) { + $ERROR('#2: x = 1; x ^= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x ^= 1; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x ^= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x ^= new String("1"); +if (x !== 0) { + $ERROR('#4: x = 1; x ^= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x ^= new Number(1); +if (x !== 0) { + $ERROR('#5: x = "1"; x ^= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x ^= "1"; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x ^= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x ^= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new String("1"); x ^= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x ^= new String("1"); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x ^= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x ^= 1; +if (x !== 1) { + $ERROR('#9: x = "x"; x ^= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x ^= "x"; +if (x !== 1) { + $ERROR('#10: x = 1; x ^= "x"; x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.3.js new file mode 100644 index 000000000..ea682bdd4 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.3.js @@ -0,0 +1,37 @@ +// 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_A4.10_T2.3; + * @section: 11.13.2, 11.10.2; + * @assertion: The production x ^= y is the same as x = x ^ y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null; + */ + +//CHECK#1 +x = 1; +x ^= null; +if (x !== 1) { + $ERROR('#1: x = 1; x ^= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x ^= 1; +if (x !== 1) { + $ERROR('#2: x = null; x ^= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x ^= null; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x ^= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x ^= new Number(1); +if (x !== 1) { + $ERROR('#4: x = null; x ^= new Number(1); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.4.js new file mode 100644 index 000000000..7d5ed27e9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.4.js @@ -0,0 +1,37 @@ +// 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_A4.10_T2.4; + * @section: 11.13.2, 11.10.2; + * @assertion: The production x ^= y is the same as x = x ^ y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined; + */ + +//CHECK#1 +x = 1; +x ^= undefined; +if (x !== 1) { + $ERROR('#1: x = 1; x ^= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x ^= 1; +if (x !== 1) { + $ERROR('#2: x = undefined; x ^= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x ^= undefined; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x ^= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x ^= new Number(1); +if (x !== 1) { + $ERROR('#4: x = undefined; x ^= new Number(1); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.5.js new file mode 100644 index 000000000..49275a0e7 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.5.js @@ -0,0 +1,65 @@ +// 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_A4.10_T2.5; + * @section: 11.13.2, 11.10.2; + * @assertion: The production x ^= y is the same as x = x ^ y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object); +*/ + +//CHECK#1 +x = true; +x ^= "1"; +if (x !== 0) { + $ERROR('#1: x = true; x ^= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x ^= true; +if (x !== 0) { + $ERROR('#2: x = "1"; x ^= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x ^= "1"; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x ^= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x ^= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = "1"; x ^= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x ^= new String("1"); +if (x !== 0) { + $ERROR('#5: x = true; x ^= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x ^= true; +if (x !== 0) { + $ERROR('#6: x = new String("1"); x ^= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x ^= new String("1"); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x ^= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x ^= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new String("1"); x ^= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.6.js new file mode 100644 index 000000000..c0e2e8750 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.6.js @@ -0,0 +1,37 @@ +// 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_A4.10_T2.6; + * @section: 11.13.2, 11.10.2; + * @assertion: The production x ^= y is the same as x = x ^ y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined; + */ + +//CHECK#1 +x = "1"; +x ^= undefined; +if (x !== 1) { + $ERROR('#1: x = "1"; x ^= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x ^= "1"; +if (x !== 1) { + $ERROR('#2: x = undefined; x ^= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x ^= undefined; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x ^= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x ^= new String("1"); +if (x !== 1) { + $ERROR('#4: x = undefined; x ^= new String("1"); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.7.js new file mode 100644 index 000000000..8302ff023 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.7.js @@ -0,0 +1,37 @@ +// 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_A4.10_T2.7; + * @section: 11.13.2, 11.10.2; + * @assertion: The production x ^= y is the same as x = x ^ y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null; + */ + +//CHECK#1 +x = "1"; +x ^= null; +if (x !== 1) { + $ERROR('#1: x = "1"; x ^= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x ^= "1"; +if (x !== 1) { + $ERROR('#2: x = null; x ^= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x ^= null; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x ^= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x ^= new String("1"); +if (x !== 1) { + $ERROR('#4: x = null; x ^= new String("1"); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.8.js new file mode 100644 index 000000000..a32f87f27 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.8.js @@ -0,0 +1,37 @@ +// 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_A4.10_T2.8; + * @section: 11.13.2, 11.10.2; + * @assertion: The production x ^= y is the same as x = x ^ y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined; + */ + +//CHECK#1 +x = true; +x ^= undefined; +if (x !== 1) { + $ERROR('#1: x = true; x ^= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x ^= true; +if (x !== 1) { + $ERROR('#2: x = undefined; x ^= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x ^= undefined; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x ^= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x ^= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = undefined; x ^= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.9.js new file mode 100644 index 000000000..a57c4572e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.10_T2.9.js @@ -0,0 +1,37 @@ +// 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_A4.10_T2.9; + * @section: 11.13.2, 11.10.2; + * @assertion: The production x ^= y is the same as x = x ^ y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null; + */ + +//CHECK#1 +x = true; +x ^= null; +if (x !== 1) { + $ERROR('#1: x = true; x ^= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x ^= true; +if (x !== 1) { + $ERROR('#2: x = null; x ^= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x ^= null; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x ^= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x ^= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = null; x ^= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T1.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T1.1.js new file mode 100644 index 000000000..587ba5bd9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T1.1.js @@ -0,0 +1,37 @@ +// 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_A4.11_T1.1; + * @section: 11.13.2, 11.10.3; + * @assertion: The production x |= y is the same as x = x | y; + * @description: Type(x) and Type(y) vary between primitive boolean and Boolean object; + */ + +//CHECK#1 +x = true; +x |= true; +if (x !== 1) { + $ERROR('#1: x = true; x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x |= true; +if (x !== 1) { + $ERROR('#2: x = new Boolean(true); x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#3: x = true; x |= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = new Boolean(true); x |= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T1.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T1.2.js new file mode 100644 index 000000000..83f5230f7 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T1.2.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: S11.13.2_A4.11_T1.2; + * @section: 11.13.2, 11.10.3; + * @assertion: The production x |= y is the same as x = x | y; + * @description: Type(x) and Type(y) vary between primitive number and Number object; +*/ + +//CHECK#1 +x = 1; +x |= 1; +if (x !== 1) { + $ERROR('#1: x = 1; x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x |= 1; +if (x !== 1) { + $ERROR('#2: x = new Number(1); x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x |= new Number(1); +if (x !== 1) { + $ERROR('#3: x = 1; x |= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x |= new Number(1); +if (x !== 1) { + $ERROR('#4: x = new Number(1); x |= new Number(1); x === 1. Actual: ' + (x)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T1.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T1.3.js new file mode 100644 index 000000000..85461758c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T1.3.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: S11.13.2_A4.11_T1.3; + * @section: 11.13.2, 11.10.3; + * @assertion: The production x |= y is the same as x = x | y; + * @description: Type(x) and Type(y) vary between primitive string and String object; +*/ + +//CHECK#1 +x = "1"; +x |= "1"; +if (x !== 1) { + $ERROR('#1: x = "1"; x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x |= "1"; +if (x !== 1) { + $ERROR('#2: x = new String("1"); x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x |= new String("1"); +if (x !== 1) { + $ERROR('#3: x = "1"; x |= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x |= new String("1"); +if (x !== 1) { + $ERROR('#4: x = new String("1"); x |= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x |= "1"; +if (x !== 1) { + $ERROR('#5: x = "x"; x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x |= "x"; +if (x !== 1) { + $ERROR('#6: x = "1"; x |= "x"; x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T1.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T1.4.js new file mode 100644 index 000000000..60758ffd5 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T1.4.js @@ -0,0 +1,37 @@ +// 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_A4.11_T1.4; + * @section: 11.13.2, 11.10.3; + * @assertion: The production x |= y is the same as x = x | y; + * @description: Type(x) and Type(y) vary between Null and Undefined; + */ + +//CHECK#1 +x = null; +x |= undefined; +if (x !== 0) { + $ERROR('#1: x = null; x |= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x |= null; +if (x !== 0) { + $ERROR('#2: x = undefined; x |= null; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x |= undefined; +if (x !== 0) { + $ERROR('#3: x = undefined; x |= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x |= null; +if (x !== 0) { + $ERROR('#4: x = null; x |= null; x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.1.js new file mode 100644 index 000000000..fb5b80a4d --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.1.js @@ -0,0 +1,65 @@ +// 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_A4.11_T2.1; + * @section: 11.13.2, 11.10.3; + * @assertion: The production x |= y is the same as x = x | y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object); + */ + +//CHECK#1 +x = true; +x |= 1; +if (x !== 1) { + $ERROR('#1: x = true; x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x |= true; +if (x !== 1) { + $ERROR('#2: x = 1; x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x |= 1; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = 1; x |= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x |= new Number(1); +if (x !== 1) { + $ERROR('#5: x = true; x |= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x |= true; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x |= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x |= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x |= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.2.js new file mode 100644 index 000000000..550a4d24d --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.2.js @@ -0,0 +1,79 @@ +// 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_A4.11_T2.2; + * @section: 11.13.2, 11.10.3; + * @assertion: The production x |= y is the same as x = x | y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object); +*/ + +//CHECK#1 +x = "1"; +x |= 1; +if (x !== 1) { + $ERROR('#1: x = "1"; x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x |= "1"; +if (x !== 1) { + $ERROR('#2: x = 1; x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x |= 1; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x |= new String("1"); +if (x !== 1) { + $ERROR('#4: x = 1; x |= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x |= new Number(1); +if (x !== 1) { + $ERROR('#5: x = "1"; x |= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x |= "1"; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x |= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new String("1"); x |= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x |= new String("1"); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x |= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x |= 1; +if (x !== 1) { + $ERROR('#9: x = "x"; x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x |= "x"; +if (x !== 1) { + $ERROR('#10: x = 1; x |= "x"; x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.3.js new file mode 100644 index 000000000..12a8a1fc0 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.3.js @@ -0,0 +1,37 @@ +// 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_A4.11_T2.3; + * @section: 11.13.2, 11.10.3; + * @assertion: The production x |= y is the same as x = x | y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null; + */ + +//CHECK#1 +x = 1; +x |= null; +if (x !== 1) { + $ERROR('#1: x = 1; x |= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x |= 1; +if (x !== 1) { + $ERROR('#2: x = null; x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x |= null; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x |= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x |= new Number(1); +if (x !== 1) { + $ERROR('#4: x = null; x |= new Number(1); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.4.js new file mode 100644 index 000000000..952d9f95a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.4.js @@ -0,0 +1,37 @@ +// 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_A4.11_T2.4; + * @section: 11.13.2, 11.10.3; + * @assertion: The production x |= y is the same as x = x | y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined; + */ + +//CHECK#1 +x = 1; +x |= undefined; +if (x !== 1) { + $ERROR('#1: x = 1; x |= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x |= 1; +if (x !== 1) { + $ERROR('#2: x = undefined; x |= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x |= undefined; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x |= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x |= new Number(1); +if (x !== 1) { + $ERROR('#4: x = undefined; x |= new Number(1); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.5.js new file mode 100644 index 000000000..1d653559a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.5.js @@ -0,0 +1,65 @@ +// 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_A4.11_T2.5; + * @section: 11.13.2, 11.10.3; + * @assertion: The production x |= y is the same as x = x | y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object); +*/ + +//CHECK#1 +x = true; +x |= "1"; +if (x !== 1) { + $ERROR('#1: x = true; x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x |= true; +if (x !== 1) { + $ERROR('#2: x = "1"; x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x |= "1"; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = "1"; x |= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x |= new String("1"); +if (x !== 1) { + $ERROR('#5: x = true; x |= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x |= true; +if (x !== 1) { + $ERROR('#6: x = new String("1"); x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x |= new String("1"); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x |= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new String("1"); x |= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.6.js new file mode 100644 index 000000000..31bb5f809 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.6.js @@ -0,0 +1,37 @@ +// 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_A4.11_T2.6; + * @section: 11.13.2, 11.10.3; + * @assertion: The production x |= y is the same as x = x | y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined; + */ + +//CHECK#1 +x = "1"; +x |= undefined; +if (x !== 1) { + $ERROR('#1: x = "1"; x |= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x |= "1"; +if (x !== 1) { + $ERROR('#2: x = undefined; x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x |= undefined; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x |= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x |= new String("1"); +if (x !== 1) { + $ERROR('#4: x = undefined; x |= new String("1"); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.7.js new file mode 100644 index 000000000..2ff06002e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.7.js @@ -0,0 +1,37 @@ +// 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_A4.11_T2.7; + * @section: 11.13.2, 11.10.3; + * @assertion: The production x |= y is the same as x = x | y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null; + */ + +//CHECK#1 +x = "1"; +x |= null; +if (x !== 1) { + $ERROR('#1: x = "1"; x |= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x |= "1"; +if (x !== 1) { + $ERROR('#2: x = null; x |= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x |= null; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x |= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x |= new String("1"); +if (x !== 1) { + $ERROR('#4: x = null; x |= new String("1"); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.8.js new file mode 100644 index 000000000..a931ee049 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.8.js @@ -0,0 +1,37 @@ +// 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_A4.11_T2.8; + * @section: 11.13.2, 11.10.3; + * @assertion: The production x |= y is the same as x = x | y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined; + */ + +//CHECK#1 +x = true; +x |= undefined; +if (x !== 1) { + $ERROR('#1: x = true; x |= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x |= true; +if (x !== 1) { + $ERROR('#2: x = undefined; x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x |= undefined; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x |= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = undefined; x |= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.9.js new file mode 100644 index 000000000..3b550584b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.11_T2.9.js @@ -0,0 +1,37 @@ +// 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_A4.11_T2.9; + * @section: 11.13.2, 11.10.3; + * @assertion: The production x |= y is the same as x = x | y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null; + */ + +//CHECK#1 +x = true; +x |= null; +if (x !== 1) { + $ERROR('#1: x = true; x |= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x |= true; +if (x !== 1) { + $ERROR('#2: x = null; x |= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x |= null; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x |= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x |= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = null; x |= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T1.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T1.1.js new file mode 100644 index 000000000..c04cab1e9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T1.1.js @@ -0,0 +1,37 @@ +// 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_A4.1_T1.1; + * @section: 11.13.2, 11.5.1; + * @assertion: The production x *= y is the same as the production x = x * y; + * @description: Type(x) and Type(y) vary between primitive boolean and Boolean object; + */ + +//CHECK#1 +x = true; +x *= true; +if (x !== 1) { + $ERROR('#1: x = true; x *= true; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x *= true; +if (x !== 1) { + $ERROR('#2: x = new Boolean(true); x *= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x *= new Boolean(true); +if (x !== 1) { + $ERROR('#3: x = true; x *= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x *= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = new Boolean(true); x *= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T1.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T1.2.js new file mode 100644 index 000000000..f8e67ce24 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T1.2.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: S11.13.2_A4.1_T1.2; + * @section: 11.13.2, 11.5.1; + * @assertion: The production x *= y is the same as the production x = x * y; + * @description: Type(x) and Type(y) vary between primitive number and Number object; +*/ + +//CHECK#1 +x = 1; +x *= 1; +if (x !== 1) { + $ERROR('#1: x = 1; x *= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x *= 1; +if (x !== 1) { + $ERROR('#2: x = new Number(1); x *= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x *= new Number(1); +if (x !== 1) { + $ERROR('#3: x = 1; x *= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x *= new Number(1); +if (x !== 1) { + $ERROR('#4: x = new Number(1); x *= new Number(1); x === 1. Actual: ' + (x)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T1.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T1.3.js new file mode 100644 index 000000000..fcc001c37 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T1.3.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: S11.13.2_A4.1_T1.3; + * @section: 11.13.2, 11.5.1; + * @assertion: The production x *= y is the same as the production x = x * y; + * @description: Type(x) and Type(y) vary between primitive string and String object; +*/ + +//CHECK#1 +x = "1"; +x *= "1"; +if (x !== 1) { + $ERROR('#1: x = "1"; x *= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x *= "1"; +if (x !== 1) { + $ERROR('#2: x = new String("1"); x *= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x *= new String("1"); +if (x !== 1) { + $ERROR('#3: x = "1"; x *= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x *= new String("1"); +if (x !== 1) { + $ERROR('#4: x = new String("1"); x *= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x *= "1"; +if (isNaN(x) !== true) { + $ERROR('#5: x = "x"; x *= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x *= "x"; +if (isNaN(x) !== true) { + $ERROR('#6: x = "1"; x *= "x"; x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T1.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T1.4.js new file mode 100644 index 000000000..321a01086 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T1.4.js @@ -0,0 +1,37 @@ +// 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_A4.1_T1.4; + * @section: 11.13.2, 11.5.1; + * @assertion: The production x *= y is the same as the production x = x * y; + * @description: Type(x) and Type(y) vary between Null and Undefined; + */ + +//CHECK#1 +x = null; +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = null; x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x *= null; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x *= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = undefined; x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x *= null; +if (x !== 0) { + $ERROR('#4: x = null; x *= null; x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.1.js new file mode 100644 index 000000000..48e146f7a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.1.js @@ -0,0 +1,65 @@ +// 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_A4.1_T2.1; + * @section: 11.13.2, 11.5.1; + * @assertion: The production x *= y is the same as the production x = x * y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Number (primitive and object); + */ + +//CHECK#1 +x = true; +x *= 1; +if (x !== 1) { + $ERROR('#1: x = true; x *= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x *= true; +if (x !== 1) { + $ERROR('#2: x = 1; x *= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x *= 1; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x *= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x *= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = 1; x *= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x *= new Number(1); +if (x !== 1) { + $ERROR('#5: x = true; x *= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x *= true; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x *= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x *= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x *= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x *= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x *= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.2.js new file mode 100644 index 000000000..a22c75aef --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.2.js @@ -0,0 +1,79 @@ +// 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_A4.1_T2.2; + * @section: 11.13.2, 11.5.1; + * @assertion: The production x *= y is the same as the production x = x * y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object); +*/ + +//CHECK#1 +x = "1"; +x *= 1; +if (x !== 1) { + $ERROR('#1: x = "1"; x *= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x *= "1"; +if (x !== 1) { + $ERROR('#2: x = 1; x *= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x *= 1; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x *= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x *= new String("1"); +if (x !== 1) { + $ERROR('#4: x = 1; x *= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x *= new Number(1); +if (x !== 1) { + $ERROR('#5: x = "1"; x *= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x *= "1"; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x *= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x *= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new String("1"); x *= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x *= new String("1"); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x *= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x *= 1; +if (isNaN(x) !== true) { + $ERROR('#9: x = "x"; x *= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x *= "x"; +if (isNaN(x) !== true) { + $ERROR('#10: x = 1; x *= "x"; x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.3.js new file mode 100644 index 000000000..a95f4c597 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.3.js @@ -0,0 +1,37 @@ +// 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_A4.1_T2.3; + * @section: 11.13.2, 11.5.1; + * @assertion: The production x *= y is the same as the production x = x * y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null; + */ + +//CHECK#1 +x = 1; +x *= null; +if (x !== 0) { + $ERROR('#1: x = 1; x *= null; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x *= 1; +if (x !== 0) { + $ERROR('#2: x = null; x *= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x *= null; +if (x !== 0) { + $ERROR('#3: x = new Number(1); x *= null; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x *= new Number(1); +if (x !== 0) { + $ERROR('#4: x = null; x *= new Number(1); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.4.js new file mode 100644 index 000000000..8d13dab82 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.4.js @@ -0,0 +1,37 @@ +// 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_A4.1_T2.4; + * @section: 11.13.2, 11.5.1; + * @assertion: The production x *= y is the same as the production x = x * y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined; + */ + +//CHECK#1 +x = 1; +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = 1; x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x *= 1; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x *= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Number(1); x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x *= new Number(1); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x *= new Number(1); x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.5.js new file mode 100644 index 000000000..140c59b56 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.5.js @@ -0,0 +1,65 @@ +// 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_A4.1_T2.5; + * @section: 11.13.2, 11.5.1; + * @assertion: The production x *= y is the same as the production x = x * y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) amd Boolean (primitive and object); +*/ + +//CHECK#1 +x = true; +x *= "1"; +if (x !== 1) { + $ERROR('#1: x = true; x *= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x *= true; +if (x !== 1) { + $ERROR('#2: x = "1"; x *= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x *= "1"; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x *= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x *= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = "1"; x *= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x *= new String("1"); +if (x !== 1) { + $ERROR('#5: x = true; x *= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x *= true; +if (x !== 1) { + $ERROR('#6: x = new String("1"); x *= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x *= new String("1"); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x *= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x *= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new String("1"); x *= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.6.js new file mode 100644 index 000000000..8db139b50 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.6.js @@ -0,0 +1,37 @@ +// 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_A4.1_T2.6; + * @section: 11.13.2, 11.5.1; + * @assertion: The production x *= y is the same as the production x = x * y; + * @description: Type(x) is different from Type(y) and both types vary between primitive String (primitive or object) and Undefined; + */ + +//CHECK#1 +x = "1"; +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = "1"; x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x *= "1"; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x *= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new String("1"); x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x *= new String("1"); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x *= new String("1"); x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.7.js new file mode 100644 index 000000000..a0a2f272f --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.7.js @@ -0,0 +1,37 @@ +// 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_A4.1_T2.7; + * @section: 11.13.2, 11.5.1; + * @assertion: The production x *= y is the same as the production x = x * y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null; + */ + +//CHECK#1 +x = "1"; +x *= null; +if (x !== 0) { + $ERROR('#1: x = "1"; x *= null; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x *= "1"; +if (x !== 0) { + $ERROR('#2: x = null; x *= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x *= null; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x *= null; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x *= new String("1"); +if (x !== 0) { + $ERROR('#4: x = null; x *= new String("1"); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.8.js new file mode 100644 index 000000000..eb68dec8c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.8.js @@ -0,0 +1,37 @@ +// 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_A4.1_T2.8; + * @section: 11.13.2, 11.5.1; + * @assertion: The production x *= y is the same as the production x = x * y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined; + */ + +//CHECK#1 +x = true; +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = true; x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x *= true; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x *= true; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x *= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Boolean(true); x *= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x *= new Boolean(true); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x *= new Boolean(true); x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.9.js new file mode 100644 index 000000000..571277dd2 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.1_T2.9.js @@ -0,0 +1,37 @@ +// 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_A4.1_T2.9; + * @section: 11.13.2, 11.5.1; + * @assertion: The production x *= y is the same as the production x = x * y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null; + */ + +//CHECK#1 +x = true; +x *= null; +if (x !== 0) { + $ERROR('#1: x = true; x *= null; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x *= true; +if (x !== 0) { + $ERROR('#2: x = null; x *= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x *= null; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x *= null; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x *= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = null; x *= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T1.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T1.1.js new file mode 100644 index 000000000..a81965545 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T1.1.js @@ -0,0 +1,37 @@ +// 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_A4.2_T1.1; + * @section: 11.13.2, 11.5.2; + * @assertion: The production x /= y is the same as x = x / y; + * @description: Type(x) and Type(y) vary between primitive boolean and Boolean object; + */ + +//CHECK#1 +x = true; +x /= true; +if (x !== 1) { + $ERROR('#1: x = true; x /= true; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x /= true; +if (x !== 1) { + $ERROR('#2: x = new Boolean(true); x /= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x /= new Boolean(true); +if (x !== 1) { + $ERROR('#3: x = true; x /= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x /= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = new Boolean(true); x /= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T1.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T1.2.js new file mode 100644 index 000000000..ef50dab10 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T1.2.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: S11.13.2_A4.2_T1.2; + * @section: 11.13.2, 11.5.2; + * @assertion: The production x /= y is the same as x = x / y; + * @description: Type(x) and Type(y) vary between primitive number and Number object; +*/ + +//CHECK#1 +x = 1; +x /= 1; +if (x !== 1) { + $ERROR('#1: x = 1; x /= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x /= 1; +if (x !== 1) { + $ERROR('#2: x = new Number(1); x /= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x /= new Number(1); +if (x !== 1) { + $ERROR('#3: x = 1; x /= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x /= new Number(1); +if (x !== 1) { + $ERROR('#4: x = new Number(1); x /= new Number(1); x === 1. Actual: ' + (x)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T1.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T1.3.js new file mode 100644 index 000000000..777168afc --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T1.3.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: S11.13.2_A4.2_T1.3; + * @section: 11.13.2, 11.5.2; + * @assertion: The production x /= y is the same as x = x / y; + * @description: Type(x) and Type(y) vary between primitive string and String object; +*/ + +//CHECK#1 +x = "1"; +x /= "1"; +if (x !== 1) { + $ERROR('#1: x = "1"; x /= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x /= "1"; +if (x !== 1) { + $ERROR('#2: x = new String("1"); x /= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x /= new String("1"); +if (x !== 1) { + $ERROR('#3: x = "1"; x /= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x /= new String("1"); +if (x !== 1) { + $ERROR('#4: x = new String("1"); x /= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x /= "1"; +if (isNaN(x) !== true) { + $ERROR('#5: x = "x"; x /= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x /= "x"; +if (isNaN(x) !== true) { + $ERROR('#6: x = "1"; x /= "x"; x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T1.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T1.4.js new file mode 100644 index 000000000..d9869b6c8 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T1.4.js @@ -0,0 +1,37 @@ +// 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_A4.2_T1.4; + * @section: 11.13.2, 11.5.2; + * @assertion: The production x /= y is the same as x = x / y; + * @description: Type(x) and Type(y) vary between Null and Undefined; + */ + +//CHECK#1 +x = null; +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = null; x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x /= null; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x /= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = undefined; x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x /= null; +if (isNaN(x) !== true) { + $ERROR('#4: x = null; x /= null; x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.1.js new file mode 100644 index 000000000..01927117f --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.1.js @@ -0,0 +1,65 @@ +// 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_A4.2_T2.1; + * @section: 11.13.2, 11.5.2; + * @assertion: The production x /= y is the same as x = x / y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object); + */ + +//CHECK#1 +x = true; +x /= 1; +if (x !== 1) { + $ERROR('#1: x = true; x /= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x /= true; +if (x !== 1) { + $ERROR('#2: x = 1; x /= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x /= 1; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x /= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x /= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = 1; x /= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x /= new Number(1); +if (x !== 1) { + $ERROR('#5: x = true; x /= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x /= true; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x /= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x /= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x /= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x /= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x /= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.2.js new file mode 100644 index 000000000..27bca2e1c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.2.js @@ -0,0 +1,79 @@ +// 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_A4.2_T2.2; + * @section: 11.13.2, 11.5.2; + * @assertion: The production x /= y is the same as x = x / y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object); +*/ + +//CHECK#1 +x = "1"; +x /= 1; +if (x !== 1) { + $ERROR('#1: x = "1"; x /= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x /= "1"; +if (x !== 1) { + $ERROR('#2: x = 1; x /= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x /= 1; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x /= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x /= new String("1"); +if (x !== 1) { + $ERROR('#4: x = 1; x /= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x /= new Number(1); +if (x !== 1) { + $ERROR('#5: x = "1"; x /= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x /= "1"; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x /= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x /= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new String("1"); x /= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x /= new String("1"); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x /= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x /= 1; +if (isNaN(x) !== true) { + $ERROR('#9: x = "x"; x /= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x /= "x"; +if (isNaN(x) !== true) { + $ERROR('#10: x = 1; x /= "x"; x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.3.js new file mode 100644 index 000000000..c3cfa4b89 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.3.js @@ -0,0 +1,37 @@ +// 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_A4.2_T2.3; + * @section: 11.13.2, 11.5.2; + * @assertion: The production x /= y is the same as x = x / y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null; + */ + +//CHECK#1 +x = 1; +x /= null; +if (x !== Number.POSITIVE_INFINITY) { + $ERROR('#1: x = 1; x /= null; x === +Infinity. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x /= 1; +if (x !== 0) { + $ERROR('#2: x = null; x /= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x /= null; +if (x !== Number.POSITIVE_INFINITY) { + $ERROR('#3: x = new Number(1); x /= null; x === +Infinity. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x /= new Number(1); +if (x !== 0) { + $ERROR('#4: x = null; x /= new Number(1); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.4.js new file mode 100644 index 000000000..92a838a92 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.4.js @@ -0,0 +1,37 @@ +// 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_A4.2_T2.4; + * @section: 11.13.2, 11.5.2; + * @assertion: The production x /= y is the same as x = x / y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined; + */ + +//CHECK#1 +x = 1; +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = 1; x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x /= 1; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x /= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Number(1); x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x /= new Number(1); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x /= new Number(1); x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.5.js new file mode 100644 index 000000000..35c75b3cb --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.5.js @@ -0,0 +1,65 @@ +// 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_A4.2_T2.5; + * @section: 11.13.2, 11.5.2; + * @assertion: The production x /= y is the same as x = x / y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object); +*/ + +//CHECK#1 +x = true; +x /= "1"; +if (x !== 1) { + $ERROR('#1: x = true; x /= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x /= true; +if (x !== 1) { + $ERROR('#2: x = "1"; x /= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x /= "1"; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x /= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x /= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = "1"; x /= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x /= new String("1"); +if (x !== 1) { + $ERROR('#5: x = true; x /= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x /= true; +if (x !== 1) { + $ERROR('#6: x = new String("1"); x /= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x /= new String("1"); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x /= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x /= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new String("1"); x /= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.6.js new file mode 100644 index 000000000..2322b5f3e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.6.js @@ -0,0 +1,37 @@ +// 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_A4.2_T2.6; + * @section: 11.13.2, 11.5.2; + * @assertion: The production x /= y is the same as x = x / y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined; + */ + +//CHECK#1 +x = "1"; +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = "1"; x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x /= "1"; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x /= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new String("1"); x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x /= new String("1"); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x /= new String("1"); x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.7.js new file mode 100644 index 000000000..eabc0c031 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.7.js @@ -0,0 +1,37 @@ +// 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_A4.2_T2.7; + * @section: 11.13.2, 11.5.2; + * @assertion: The production x /= y is the same as x = x / y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null; + */ + +//CHECK#1 +x = "1"; +x /= null; +if (x !== Number.POSITIVE_INFINITY) { + $ERROR('#1: x = "1"; x /= null; x === +Infinity. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x /= "1"; +if (x !== 0) { + $ERROR('#2: x = null; x /= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x /= null; +if (x !== Number.POSITIVE_INFINITY) { + $ERROR('#3: x = new String("1"); x /= null; x === +Infinity. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x /= new String("1"); +if (x !== 0) { + $ERROR('#4: x = null; x /= new String("1"); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.8.js new file mode 100644 index 000000000..61525c493 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.8.js @@ -0,0 +1,37 @@ +// 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_A4.2_T2.8; + * @section: 11.13.2, 11.5.2; + * @assertion: The production x /= y is the same as x = x / y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined; + */ + +//CHECK#1 +x = true; +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = true; x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x /= true; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x /= true; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x /= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Boolean(true); x /= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x /= new Boolean(true); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x /= new Boolean(true); x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.9.js new file mode 100644 index 000000000..8aec6395e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.2_T2.9.js @@ -0,0 +1,37 @@ +// 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_A4.2_T2.9; + * @section: 11.13.2, 11.5.2; + * @assertion: The production x /= y is the same as x = x / y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null; + */ + +//CHECK#1 +x = true; +x /= null; +if (x !== Number.POSITIVE_INFINITY) { + $ERROR('#1: x = true; x /= null; x === +Infinity. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x /= true; +if (x !== 0) { + $ERROR('#2: x = null; x /= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x /= null; +if (x !== Number.POSITIVE_INFINITY) { + $ERROR('#3: x = new Boolean(true); x /= null; x === +Infinity. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x /= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = null; x /= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T1.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T1.1.js new file mode 100644 index 000000000..954fef612 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T1.1.js @@ -0,0 +1,37 @@ +// 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_A4.3_T1.1; + * @section: 11.13.2, 11.5.3; + * @assertion: The production x %= y is the same as x = x % y; + * @description: Type(x) and Type(y) vary between primitive boolean and Boolean object; + */ + +//CHECK#1 +x = true; +x %= true; +if (x !== 0) { + $ERROR('#1: x = true; x %= true; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x %= true; +if (x !== 0) { + $ERROR('#2: x = new Boolean(true); x %= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x %= new Boolean(true); +if (x !== 0) { + $ERROR('#3: x = true; x %= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x %= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = new Boolean(true); x %= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T1.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T1.2.js new file mode 100644 index 000000000..7d56c91b1 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T1.2.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: S11.13.2_A4.3_T1.2; + * @section: 11.13.2, 11.5.3; + * @assertion: The production x %= y is the same as x = x % y; + * @description: Type(x) and Type(y) vary between primitive number and Number object; +*/ + +//CHECK#1 +x = 1; +x %= 1; +if (x !== 0) { + $ERROR('#1: x = 1; x %= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x %= 1; +if (x !== 0) { + $ERROR('#2: x = new Number(1); x %= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x %= new Number(1); +if (x !== 0) { + $ERROR('#3: x = 1; x %= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x %= new Number(1); +if (x !== 0) { + $ERROR('#4: x = new Number(1); x %= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T1.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T1.3.js new file mode 100644 index 000000000..7dd40a5ad --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T1.3.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: S11.13.2_A4.3_T1.3; + * @section: 11.13.2, 11.5.3; + * @assertion: The production x %= y is the same as x = x % y; + * @description: Type(x) and Type(y) vary between primitive string and String object; +*/ + +//CHECK#1 +x = "1"; +x %= "1"; +if (x !== 0) { + $ERROR('#1: x = "1"; x %= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x %= "1"; +if (x !== 0) { + $ERROR('#2: x = new String("1"); x %= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x %= new String("1"); +if (x !== 0) { + $ERROR('#3: x = "1"; x %= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x %= new String("1"); +if (x !== 0) { + $ERROR('#4: x = new String("1"); x %= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x %= "1"; +if (isNaN(x) !== true) { + $ERROR('#5: x = "x"; x %= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x %= "x"; +if (isNaN(x) !== true) { + $ERROR('#6: x = "1"; x %= "x"; x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T1.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T1.4.js new file mode 100644 index 000000000..52122533e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T1.4.js @@ -0,0 +1,37 @@ +// 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_A4.3_T1.4; + * @section: 11.13.2, 11.5.3; + * @assertion: The production x %= y is the same as x = x % y; + * @description: Type(x) and Type(y) vary between Null and Undefined; + */ + +//CHECK#1 +x = null; +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = null; x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x %= null; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x %= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = undefined; x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x %= null; +if (isNaN(x) !== true) { + $ERROR('#4: x = null; x %= null; x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.1.js new file mode 100644 index 000000000..982187c00 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.1.js @@ -0,0 +1,65 @@ +// 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_A4.3_T2.1; + * @section: 11.13.2, 11.5.3; + * @assertion: The production x %= y is the same as x = x % y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object); +*/ + +//CHECK#1 +x = true; +x %= 1; +if (x !== 0) { + $ERROR('#1: x = true; x %= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x %= true; +if (x !== 0) { + $ERROR('#2: x = 1; x %= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x %= 1; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x %= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x %= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = 1; x %= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x %= new Number(1); +if (x !== 0) { + $ERROR('#5: x = true; x %= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x %= true; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x %= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x %= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x %= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x %= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x %= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.2.js new file mode 100644 index 000000000..70b00e892 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.2.js @@ -0,0 +1,79 @@ +// 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_A4.3_T2.2; + * @section: 11.13.2, 11.5.3; + * @assertion: The production x %= y is the same as x = x % y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object); +*/ + +//CHECK#1 +x = "1"; +x %= 1; +if (x !== 0) { + $ERROR('#1: x = "1"; x %= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x %= "1"; +if (x !== 0) { + $ERROR('#2: x = 1; x %= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x %= 1; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x %= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x %= new String("1"); +if (x !== 0) { + $ERROR('#4: x = 1; x %= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x %= new Number(1); +if (x !== 0) { + $ERROR('#5: x = "1"; x %= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x %= "1"; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x %= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x %= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new String("1"); x %= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x %= new String("1"); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x %= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x %= 1; +if (isNaN(x) !== true) { + $ERROR('#9: x = "x"; x %= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x %= "x"; +if (isNaN(x) !== true) { + $ERROR('#10: x = 1; x %= "x"; x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.3.js new file mode 100644 index 000000000..8cc97f61e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.3.js @@ -0,0 +1,37 @@ +// 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_A4.3_T2.3; + * @section: 11.13.2, 11.5.3; + * @assertion: The production x %= y is the same as x = x % y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null; + */ + +//CHECK#1 +x = 1; +x %= null; +if (isNaN(x) !== true) { + $ERROR('#1: x = 1; x %= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x %= 1; +if (x !== 0) { + $ERROR('#2: x = null; x %= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x %= null; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Number(1); x %= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x %= new Number(1); +if (x !== 0) { + $ERROR('#4: x = null; x %= new Number(1); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.4.js new file mode 100644 index 000000000..779ef3af4 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.4.js @@ -0,0 +1,37 @@ +// 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_A4.3_T2.4; + * @section: 11.13.2, 11.5.3; + * @assertion: The production x %= y is the same as x = x % y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined; + */ + +//CHECK#1 +x = 1; +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = 1; x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x %= 1; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x %= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Number(1); x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x %= new Number(1); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x %= new Number(1); x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.5.js new file mode 100644 index 000000000..0032d59f8 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.5.js @@ -0,0 +1,65 @@ +// 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_A4.3_T2.5; + * @section: 11.13.2, 11.5.3; + * @assertion: The production x %= y is the same as x = x % y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object); +*/ + +//CHECK#1 +x = true; +x %= "1"; +if (x !== 0) { + $ERROR('#1: x = true; x %= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x %= true; +if (x !== 0) { + $ERROR('#2: x = "1"; x %= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x %= "1"; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x %= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x %= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = "1"; x %= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x %= new String("1"); +if (x !== 0) { + $ERROR('#5: x = true; x %= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x %= true; +if (x !== 0) { + $ERROR('#6: x = new String("1"); x %= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x %= new String("1"); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x %= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x %= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new String("1"); x %= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.6.js new file mode 100644 index 000000000..e52994c5a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.6.js @@ -0,0 +1,37 @@ +// 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_A4.3_T2.6; + * @section: 11.13.2, 11.5.3; + * @assertion: The production x %= y is the same as x = x % y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined; + */ + +//CHECK#1 +x = "1"; +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = "1"; x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x %= "1"; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x %= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new String("1"); x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x %= new String("1"); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x %= new String("1"); x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.7.js new file mode 100644 index 000000000..63d9e673e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.7.js @@ -0,0 +1,37 @@ +// 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_A4.3_T2.7; + * @section: 11.13.2, 11.5.3; + * @assertion: The production x %= y is the same as x = x % y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null; + */ + +//CHECK#1 +x = "1"; +x %= null; +if (isNaN(x) !== true) { + $ERROR('#1: x = "1"; x %= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x %= "1"; +if (x !== 0) { + $ERROR('#2: x = null; x %= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x %= null; +if (isNaN(x) !== true) { + $ERROR('#3: x = new String("1"); x %= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x %= new String("1"); +if (x !== 0) { + $ERROR('#4: x = null; x %= new String("1"); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.8.js new file mode 100644 index 000000000..a484981a7 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.8.js @@ -0,0 +1,37 @@ +// 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_A4.3_T2.8; + * @section: 11.13.2, 11.5.3; + * @assertion: The production x %= y is the same as x = x % y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined; + */ + +//CHECK#1 +x = true; +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = true; x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x %= true; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x %= true; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x %= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Boolean(true); x %= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x %= new Boolean(true); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x %= new Boolean(true); x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.9.js new file mode 100644 index 000000000..0870a79d9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.3_T2.9.js @@ -0,0 +1,37 @@ +// 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_A4.3_T2.9; + * @section: 11.13.2, 11.5.3; + * @assertion: The production x %= y is the same as x = x % y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null; + */ + +//CHECK#1 +x = true; +x %= null; +if (isNaN(x) !== true) { + $ERROR('#1: x = true; x %= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x %= true; +if (x !== 0) { + $ERROR('#2: x = null; x %= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x %= null; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Boolean(true); x %= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x %= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = null; x %= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T1.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T1.1.js new file mode 100644 index 000000000..ce9ed5c42 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T1.1.js @@ -0,0 +1,37 @@ +// 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_A4.4_T1.1; + * @section: 11.13.2, 11.6.1; + * @assertion: The production x += y is the same as x = x + y; + * @description: Type(x) and Type(y) vary between primitive boolean and Boolean object; + */ + +//CHECK#1 +x = true; +x += true; +if (x !== 2) { + $ERROR('#1: x = true; x += true; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x += true; +if (x !== 2) { + $ERROR('#2: x = new Boolean(true); x += true; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x += new Boolean(true); +if (x !== 2) { + $ERROR('#3: x = true; x += new Boolean(true); x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x += new Boolean(true); +if (x !== 2) { + $ERROR('#4: x = new Boolean(true); x += new Boolean(true); x === 2. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T1.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T1.2.js new file mode 100644 index 000000000..549e6321e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T1.2.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: S11.13.2_A4.4_T1.2; + * @section: 11.13.2, 11.6.1; + * @assertion: The production x += y is the same as x = x + y; + * @description: Type(x) and Type(y) vary between primitive number and Number object; +*/ + +//CHECK#1 +x = 1; +x += 1; +if (x !== 2) { + $ERROR('#1: x = 1; x += 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x += 1; +if (x !== 2) { + $ERROR('#2: x = new Number(1); x += 1; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x += new Number(1); +if (x !== 2) { + $ERROR('#3: x = 1; x += new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x += new Number(1); +if (x !== 2) { + $ERROR('#4: x = new Number(1); x += new Number(1); x === 2. Actual: ' + (x)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T1.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T1.3.js new file mode 100644 index 000000000..6bf7dbc3c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T1.3.js @@ -0,0 +1,37 @@ +// 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_A4.4_T1.3; + * @section: 11.13.2, 11.6.1; + * @assertion: The production x += y is the same as x = x + y; + * @description: Type(x) and Type(y) vary between Null and Undefined; + */ + +//CHECK#1 +x = null; +x += undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = null; x += undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x += null; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x += null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x += undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = undefined; x += undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x += null; +if (x !== 0) { + $ERROR('#4: x = null; x += null; x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T1.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T1.4.js new file mode 100644 index 000000000..778d4b039 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T1.4.js @@ -0,0 +1,49 @@ +// Copyright 2009 the Sputnik authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/** + * @name: S11.13.2_A4.4_T1.4; + * @section: 11.13.2, 11.6.1; + * @assertion: The production x += y is the same as x = x + y; + * @description: Type(x) and Type(y) vary between primitive string and String object; +*/ + +//CHECK#1 +x = "1"; +x += "1"; +if (x !== "11") { + $ERROR('#1: x = "1"; x += "1"; x === "11". Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x += "1"; +if (x !== "11") { + $ERROR('#2: x = new String("1"); x += "1"; x === "11". Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x += new String("1"); +if (x !== "11") { + $ERROR('#3: x = "1"; x += new String("1"); x === "11". Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x += new String("1"); +if (x !== "11") { + $ERROR('#4: x = new String("1"); x += new String("1"); x === "11". Actual: ' + (x)); +} + +//CHECK#5 +if ("x" + "1" !=="x1") { + $ERROR('#5: x = "x"; x += "1"; x === "x1". Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x += "x"; +if (x !== "1x") { + $ERROR('#6: x = "1"; x += "x"; x === "1x". Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.1.js new file mode 100644 index 000000000..28b80f896 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.1.js @@ -0,0 +1,65 @@ +// 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_A4.4_T2.1; + * @section: 11.13.2, 11.6.1; + * @assertion: The production x += y is the same as x = x + y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object); + */ + +//CHECK#1 +x = true; +x += 1; +if (x !== 2) { + $ERROR('#1: x = true; x += 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x += true; +if (x !== 2) { + $ERROR('#2: x = 1; x += true; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x += 1; +if (x !== 2) { + $ERROR('#3: x = new Boolean(true); x += 1; x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x += new Boolean(true); +if (x !== 2) { + $ERROR('#4: x = 1; x += new Boolean(true); x === 2. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x += new Number(1); +if (x !== 2) { + $ERROR('#5: x = true; x += new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x += true; +if (x !== 2) { + $ERROR('#6: x = new Number(1); x += true; x === 2. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x += new Number(1); +if (x !== 2) { + $ERROR('#7: x = new Boolean(true); x += new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x += new Boolean(true); +if (x !== 2) { + $ERROR('#8: x = new Number(1); x += new Boolean(true); x === 2. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.2.js new file mode 100644 index 000000000..19ac09329 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.2.js @@ -0,0 +1,37 @@ +// 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_A4.4_T2.2; + * @section: 11.13.2, 11.6.1; + * @assertion: The production x += y is the same as x = x + y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null; + */ + +//CHECK#1 +x = 1; +x += null; +if (x !== 1) { + $ERROR('#1: x = 1; x += null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x += 1; +if (x !== 1) { + $ERROR('#2: x = null; x += 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x += null; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x += null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x += new Number(1); +if (x !== 1) { + $ERROR('#4: x = null; x += new Number(1); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.3.js new file mode 100644 index 000000000..bf8b2eae9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.3.js @@ -0,0 +1,37 @@ +// 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_A4.4_T2.3; + * @section: 11.13.2, 11.6.1; + * @assertion: The production x += y is the same as x = x + y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined; + */ + +//CHECK#1 +x = 1; +x += undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = 1; x += undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x += 1; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x += 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x += undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Number(1); x += undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x += new Number(1); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x += new Number(1); x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.4.js new file mode 100644 index 000000000..41a35ad91 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.4.js @@ -0,0 +1,37 @@ +// 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_A4.4_T2.4; + * @section: 11.13.2, 11.6.1; + * @assertion: The production x += y is the same as x = x + y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined; + */ + +//CHECK#1 +x = true; +x += undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = true; x += undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x += true; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x += true; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x += undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Boolean(true); x += undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x += new Boolean(true); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x += new Boolean(true); x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.5.js new file mode 100644 index 000000000..5fe192ddf --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.5.js @@ -0,0 +1,37 @@ +// 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_A4.4_T2.5; + * @section: 11.13.2, 11.6.1; + * @assertion: The production x += y is the same as x = x + y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null; + */ + +//CHECK#1 +x = true; +x += null; +if (x !== 1) { + $ERROR('#1: x = true; x += null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x += true; +if (x !== 1) { + $ERROR('#2: x = null; x += true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x += null; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x += null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x += new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = null; x += new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.6.js new file mode 100644 index 000000000..2c56cf4ec --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.6.js @@ -0,0 +1,77 @@ +// 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_A4.4_T2.6; + * @section: 11.13.2, 11.6.1; + * @assertion: The production x += y is the same as x = x + y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object); +*/ + +//CHECK#1 +x = "1"; +x += 1; +if (x !== "11") { + $ERROR('#1: x = "1"; x += 1; x === "11". Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x += "1"; +if (x !== "11") { + $ERROR('#2: x = 1; x += "1"; x === "11". Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x += 1; +if (x !== "11") { + $ERROR('#3: x = new String("1"); x += 1; x === "11". Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x += new String("1"); +if (x !== "11") { + $ERROR('#4: x = 1; x += new String("1"); x === "11". Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x += new Number(1); +if (x !== "11") { + $ERROR('#5: x = "1"; x += new Number(1); x === "11". Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x += "1"; +if (x !== "11") { + $ERROR('#6: x = new Number(1); x += "1"; x === "11". Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x += new Number(1); +if (x !== "11") { + $ERROR('#7: x = new String("1"); x += new Number(1); x === "11". Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x += new String("1"); +if (x !== "11") { + $ERROR('#8: x = new Number(1); x += new String("1"); x === "11". Actual: ' + (x)); +} + +//CHECK#9 +if ("x" + 1 !=="x1") { + $ERROR('#9: x = "x"; x += 1; x === "x1". Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x += "x"; +if (x !== "1x") { + $ERROR('#10: x = 1; x += "x"; x === "1x". Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.7.js new file mode 100644 index 000000000..5ffb9b1db --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.7.js @@ -0,0 +1,65 @@ +// 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_A4.4_T2.7; + * @section: 11.13.2, 11.6.1; + * @assertion: The production x += y is the same as x = x + y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object); +*/ + +//CHECK#1 +x = true; +x += "1"; +if (x !== "true1") { + $ERROR('#1: x = true; x += "1"; x === "true1". Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x += true; +if (x !== "1true") { + $ERROR('#2: x = "1"; x += true; x === "1true". Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x += "1"; +if (x !== "true1") { + $ERROR('#3: x = new Boolean(true); x += "1"; x === "true1". Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x += new Boolean(true); +if (x !== "1true") { + $ERROR('#4: x = "1"; x += new Boolean(true); x === "1true". Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x += new String("1"); +if (x !== "true1") { + $ERROR('#5: x = true; x += new String("1"); x === "true1". Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x += true; +if (x !== "1true") { + $ERROR('#6: x = new String("1"); x += true; x === "1true". Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x += new String("1"); +if (x !== "true1") { + $ERROR('#7: x = new Boolean(true); x += new String("1"); x === "true1". Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x += new Boolean(true); +if (x !== "1true") { + $ERROR('#8: x = new String("1"); x += new Boolean(true); x === "1true". Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.8.js new file mode 100644 index 000000000..4b47b57bc --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.8.js @@ -0,0 +1,37 @@ +// 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_A4.4_T2.8; + * @section: 11.13.2, 11.6.1; + * @assertion: The production x += y is the same as x = x + y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined; + */ + +//CHECK#1 +x = "1"; +x += undefined; +if (x !== "1undefined") { + $ERROR('#1: x = "1"; x += undefined; x === "1undefined". Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x += "1"; +if (x !== "undefined1") { + $ERROR('#2: x = undefined; x += "1"; x === "undefined1". Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x += undefined; +if (x !== "1undefined") { + $ERROR('#3: x = new String("1"); x += undefined; x === "1undefined". Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x += new String("1"); +if (x !== "undefined1") { + $ERROR('#4: x = undefined; x += new String("1"); x === "undefined1". Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.9.js new file mode 100644 index 000000000..cd7e884ea --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.4_T2.9.js @@ -0,0 +1,37 @@ +// 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_A4.4_T2.9; + * @section: 11.13.2, 11.6.1; + * @assertion: The production x += y is the same as x = x + y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null; + */ + +//CHECK#1 +x = "1"; +x += null; +if (x !== "1null") { + $ERROR('#1: x = "1"; x += null; x === "1null". Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x += "1"; +if (x !== "null1") { + $ERROR('#2: x = null; x += "1"; x === "null1". Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x += null; +if (x !== "1null") { + $ERROR('#3: x = new String("1"); x += null; x === "1null". Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x += new String("1"); +if (x !== "null1") { + $ERROR('#4: x = null; x += new String("1"); x === "null1". Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T1.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T1.1.js new file mode 100644 index 000000000..4cdb840e0 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T1.1.js @@ -0,0 +1,37 @@ +// 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_A4.5_T1.1; + * @section: 11.13.2, 11.6.2; + * @assertion: The production x -= y is the same as x = x - y; + * @description: Type(x) and Type(y) vary between primitive boolean and Boolean object; + */ + +//CHECK#1 +x = true; +x -= true; +if (x !== 0) { + $ERROR('#1: x = true; x -= true; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x -= true; +if (x !== 0) { + $ERROR('#2: x = new Boolean(true); x -= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x -= new Boolean(true); +if (x !== 0) { + $ERROR('#3: x = true; x -= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x -= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = new Boolean(true); x -= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T1.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T1.2.js new file mode 100644 index 000000000..a611daf66 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T1.2.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: S11.13.2_A4.5_T1.2; + * @section: 11.13.2, 11.6.2; + * @assertion: The production x -= y is the same as x = x - y; + * @description: Type(x) and Type(y) vary between primitive number and Number object; +*/ + +//CHECK#1 +x = 1; +x -= 1; +if (x !== 0) { + $ERROR('#1: x = 1; x -= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x -= 1; +if (x !== 0) { + $ERROR('#2: x = new Number(1); x -= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x -= new Number(1); +if (x !== 0) { + $ERROR('#3: x = 1; x -= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x -= new Number(1); +if (x !== 0) { + $ERROR('#4: x = new Number(1); x -= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T1.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T1.3.js new file mode 100644 index 000000000..2babc304f --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T1.3.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: S11.13.2_A4.5_T1.3; + * @section: 11.13.2, 11.6.2; + * @assertion: The production x -= y is the same as x = x - y; + * @description: Type(x) and Type(y) vary between primitive string and String object; +*/ + +//CHECK#1 +x = "1"; +x -= "1"; +if (x !== 0) { + $ERROR('#1: x = "1"; x -= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x -= "1"; +if (x !== 0) { + $ERROR('#2: x = new String("1"); x -= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x -= new String("1"); +if (x !== 0) { + $ERROR('#3: x = "1"; x -= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x -= new String("1"); +if (x !== 0) { + $ERROR('#4: x = new String("1"); x -= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x -= "1"; +if (isNaN(x) !== true) { + $ERROR('#5: x = "x"; x -= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x -= "x"; +if (isNaN(x) !== true) { + $ERROR('#6: x = "1"; x -= "x"; x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T1.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T1.4.js new file mode 100644 index 000000000..c957e2fe9 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T1.4.js @@ -0,0 +1,37 @@ +// 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_A4.5_T1.4; + * @section: 11.13.2, 11.6.2; + * @assertion: The production x -= y is the same as x = x - y; + * @description: Type(x) and Type(y) vary between Null and Undefined; + */ + +//CHECK#1 +x = null; +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = null; x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x -= null; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x -= null; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = undefined; x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x -= null; +if (x !== 0) { + $ERROR('#4: x = null; x -= null; x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.1.js new file mode 100644 index 000000000..490a2e09d --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.1.js @@ -0,0 +1,65 @@ +// 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_A4.5_T2.1; + * @section: 11.13.2, 11.6.2; + * @assertion: The production x -= y is the same as x = x - y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object); + */ + +//CHECK#1 +x = true; +x -= 1; +if (x !== 0) { + $ERROR('#1: x = true; x -= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x -= true; +if (x !== 0) { + $ERROR('#2: x = 1; x -= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x -= 1; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x -= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x -= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = 1; x -= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x -= new Number(1); +if (x !== 0) { + $ERROR('#5: x = true; x -= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x -= true; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x -= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x -= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x -= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x -= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x -= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.2.js new file mode 100644 index 000000000..4657424dd --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.2.js @@ -0,0 +1,79 @@ +// 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_A4.5_T2.2; + * @section: 11.13.2, 11.6.2; + * @assertion: The production x -= y is the same as x = x - y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object); +*/ + +//CHECK#1 +x = "1"; +x -= 1; +if (x !== 0) { + $ERROR('#1: x = "1"; x -= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x -= "1"; +if (x !== 0) { + $ERROR('#2: x = 1; x -= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x -= 1; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x -= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x -= new String("1"); +if (x !== 0) { + $ERROR('#4: x = 1; x -= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x -= new Number(1); +if (x !== 0) { + $ERROR('#5: x = "1"; x -= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x -= "1"; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x -= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x -= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new String("1"); x -= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x -= new String("1"); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x -= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x -= 1; +if (isNaN(x) !== true) { + $ERROR('#9: x = "x"; x -= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x -= "x"; +if (isNaN(x) !== true) { + $ERROR('#10: x = 1; x -= "x"; x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.3.js new file mode 100644 index 000000000..b7fcb35ff --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.3.js @@ -0,0 +1,37 @@ +// 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_A4.5_T2.3; + * @section: 11.13.2, 11.6.2; + * @assertion: The production x -= y is the same as x = x - y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null; + */ + +//CHECK#1 +x = 1; +x -= null; +if (x !== 1) { + $ERROR('#1: x = 1; x -= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x -= 1; +if (x !== -1) { + $ERROR('#2: x = null; x -= 1; x === -1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x -= null; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x -= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x -= new Number(1); +if (x !== -1) { + $ERROR('#4: x = null; x -= new Number(1); x === -1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.4.js new file mode 100644 index 000000000..df000b659 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.4.js @@ -0,0 +1,37 @@ +// 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_A4.5_T2.4; + * @section: 11.13.2, 11.6.2; + * @assertion: The production x -= y is the same as x = x - y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined; + */ + +//CHECK#1 +x = 1; +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = 1; x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x -= 1; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x -= 1; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Number(1); x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x -= new Number(1); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x -= new Number(1); x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.5.js new file mode 100644 index 000000000..e44af16f2 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.5.js @@ -0,0 +1,65 @@ +// 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_A4.5_T2.5; + * @section: 11.13.2, 11.6.2; + * @assertion: The production x -= y is the same as x = x - y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object); +*/ + +//CHECK#1 +x = true; +x -= "1"; +if (x !== 0) { + $ERROR('#1: x = true; x -= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x -= true; +if (x !== 0) { + $ERROR('#2: x = "1"; x -= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x -= "1"; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x -= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x -= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = "1"; x -= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x -= new String("1"); +if (x !== 0) { + $ERROR('#5: x = true; x -= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x -= true; +if (x !== 0) { + $ERROR('#6: x = new String("1"); x -= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x -= new String("1"); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x -= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x -= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new String("1"); x -= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.6.js new file mode 100644 index 000000000..550ec15cc --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.6.js @@ -0,0 +1,37 @@ +// 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_A4.5_T2.6; + * @section: 11.13.2, 11.6.2; + * @assertion: The production x -= y is the same as x = x - y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined; + */ + +//CHECK#1 +x = "1"; +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = "1"; x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x -= "1"; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x -= "1"; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new String("1"); x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x -= new String("1"); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x -= new String("1"); x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.7.js new file mode 100644 index 000000000..aa7e114fb --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.7.js @@ -0,0 +1,37 @@ +// 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_A4.5_T2.7; + * @section: 11.13.2, 11.6.2; + * @assertion: The production x -= y is the same as x = x - y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null; + */ + +//CHECK#1 +x = "1"; +x -= null; +if (x !== 1) { + $ERROR('#1: x = "1"; x -= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x -= "1"; +if (x !== -1) { + $ERROR('#2: x = null; x -= "1"; x === -1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x -= null; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x -= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x -= new String("1"); +if (x !== -1) { + $ERROR('#4: x = null; x -= new String("1"); x === -1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.8.js new file mode 100644 index 000000000..151491ade --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.8.js @@ -0,0 +1,37 @@ +// 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_A4.5_T2.8; + * @section: 11.13.2, 11.6.2; + * @assertion: The production x -= y is the same as x = x - y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined; + */ + +//CHECK#1 +x = true; +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#1: x = true; x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x -= true; +if (isNaN(x) !== true) { + $ERROR('#2: x = undefined; x -= true; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x -= undefined; +if (isNaN(x) !== true) { + $ERROR('#3: x = new Boolean(true); x -= undefined; x === Not-a-Number. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x -= new Boolean(true); +if (isNaN(x) !== true) { + $ERROR('#4: x = undefined; x -= new Boolean(true); x === Not-a-Number. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.9.js new file mode 100644 index 000000000..dffa8ae58 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.5_T2.9.js @@ -0,0 +1,37 @@ +// 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_A4.5_T2.9; + * @section: 11.13.2, 11.6.2; + * @assertion: The production x -= y is the same as x = x - y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null; + */ + +//CHECK#1 +x = true; +x -= null; +if (x !== 1) { + $ERROR('#1: x = true; x -= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x -= true; +if (x !== -1) { + $ERROR('#2: x = null; x -= true; x === -1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x -= null; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x -= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x -= new Boolean(true); +if (x !== -1) { + $ERROR('#4: x = null; x -= new Boolean(true); x === -1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T1.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T1.1.js new file mode 100644 index 000000000..501212a2a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T1.1.js @@ -0,0 +1,37 @@ +// 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_A4.6_T1.1; + * @section: 11.13.2, 11.7.1; + * @assertion: The production x <<= y is the same as x = x << y; + * @description: Type(x) and Type(y) vary between primitive boolean and Boolean object; +*/ + +//CHECK#1 +x = true; +x <<= true; +if (x !== 2) { + $ERROR('#1: x = true; x <<= true; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x <<= true; +if (x !== 2) { + $ERROR('#2: x = new Boolean(true); x <<= true; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x <<= new Boolean(true); +if (x !== 2) { + $ERROR('#3: x = true; x <<= new Boolean(true); x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x <<= new Boolean(true); +if (x !== 2) { + $ERROR('#4: x = new Boolean(true); x <<= new Boolean(true); x === 2. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T1.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T1.2.js new file mode 100644 index 000000000..04800f7f1 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T1.2.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: S11.13.2_A4.6_T1.2; + * @section: 11.13.2, 11.7.1; + * @assertion: The production x <<= y is the same as x = x << y; + * @description: Type(x) and Type(y) vary between primitive number and Number object; +*/ + +//CHECK#1 +x = 1; +x <<= 1; +if (x !== 2) { + $ERROR('#1: x = 1; x <<= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x <<= 1; +if (x !== 2) { + $ERROR('#2: x = new Number(1); x <<= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x <<= new Number(1); +if (x !== 2) { + $ERROR('#3: x = 1; x <<= new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x <<= new Number(1); +if (x !== 2) { + $ERROR('#4: x = new Number(1); x <<= new Number(1); x === 2. Actual: ' + (x)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T1.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T1.3.js new file mode 100644 index 000000000..1a2355664 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T1.3.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: S11.13.2_A4.6_T1.3; + * @section: 11.13.2, 11.7.1; + * @assertion: The production x <<= y is the same as x = x << y; + * @description: Type(x) and Type(y) vary between primitive string and String object; +*/ + +//CHECK#1 +x = "1"; +x <<= "1"; +if (x !== 2) { + $ERROR('#1: x = "1"; x <<= "1"; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x <<= "1"; +if (x !== 2) { + $ERROR('#2: x = new String("1"); x <<= "1"; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x <<= new String("1"); +if (x !== 2) { + $ERROR('#3: x = "1"; x <<= new String("1"); x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x <<= new String("1"); +if (x !== 2) { + $ERROR('#4: x = new String("1"); x <<= new String("1"); x === 2. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x <<= "1"; +if (x !== 0) { + $ERROR('#5: x = "x"; x <<= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x <<= "x"; +if (x !== 1) { + $ERROR('#6: x = "1"; x <<= "x"; x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T1.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T1.4.js new file mode 100644 index 000000000..33a27854e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T1.4.js @@ -0,0 +1,37 @@ +// 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_A4.6_T1.4; + * @section: 11.13.2, 11.7.1; + * @assertion: The production x <<= y is the same as x = x << y; + * @description: Type(x) and Type(y) vary between Null and Undefined; + */ + +//CHECK#1 +x = null; +x <<= undefined; +if (x !== 0) { + $ERROR('#1: x = null; x <<= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x <<= null; +if (x !== 0) { + $ERROR('#2: x = undefined; x <<= null; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x <<= undefined; +if (x !== 0) { + $ERROR('#3: x = undefined; x <<= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x <<= null; +if (x !== 0) { + $ERROR('#4: x = null; x <<= null; x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.1.js new file mode 100644 index 000000000..2e9c5103c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.1.js @@ -0,0 +1,65 @@ +// 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_A4.6_T2.1; + * @section: 11.13.2, 11.7.1; + * @assertion: The production x <<= y is the same as x = x << y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object); + */ + +//CHECK#1 +x = true; +x <<= 1; +if (x !== 2) { + $ERROR('#1: x = true; x <<= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x <<= true; +if (x !== 2) { + $ERROR('#2: x = 1; x <<= true; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x <<= 1; +if (x !== 2) { + $ERROR('#3: x = new Boolean(true); x <<= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x <<= new Boolean(true); +if (x !== 2) { + $ERROR('#4: x = 1; x <<= new Boolean(true); x === 2. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x <<= new Number(1); +if (x !== 2) { + $ERROR('#5: x = true; x <<= new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x <<= true; +if (x !== 2) { + $ERROR('#6: x = new Number(1); x <<= true; x === 2. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x <<= new Number(1); +if (x !== 2) { + $ERROR('#7: x = new Boolean(true); x <<= new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x <<= new Boolean(true); +if (x !== 2) { + $ERROR('#8: x = new Number(1); x <<= new Boolean(true); x === 2. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.2.js new file mode 100644 index 000000000..1b16fc94c --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.2.js @@ -0,0 +1,79 @@ +// 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_A4.6_T2.2; + * @section: 11.13.2, 11.7.1; + * @assertion: The production x <<= y is the same as x = x << y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object); +*/ + +//CHECK#1 +x = "1"; +x <<= 1; +if (x !== 2) { + $ERROR('#1: x = "1"; x <<= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x <<= "1"; +if (x !== 2) { + $ERROR('#2: x = 1; x <<= "1"; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x <<= 1; +if (x !== 2) { + $ERROR('#3: x = new String("1"); x <<= 1; x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x <<= new String("1"); +if (x !== 2) { + $ERROR('#4: x = 1; x <<= new String("1"); x === 2. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x <<= new Number(1); +if (x !== 2) { + $ERROR('#5: x = "1"; x <<= new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x <<= "1"; +if (x !== 2) { + $ERROR('#6: x = new Number(1); x <<= "1"; x === 2. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x <<= new Number(1); +if (x !== 2) { + $ERROR('#7: x = new String("1"); x <<= new Number(1); x === 2. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x <<= new String("1"); +if (x !== 2) { + $ERROR('#8: x = new Number(1); x <<= new String("1"); x === 2. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x <<= 1; +if (x !== 0) { + $ERROR('#9: x = "x"; x <<= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x <<= "x"; +if (x !== 1) { + $ERROR('#10: x = 1; x <<= "x"; x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.3.js new file mode 100644 index 000000000..7c5f17776 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.3.js @@ -0,0 +1,37 @@ +// 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_A4.6_T2.3; + * @section: 11.13.2, 11.7.1; + * @assertion: The production x <<= y is the same as x = x << y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null; + */ + +//CHECK#1 +x = 1; +x <<= null; +if (x !== 1) { + $ERROR('#1: x = 1; x <<= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x <<= 1; +if (x !== 0) { + $ERROR('#2: x = null; x <<= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x <<= null; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x <<= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x <<= new Number(1); +if (x !== 0) { + $ERROR('#4: x = null; x <<= new Number(1); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.4.js new file mode 100644 index 000000000..3800ab525 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.4.js @@ -0,0 +1,37 @@ +// 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_A4.6_T2.4; + * @section: 11.13.2, 11.7.1; + * @assertion: The production x <<= y is the same as x = x << y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined; + */ + +//CHECK#1 +x = 1; +x <<= undefined; +if (x !== 1) { + $ERROR('#1: x = 1; x <<= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x <<= 1; +if (x !== 0) { + $ERROR('#2: x = undefined; x <<= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x <<= undefined; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x <<= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x <<= new Number(1); +if (x !== 0) { + $ERROR('#4: x = undefined; x <<= new Number(1); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.5.js new file mode 100644 index 000000000..18deaaaf0 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.5.js @@ -0,0 +1,65 @@ +// 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_A4.6_T2.5; + * @section: 11.13.2, 11.7.1; + * @assertion: The production x <<= y is the same as x = x << y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object); +*/ + +//CHECK#1 +x = true; +x <<= "1"; +if (x !== 2) { + $ERROR('#1: x = true; x <<= "1"; x === 2. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x <<= true; +if (x !== 2) { + $ERROR('#2: x = "1"; x <<= true; x === 2. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x <<= "1"; +if (x !== 2) { + $ERROR('#3: x = new Boolean(true); x <<= "1"; x === 2. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x <<= new Boolean(true); +if (x !== 2) { + $ERROR('#4: x = "1"; x <<= new Boolean(true); x === 2. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x <<= new String("1"); +if (x !== 2) { + $ERROR('#5: x = true; x <<= new String("1"); x === 2. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x <<= true; +if (x !== 2) { + $ERROR('#6: x = new String("1"); x <<= true; x === 2. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x <<= new String("1"); +if (x !== 2) { + $ERROR('#7: x = new Boolean(true); x <<= new String("1"); x === 2. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x <<= new Boolean(true); +if (x !== 2) { + $ERROR('#8: x = new String("1"); x <<= new Boolean(true); x === 2. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.6.js new file mode 100644 index 000000000..1cc5a4447 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.6.js @@ -0,0 +1,37 @@ +// 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_A4.6_T2.6; + * @section: 11.13.2, 11.7.1; + * @assertion: The production x <<= y is the same as x = x << y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined; + */ + +//CHECK#1 +x = "1"; +x <<= undefined; +if (x !== 1) { + $ERROR('#1: x = "1"; x <<= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x <<= "1"; +if (x !== 0) { + $ERROR('#2: x = undefined; x <<= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x <<= undefined; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x <<= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x <<= new String("1"); +if (x !== 0) { + $ERROR('#4: x = undefined; x <<= new String("1"); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.7.js new file mode 100644 index 000000000..c52ad33ef --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.7.js @@ -0,0 +1,37 @@ +// 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_A4.6_T2.7; + * @section: 11.13.2, 11.7.1; + * @assertion: The production x <<= y is the same as x = x << y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null; + */ + +//CHECK#1 +x = "1"; +x <<= null; +if (x !== 1) { + $ERROR('#1: x = "1"; x <<= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x <<= "1"; +if (x !== 0) { + $ERROR('#2: x = null; x <<= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x <<= null; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x <<= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x <<= new String("1"); +if (x !== 0) { + $ERROR('#4: x = null; x <<= new String("1"); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.8.js new file mode 100644 index 000000000..f832c2a96 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.8.js @@ -0,0 +1,37 @@ +// 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_A4.6_T2.8; + * @section: 11.13.2, 11.7.1; + * @assertion: The production x <<= y is the same as x = x << y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined; + */ + +//CHECK#1 +x = true; +x <<= undefined; +if (x !== 1) { + $ERROR('#1: x = true; x <<= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x <<= true; +if (x !== 0) { + $ERROR('#2: x = undefined; x <<= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x <<= undefined; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x <<= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x <<= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = undefined; x <<= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.9.js new file mode 100644 index 000000000..3bb99368a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.6_T2.9.js @@ -0,0 +1,37 @@ +// 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_A4.6_T2.9; + * @section: 11.13.2, 11.7.1; + * @assertion: The production x <<= y is the same as x = x << y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null; + */ + +//CHECK#1 +x = true; +x <<= null; +if (x !== 1) { + $ERROR('#1: x = true; x <<= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x <<= true; +if (x !== 0) { + $ERROR('#2: x = null; x <<= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x <<= null; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x <<= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x <<= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = null; x <<= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T1.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T1.1.js new file mode 100644 index 000000000..71c200e37 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T1.1.js @@ -0,0 +1,37 @@ +// 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_A4.7_T1.1; + * @section: 11.13.2, 11.7.2; + * @assertion: The production x >>= y is the same as x = x >> y; + * @description: Type(x) and Type(y) vary between primitive boolean and Boolean object; + */ + +//CHECK#1 +x = true; +x >>= true; +if (x !== 0) { + $ERROR('#1: x = true; x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x >>= true; +if (x !== 0) { + $ERROR('#2: x = new Boolean(true); x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#3: x = true; x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = new Boolean(true); x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T1.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T1.2.js new file mode 100644 index 000000000..7f8ef5536 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T1.2.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: S11.13.2_A4.7_T1.2; + * @section: 11.13.2, 11.7.2; + * @assertion: The production x >>= y is the same as x = x >> y; + * @description: Type(x) and Type(y) vary between primitive number and Number object; +*/ + +//CHECK#1 +x = 1; +x >>= 1; +if (x !== 0) { + $ERROR('#1: x = 1; x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x >>= 1; +if (x !== 0) { + $ERROR('#2: x = new Number(1); x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x >>= new Number(1); +if (x !== 0) { + $ERROR('#3: x = 1; x >>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x >>= new Number(1); +if (x !== 0) { + $ERROR('#4: x = new Number(1); x >>= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T1.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T1.3.js new file mode 100644 index 000000000..e8723881f --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T1.3.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: S11.13.2_A4.7_T1.3; + * @section: 11.13.2, 11.7.2; + * @assertion: The production x >>= y is the same as x = x >> y; + * @description: Type(x) and Type(y) vary between primitive string and String object; +*/ + +//CHECK#1 +x = "1"; +x >>= "1"; +if (x !== 0) { + $ERROR('#1: x = "1"; x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x >>= "1"; +if (x !== 0) { + $ERROR('#2: x = new String("1"); x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x >>= new String("1"); +if (x !== 0) { + $ERROR('#3: x = "1"; x >>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x >>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = new String("1"); x >>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x >>= "1"; +if (x !== 0) { + $ERROR('#5: x = "x"; x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x >>= "x"; +if (x !== 1) { + $ERROR('#6: x = "1"; x >>= "x"; x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T1.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T1.4.js new file mode 100644 index 000000000..f5551f185 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T1.4.js @@ -0,0 +1,37 @@ +// 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_A4.7_T1.4; + * @section: 11.13.2, 11.7.2; + * @assertion: The production x >>= y is the same as x = x >> y; + * @description: Type(x) and Type(y) vary between Null and Undefined; + */ + +//CHECK#1 +x = null; +x >>= undefined; +if (x !== 0) { + $ERROR('#1: x = null; x >>= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>= null; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>= null; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x >>= undefined; +if (x !== 0) { + $ERROR('#3: x = undefined; x >>= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>= null; +if (x !== 0) { + $ERROR('#4: x = null; x >>= null; x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.1.js new file mode 100644 index 000000000..13b5ba2ca --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.1.js @@ -0,0 +1,65 @@ +// 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_A4.7_T2.1; + * @section: 11.13.2, 11.7.2; + * @assertion: The production x >>= y is the same as x = x >> y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object); + */ + +//CHECK#1 +x = true; +x >>= 1; +if (x !== 0) { + $ERROR('#1: x = true; x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x >>= true; +if (x !== 0) { + $ERROR('#2: x = 1; x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>= 1; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = 1; x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x >>= new Number(1); +if (x !== 0) { + $ERROR('#5: x = true; x >>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x >>= true; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x >>= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x >>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.2.js new file mode 100644 index 000000000..c62c9395e --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.2.js @@ -0,0 +1,79 @@ +// 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_A4.7_T2.2; + * @section: 11.13.2, 11.7.2; + * @assertion: The production x >>= y is the same as x = x >> y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object); +*/ + +//CHECK#1 +x = "1"; +x >>= 1; +if (x !== 0) { + $ERROR('#1: x = "1"; x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x >>= "1"; +if (x !== 0) { + $ERROR('#2: x = 1; x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x >>= 1; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x >>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = 1; x >>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x >>= new Number(1); +if (x !== 0) { + $ERROR('#5: x = "1"; x >>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x >>= "1"; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x >>= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new String("1"); x >>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x >>= new String("1"); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x >>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x >>= 1; +if (x !== 0) { + $ERROR('#9: x = "x"; x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x >>= "x"; +if (x !== 1) { + $ERROR('#10: x = 1; x >>= "x"; x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.3.js new file mode 100644 index 000000000..bfd29a362 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.3.js @@ -0,0 +1,37 @@ +// 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_A4.7_T2.3; + * @section: 11.13.2, 11.7.2; + * @assertion: The production x >>= y is the same as x = x >> y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null; + */ + +//CHECK#1 +x = 1; +x >>= null; +if (x !== 1) { + $ERROR('#1: x = 1; x >>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x >>= 1; +if (x !== 0) { + $ERROR('#2: x = null; x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x >>= null; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x >>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>= new Number(1); +if (x !== 0) { + $ERROR('#4: x = null; x >>= new Number(1); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.4.js new file mode 100644 index 000000000..30cec32e3 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.4.js @@ -0,0 +1,37 @@ +// 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_A4.7_T2.4; + * @section: 11.13.2, 11.7.2; + * @assertion: The production x >>= y is the same as x = x >> y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined; + */ + +//CHECK#1 +x = 1; +x >>= undefined; +if (x !== 1) { + $ERROR('#1: x = 1; x >>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>= 1; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x >>= undefined; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x >>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x >>= new Number(1); +if (x !== 0) { + $ERROR('#4: x = undefined; x >>= new Number(1); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.5.js new file mode 100644 index 000000000..1a8aaa499 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.5.js @@ -0,0 +1,65 @@ +// 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_A4.7_T2.5; + * @section: 11.13.2, 11.7.2; + * @assertion: The production x >>= y is the same as x = x >> y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object); +*/ + +//CHECK#1 +x = true; +x >>= "1"; +if (x !== 0) { + $ERROR('#1: x = true; x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x >>= true; +if (x !== 0) { + $ERROR('#2: x = "1"; x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>= "1"; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = "1"; x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x >>= new String("1"); +if (x !== 0) { + $ERROR('#5: x = true; x >>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x >>= true; +if (x !== 0) { + $ERROR('#6: x = new String("1"); x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x >>= new String("1"); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x >>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new String("1"); x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.6.js new file mode 100644 index 000000000..55fd43ea1 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.6.js @@ -0,0 +1,37 @@ +// 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_A4.7_T2.6; + * @section: 11.13.2, 11.7.2; + * @assertion: The production x >>= y is the same as x = x >> y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined; + */ + +//CHECK#1 +x = "1"; +x >>= undefined; +if (x !== 1) { + $ERROR('#1: x = "1"; x >>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>= "1"; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x >>= undefined; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x >>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x >>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = undefined; x >>= new String("1"); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.7.js new file mode 100644 index 000000000..fd9f5958b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.7.js @@ -0,0 +1,37 @@ +// 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_A4.7_T2.7; + * @section: 11.13.2, 11.7.2; + * @assertion: The production x >>= y is the same as x = x >> y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null; + */ + +//CHECK#1 +x = "1"; +x >>= null; +if (x !== 1) { + $ERROR('#1: x = "1"; x >>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x >>= "1"; +if (x !== 0) { + $ERROR('#2: x = null; x >>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x >>= null; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x >>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = null; x >>= new String("1"); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.8.js new file mode 100644 index 000000000..750b7e95f --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.8.js @@ -0,0 +1,37 @@ +// 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_A4.7_T2.8; + * @section: 11.13.2, 11.7.2; + * @assertion: The production x >>= y is the same as x = x >> y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined; + */ + +//CHECK#1 +x = true; +x >>= undefined; +if (x !== 1) { + $ERROR('#1: x = true; x >>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>= true; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>= undefined; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x >>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = undefined; x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.9.js new file mode 100644 index 000000000..daeefb75b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.7_T2.9.js @@ -0,0 +1,37 @@ +// 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_A4.7_T2.9; + * @section: 11.13.2, 11.7.2; + * @assertion: The production x >>= y is the same as x = x >> y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null; + */ + +//CHECK#1 +x = true; +x >>= null; +if (x !== 1) { + $ERROR('#1: x = true; x >>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x >>= true; +if (x !== 0) { + $ERROR('#2: x = null; x >>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>= null; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x >>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = null; x >>= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T1.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T1.1.js new file mode 100644 index 000000000..5e81122e8 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T1.1.js @@ -0,0 +1,37 @@ +// 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_A4.8_T1.1; + * @section: 11.13.2, 11.7.3; + * @assertion: The production x >>>= y is the same as x = x >>> y; + * @description: Type(x) and Type(y) vary between primitive boolean and Boolean object; + */ + +//CHECK#1 +x = true; +x >>>= true; +if (x !== 0) { + $ERROR('#1: x = true; x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x >>>= true; +if (x !== 0) { + $ERROR('#2: x = new Boolean(true); x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#3: x = true; x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = new Boolean(true); x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T1.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T1.2.js new file mode 100644 index 000000000..d03839cc5 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T1.2.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: S11.13.2_A4.8_T1.2; + * @section: 11.13.2, 11.7.3; + * @assertion: The production x >>>= y is the same as x = x >>> y; + * @description: Type(x) and Type(y) vary between primitive number and Number object; +*/ + +//CHECK#1 +x = 1; +x >>>= 1; +if (x !== 0) { + $ERROR('#1: x = 1; x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x >>>= 1; +if (x !== 0) { + $ERROR('#2: x = new Number(1); x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#3: x = 1; x >>>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#4: x = new Number(1); x >>>= new Number(1); x === 0. Actual: ' + (x)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T1.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T1.3.js new file mode 100644 index 000000000..d0863ac95 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T1.3.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: S11.13.2_A4.8_T1.3; + * @section: 11.13.2, 11.7.3; + * @assertion: The production x >>>= y is the same as x = x >>> y; + * @description: Type(x) and Type(y) vary between primitive string and String object; +*/ + +//CHECK#1 +x = "1"; +x >>>= "1"; +if (x !== 0) { + $ERROR('#1: x = "1"; x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x >>>= "1"; +if (x !== 0) { + $ERROR('#2: x = new String("1"); x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#3: x = "1"; x >>>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = new String("1"); x >>>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x >>>= "1"; +if (x !== 0) { + $ERROR('#5: x = "x"; x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x >>>= "x"; +if (x !== 1) { + $ERROR('#6: x = "1"; x >>>= "x"; x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T1.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T1.4.js new file mode 100644 index 000000000..86de3c341 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T1.4.js @@ -0,0 +1,37 @@ +// 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_A4.8_T1.4; + * @section: 11.13.2, 11.7.3; + * @assertion: The production x >>>= y is the same as x = x >>> y; + * @description: Type(x) and Type(y) vary between Null and Undefined; + */ + +//CHECK#1 +x = null; +x >>>= undefined; +if (x !== 0) { + $ERROR('#1: x = null; x >>>= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>>= null; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>>= null; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x >>>= undefined; +if (x !== 0) { + $ERROR('#3: x = undefined; x >>>= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>>= null; +if (x !== 0) { + $ERROR('#4: x = null; x >>>= null; x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.1.js new file mode 100644 index 000000000..f6f1ef510 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.1.js @@ -0,0 +1,65 @@ +// 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_A4.8_T2.1; + * @section: 11.13.2, 11.7.3; + * @assertion: The production x >>>= y is the same as x = x >>> y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object); + */ + +//CHECK#1 +x = true; +x >>>= 1; +if (x !== 0) { + $ERROR('#1: x = true; x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x >>>= true; +if (x !== 0) { + $ERROR('#2: x = 1; x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>>= 1; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = 1; x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#5: x = true; x >>>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x >>>= true; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x >>>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.2.js new file mode 100644 index 000000000..7745cd6a8 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.2.js @@ -0,0 +1,79 @@ +// 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_A4.8_T2.2; + * @section: 11.13.2, 11.7.3; + * @assertion: The production x >>>= y is the same as x = x >>> y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object); +*/ + +//CHECK#1 +x = "1"; +x >>>= 1; +if (x !== 0) { + $ERROR('#1: x = "1"; x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x >>>= "1"; +if (x !== 0) { + $ERROR('#2: x = 1; x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x >>>= 1; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = 1; x >>>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#5: x = "1"; x >>>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x >>>= "1"; +if (x !== 0) { + $ERROR('#6: x = new Number(1); x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#7: x = new String("1"); x >>>= new Number(1); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#8: x = new Number(1); x >>>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x >>>= 1; +if (x !== 0) { + $ERROR('#9: x = "x"; x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x >>>= "x"; +if (x !== 1) { + $ERROR('#10: x = 1; x >>>= "x"; x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.3.js new file mode 100644 index 000000000..343154982 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.3.js @@ -0,0 +1,37 @@ +// 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_A4.8_T2.3; + * @section: 11.13.2, 11.7.3; + * @assertion: The production x >>>= y is the same as x = x >>> y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null; + */ + +//CHECK#1 +x = 1; +x >>>= null; +if (x !== 1) { + $ERROR('#1: x = 1; x >>>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x >>>= 1; +if (x !== 0) { + $ERROR('#2: x = null; x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x >>>= null; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x >>>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#4: x = null; x >>>= new Number(1); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.4.js new file mode 100644 index 000000000..d070f661a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.4.js @@ -0,0 +1,37 @@ +// 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_A4.8_T2.4; + * @section: 11.13.2, 11.7.3; + * @assertion: The production x >>>= y is the same as x = x >>> y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined; + */ + +//CHECK#1 +x = 1; +x >>>= undefined; +if (x !== 1) { + $ERROR('#1: x = 1; x >>>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>>= 1; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>>= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x >>>= undefined; +if (x !== 1) { + $ERROR('#3: x = new Number(1); x >>>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x >>>= new Number(1); +if (x !== 0) { + $ERROR('#4: x = undefined; x >>>= new Number(1); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.5.js new file mode 100644 index 000000000..71e1af5c6 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.5.js @@ -0,0 +1,65 @@ +// 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_A4.8_T2.5; + * @section: 11.13.2, 11.7.3; + * @assertion: The production x >>>= y is the same as x = x >>> y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object); +*/ + +//CHECK#1 +x = true; +x >>>= "1"; +if (x !== 0) { + $ERROR('#1: x = true; x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x >>>= true; +if (x !== 0) { + $ERROR('#2: x = "1"; x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>>= "1"; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = "1"; x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#5: x = true; x >>>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x >>>= true; +if (x !== 0) { + $ERROR('#6: x = new String("1"); x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#7: x = new Boolean(true); x >>>= new String("1"); x === 0. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#8: x = new String("1"); x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.6.js new file mode 100644 index 000000000..6517c4946 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.6.js @@ -0,0 +1,37 @@ +// 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_A4.8_T2.6; + * @section: 11.13.2, 11.7.3; + * @assertion: The production x >>>= y is the same as x = x >>> y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined; + */ + +//CHECK#1 +x = "1"; +x >>>= undefined; +if (x !== 1) { + $ERROR('#1: x = "1"; x >>>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>>= "1"; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x >>>= undefined; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x >>>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = undefined; x >>>= new String("1"); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.7.js new file mode 100644 index 000000000..f836c0ced --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.7.js @@ -0,0 +1,37 @@ +// 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_A4.8_T2.7; + * @section: 11.13.2, 11.7.3; + * @assertion: The production x >>>= y is the same as x = x >>> y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null; + */ + +//CHECK#1 +x = "1"; +x >>>= null; +if (x !== 1) { + $ERROR('#1: x = "1"; x >>>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x >>>= "1"; +if (x !== 0) { + $ERROR('#2: x = null; x >>>= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x >>>= null; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x >>>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>>= new String("1"); +if (x !== 0) { + $ERROR('#4: x = null; x >>>= new String("1"); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.8.js new file mode 100644 index 000000000..98835168b --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.8.js @@ -0,0 +1,37 @@ +// 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_A4.8_T2.8; + * @section: 11.13.2, 11.7.3; + * @assertion: The production x >>>= y is the same as x = x >>> y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined; + */ + +//CHECK#1 +x = true; +x >>>= undefined; +if (x !== 1) { + $ERROR('#1: x = true; x >>>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x >>>= true; +if (x !== 0) { + $ERROR('#2: x = undefined; x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>>= undefined; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x >>>= undefined; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = undefined; x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.9.js new file mode 100644 index 000000000..55b42c8c5 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.8_T2.9.js @@ -0,0 +1,37 @@ +// 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_A4.8_T2.9; + * @section: 11.13.2, 11.7.3; + * @assertion: The production x >>>= y is the same as x = x >>> y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null; + */ + +//CHECK#1 +x = true; +x >>>= null; +if (x !== 1) { + $ERROR('#1: x = true; x >>>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x >>>= true; +if (x !== 0) { + $ERROR('#2: x = null; x >>>= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x >>>= null; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x >>>= null; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x >>>= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = null; x >>>= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T1.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T1.1.js new file mode 100644 index 000000000..dd8f529e4 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T1.1.js @@ -0,0 +1,37 @@ +// 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_A4.9_T1.1; + * @section: 11.13.2, 11.10.1; + * @assertion: The production x &= y is the same as x = x & y; + * @description: Type(x) and Type(y) vary between primitive boolean and Boolean object; + */ + +//CHECK#1 +x = true; +x &= true; +if (x !== 1) { + $ERROR('#1: x = true; x &= true; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Boolean(true); +x &= true; +if (x !== 1) { + $ERROR('#2: x = new Boolean(true); x &= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = true; +x &= new Boolean(true); +if (x !== 1) { + $ERROR('#3: x = true; x &= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Boolean(true); +x &= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = new Boolean(true); x &= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T1.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T1.2.js new file mode 100644 index 000000000..5074747ba --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T1.2.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: S11.13.2_A4.9_T1.2; + * @section: 11.13.2, 11.10.1; + * @assertion: The production x &= y is the same as x = x & y; + * @description: Type(x) and Type(y) vary between primitive number and Number object; +*/ + +//CHECK#1 +x = 1; +x &= 1; +if (x !== 1) { + $ERROR('#1: x = 1; x &= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new Number(1); +x &= 1; +if (x !== 1) { + $ERROR('#2: x = new Number(1); x &= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = 1; +x &= new Number(1); +if (x !== 1) { + $ERROR('#3: x = 1; x &= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new Number(1); +x &= new Number(1); +if (x !== 1) { + $ERROR('#4: x = new Number(1); x &= new Number(1); x === 1. Actual: ' + (x)); +} + diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T1.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T1.3.js new file mode 100644 index 000000000..e411f1844 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T1.3.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: S11.13.2_A4.9_T1.3; + * @section: 11.13.2, 11.10.1; + * @assertion: The production x &= y is the same as x = x & y; + * @description: Type(x) and Type(y) vary between primitive string and String object; +*/ + +//CHECK#1 +x = "1"; +x &= "1"; +if (x !== 1) { + $ERROR('#1: x = "1"; x &= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = new String("1"); +x &= "1"; +if (x !== 1) { + $ERROR('#2: x = new String("1"); x &= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = "1"; +x &= new String("1"); +if (x !== 1) { + $ERROR('#3: x = "1"; x &= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = new String("1"); +x &= new String("1"); +if (x !== 1) { + $ERROR('#4: x = new String("1"); x &= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "x"; +x &= "1"; +if (x !== 0) { + $ERROR('#5: x = "x"; x &= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#6 +x = "1"; +x &= "x"; +if (x !== 0) { + $ERROR('#6: x = "1"; x &= "x"; x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T1.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T1.4.js new file mode 100644 index 000000000..803652d95 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T1.4.js @@ -0,0 +1,37 @@ +// 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_A4.9_T1.4; + * @section: 11.13.2, 11.10.1; + * @assertion: The production x &= y is the same as x = x & y; + * @description: Type(x) and Type(y) vary between Null and Undefined; +*/ + +//CHECK#1 +x = null; +x &= undefined; +if (x !== 0) { + $ERROR('#1: x = null; x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x &= null; +if (x !== 0) { + $ERROR('#2: x = undefined; x &= null; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = undefined; +x &= undefined; +if (x !== 0) { + $ERROR('#3: x = undefined; x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x &= null; +if (x !== 0) { + $ERROR('#4: x = null; x &= null; x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.1.js new file mode 100644 index 000000000..8ebad51d4 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.1.js @@ -0,0 +1,65 @@ +// 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_A4.9_T2.1; + * @section: 11.13.2, 11.10.1; + * @assertion: The production x &= y is the same as x = x & y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object); + */ + +//CHECK#1 +x = true; +x &= 1; +if (x !== 1) { + $ERROR('#1: x = true; x &= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x &= true; +if (x !== 1) { + $ERROR('#2: x = 1; x &= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x &= 1; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x &= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x &= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = 1; x &= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x &= new Number(1); +if (x !== 1) { + $ERROR('#5: x = true; x &= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x &= true; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x &= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x &= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x &= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x &= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x &= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.2.js new file mode 100644 index 000000000..4015289ea --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.2.js @@ -0,0 +1,79 @@ +// 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_A4.9_T2.2; + * @section: 11.13.2, 11.10.1; + * @assertion: The production x &= y is the same as x = x & y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object); +*/ + +//CHECK#1 +x = "1"; +x &= 1; +if (x !== 1) { + $ERROR('#1: x = "1"; x &= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = 1; +x &= "1"; +if (x !== 1) { + $ERROR('#2: x = 1; x &= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x &= 1; +if (x !== 1) { + $ERROR('#3: x = new String("1"); x &= 1; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = 1; +x &= new String("1"); +if (x !== 1) { + $ERROR('#4: x = 1; x &= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = "1"; +x &= new Number(1); +if (x !== 1) { + $ERROR('#5: x = "1"; x &= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new Number(1); +x &= "1"; +if (x !== 1) { + $ERROR('#6: x = new Number(1); x &= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new String("1"); +x &= new Number(1); +if (x !== 1) { + $ERROR('#7: x = new String("1"); x &= new Number(1); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new Number(1); +x &= new String("1"); +if (x !== 1) { + $ERROR('#8: x = new Number(1); x &= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#9 +x = "x"; +x &= 1; +if (x !== 0) { + $ERROR('#9: x = "x"; x &= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#10 +x = 1; +x &= "x"; +if (x !== 0) { + $ERROR('#10: x = 1; x &= "x"; x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.3.js new file mode 100644 index 000000000..c5ee9f246 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.3.js @@ -0,0 +1,37 @@ +// 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_A4.9_T2.3; + * @section: 11.13.2, 11.10.1; + * @assertion: The production x &= y is the same as x = x & y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null; + */ + +//CHECK#1 +x = 1; +x &= null; +if (x !== 0) { + $ERROR('#1: x = 1; x &= null; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x &= 1; +if (x !== 0) { + $ERROR('#2: x = null; x &= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x &= null; +if (x !== 0) { + $ERROR('#3: x = new Number(1); x &= null; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x &= new Number(1); +if (x !== 0) { + $ERROR('#4: x = null; x &= new Number(1); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.4.js new file mode 100644 index 000000000..f56b75fe8 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.4.js @@ -0,0 +1,37 @@ +// 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_A4.9_T2.4; + * @section: 11.13.2, 11.10.1; + * @assertion: The production x &= y is the same as x = x & y; + * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined; + */ + +//CHECK#1 +x = 1; +x &= undefined; +if (x !== 0) { + $ERROR('#1: x = 1; x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x &= 1; +if (x !== 0) { + $ERROR('#2: x = undefined; x &= 1; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Number(1); +x &= undefined; +if (x !== 0) { + $ERROR('#3: x = new Number(1); x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x &= new Number(1); +if (x !== 0) { + $ERROR('#4: x = undefined; x &= new Number(1); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.5.js new file mode 100644 index 000000000..15df5e80a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.5.js @@ -0,0 +1,65 @@ +// 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_A4.9_T2.5; + * @section: 11.13.2, 11.10.1; + * @assertion: The production x &= y is the same as x = x & y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object); +*/ + +//CHECK#1 +x = true; +x &= "1"; +if (x !== 1) { + $ERROR('#1: x = true; x &= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#2 +x = "1"; +x &= true; +if (x !== 1) { + $ERROR('#2: x = "1"; x &= true; x === 1. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x &= "1"; +if (x !== 1) { + $ERROR('#3: x = new Boolean(true); x &= "1"; x === 1. Actual: ' + (x)); +} + +//CHECK#4 +x = "1"; +x &= new Boolean(true); +if (x !== 1) { + $ERROR('#4: x = "1"; x &= new Boolean(true); x === 1. Actual: ' + (x)); +} + +//CHECK#5 +x = true; +x &= new String("1"); +if (x !== 1) { + $ERROR('#5: x = true; x &= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#6 +x = new String("1"); +x &= true; +if (x !== 1) { + $ERROR('#6: x = new String("1"); x &= true; x === 1. Actual: ' + (x)); +} + +//CHECK#7 +x = new Boolean(true); +x &= new String("1"); +if (x !== 1) { + $ERROR('#7: x = new Boolean(true); x &= new String("1"); x === 1. Actual: ' + (x)); +} + +//CHECK#8 +x = new String("1"); +x &= new Boolean(true); +if (x !== 1) { + $ERROR('#8: x = new String("1"); x &= new Boolean(true); x === 1. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.6.js new file mode 100644 index 000000000..7f0651882 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.6.js @@ -0,0 +1,37 @@ +// 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_A4.9_T2.6; + * @section: 11.13.2, 11.10.1; + * @assertion: The production x &= y is the same as x = x & y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined; + */ + +//CHECK#1 +x = "1"; +x &= undefined; +if (x !== 0) { + $ERROR('#1: x = "1"; x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x &= "1"; +if (x !== 0) { + $ERROR('#2: x = undefined; x &= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x &= undefined; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x &= new String("1"); +if (x !== 0) { + $ERROR('#4: x = undefined; x &= new String("1"); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.7.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.7.js new file mode 100644 index 000000000..21e1587a0 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.7.js @@ -0,0 +1,37 @@ +// 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_A4.9_T2.7; + * @section: 11.13.2, 11.10.1; + * @assertion: The production x &= y is the same as x = x & y; + * @description: Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null; + */ + +//CHECK#1 +x = "1"; +x &= null; +if (x !== 0) { + $ERROR('#1: x = "1"; x &= null; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x &= "1"; +if (x !== 0) { + $ERROR('#2: x = null; x &= "1"; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new String("1"); +x &= null; +if (x !== 0) { + $ERROR('#3: x = new String("1"); x &= null; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x &= new String("1"); +if (x !== 0) { + $ERROR('#4: x = null; x &= new String("1"); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.8.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.8.js new file mode 100644 index 000000000..44eec8102 --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.8.js @@ -0,0 +1,37 @@ +// 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_A4.9_T2.8; + * @section: 11.13.2, 11.10.1; + * @assertion: The production x &= y is the same as x = x & y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined; + */ + +//CHECK#1 +x = true; +x &= undefined; +if (x !== 0) { + $ERROR('#1: x = true; x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = undefined; +x &= true; +if (x !== 0) { + $ERROR('#2: x = undefined; x &= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x &= undefined; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x &= undefined; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = undefined; +x &= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = undefined; x &= new Boolean(true); x === 0. Actual: ' + (x)); +} diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.9.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.9.js new file mode 100644 index 000000000..c02b8361a --- /dev/null +++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.13_Assignment_Operators/11.13.2_Compound_Assignment/S11.13.2_A4.9_T2.9.js @@ -0,0 +1,37 @@ +// 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_A4.9_T2.9; + * @section: 11.13.2, 11.10.1; + * @assertion: The production x &= y is the same as x = x & y; + * @description: Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null; + */ + +//CHECK#1 +x = true; +x &= null; +if (x !== 0) { + $ERROR('#1: x = true; x &= null; x === 0. Actual: ' + (x)); +} + +//CHECK#2 +x = null; +x &= true; +if (x !== 0) { + $ERROR('#2: x = null; x &= true; x === 0. Actual: ' + (x)); +} + +//CHECK#3 +x = new Boolean(true); +x &= null; +if (x !== 0) { + $ERROR('#3: x = new Boolean(true); x &= null; x === 0. Actual: ' + (x)); +} + +//CHECK#4 +x = null; +x &= new Boolean(true); +if (x !== 0) { + $ERROR('#4: x = null; x &= new Boolean(true); x === 0. Actual: ' + (x)); +} |