summaryrefslogtreecommitdiff
path: root/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.4_Unary_Operators/11.4.5_Prefix_Decrement_Operator/S11.4.5_A1.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.4_Unary_Operators/11.4.5_Prefix_Decrement_Operator/S11.4.5_A1.js')
-rw-r--r--external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.4_Unary_Operators/11.4.5_Prefix_Decrement_Operator/S11.4.5_A1.js59
1 files changed, 59 insertions, 0 deletions
diff --git a/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.4_Unary_Operators/11.4.5_Prefix_Decrement_Operator/S11.4.5_A1.js b/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.4_Unary_Operators/11.4.5_Prefix_Decrement_Operator/S11.4.5_A1.js
new file mode 100644
index 000000000..7e511a33d
--- /dev/null
+++ b/external/contributions/Google/sputnik_conformance_modified/11_Expressions/11.4_Unary_Operators/11.4.5_Prefix_Decrement_Operator/S11.4.5_A1.js
@@ -0,0 +1,59 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S11.4.5_A1;
+* @section: 11.4.5, 11.6.3, 7.2, 7.3;
+* @assertion: White Space and Line Terminator between "--" and UnaryExpression are allowed;
+* @description: Checking by using eval;
+*/
+
+//CHECK#1
+if (eval("var x = 1; --\u0009x") !== 0) {
+ $ERROR('#1: var x = 1; --\\u0009x; x === 0. Actual: ' + (x));
+}
+
+//CHECK#2
+if (eval("var x = 1; --\u000Bx") !== 0) {
+ $ERROR('#2: var x = 1; --\\u000Bx; x === 0. Actual: ' + (x));
+}
+
+//CHECK#3
+if (eval("var x = 1; --\u000Cx") !== 0) {
+ $ERROR('#3: var x = 1; --\\u000Cx; x === 0. Actual: ' + (x));
+}
+
+//CHECK#4
+if (eval("var x = 1; --\u0020x") !== 0) {
+ $ERROR('#4: var x = 1; --\\u0020x; x === 0. Actual: ' + (x));
+}
+
+//CHECK#5
+if (eval("var x = 1; --\u00A0x") !== 0) {
+ $ERROR('#5: var x = 1; --\\u00A0x; x === 0. Actual: ' + (x));
+}
+
+//CHECK#6
+if (eval("var x = 1; --\u000Ax") !== 0) {
+ $ERROR('#6: var x = 1; --\\u000Ax; x === 0. Actual: ' + (x));
+}
+
+//CHECK#7
+if (eval("var x = 1; --\u000Dx") !== 0) {
+ $ERROR('#7: var x = 1; --\\u000Dx; x === 0. Actual: ' + (x));
+}
+
+//CHECK#8
+if (eval("var x = 1; --\u2028x") !== 0) {
+ $ERROR('#8: var x = 1; --\\u2028x; x === 0. Actual: ' + (x));
+}
+
+//CHECK#9
+if (eval("var x = 1; --\u2029x") !== 0) {
+ $ERROR('#9: var x = 1; --\\u2029x; x === 0. Actual: ' + (x));
+}
+
+//CHECK#10
+if (eval("var x = 1; --\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029x") !== 0) {
+ $ERROR('#10: var x = 1; --\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029x; x === 0. Actual: ' + (x));
+}