aboutsummaryrefslogtreecommitdiffstats
path: root/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator')
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A1.js59
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A2_T1.js26
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A2_T2.js13
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T1.js21
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T2.js21
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T3.js27
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T4.js21
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T5.js21
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T6.js19
9 files changed, 228 insertions, 0 deletions
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A1.js
new file mode 100644
index 000000000..c299861ea
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_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.2_A1;
+* @section: 11.4.2;
+* @assertion: White Space and Line Terminator between "void" and UnaryExpression are allowed;
+* @description: Checking by using eval;
+*/
+
+//CHECK#1
+if (eval("void\u00090") !== undefined) {
+ $ERROR('#1: void\\u00090 === undefined');
+}
+
+//CHECK#2
+if (eval("void\u000B0") !== undefined) {
+ $ERROR('#2: void\\u000B0 === undefined');
+}
+
+//CHECK#3
+if (eval("void\u000C0") !== undefined) {
+ $ERROR('#3: void\\u000C0 === undefined');
+}
+
+//CHECK#4
+if (eval("void\u00200") !== undefined) {
+ $ERROR('#4: void\\u00200 === undefined');
+}
+
+//CHECK#5
+if (eval("void\u00A00") !== undefined) {
+ $ERROR('#5: void\\u00A00 === undefined');
+}
+
+//CHECK#6
+if (eval("void\u000A0") !== undefined) {
+ $ERROR('#6: void\\u000A0 === undefined');
+}
+
+//CHECK#7
+if (eval("void\u000D0") !== undefined) {
+ $ERROR('#7: void\\u000D0 === undefined');
+}
+
+//CHECK#8
+if (eval("void\u20280") !== undefined) {
+ $ERROR('#8: void\\u20280 === undefined');
+}
+
+//CHECK#9
+if (eval("void\u20290") !== undefined) {
+ $ERROR('#9: void\\u20290 === undefined');
+}
+
+//CHECK#10
+if (eval("void\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u20290") !== undefined) {
+ $ERROR('#10: void\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20290 === undefined');
+}
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A2_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A2_T1.js
new file mode 100644
index 000000000..e668c4310
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A2_T1.js
@@ -0,0 +1,26 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S11.4.2_A2_T1;
+* @section: 11.4.2;
+* @assertion: Operator "void" uses GetValue;
+* @description: Either Type(x) is not Reference or GetBase(x) is not null;
+*/
+
+//CHECK#1
+if (void 0 !== undefined) {
+ $ERROR('#1: void 0 === undefined. Actual: ' + (void 0));
+}
+
+//CHECK#2
+var x = 0;
+if (void x !== undefined) {
+ $ERROR('#2: var x = 0; void x === undefined. Actual: ' + (void x));
+}
+
+//CHECK#3
+var x = new Object();
+if (void x !== undefined) {
+ $ERROR('#3: var x = new Object(); void x === undefined. Actual: ' + (void x));
+}
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A2_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A2_T2.js
new file mode 100644
index 000000000..8bc788ea8
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A2_T2.js
@@ -0,0 +1,13 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S11.4.2_A2_T2;
+* @section: 11.4.2;
+* @assertion: Operator "void" uses GetValue;
+* @description: If GetBase(x) is null, throw ReferenceError;
+* @negative
+*/
+
+//CHECK#1
+void x;
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T1.js
new file mode 100644
index 000000000..944854623
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T1.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S11.4.2_A4_T1;
+* @section: 11.4.2;
+* @assertion: Operator "void" evaluates UnaryExpression and returns undefined;
+* @description: Type(x) is boolean primitive or Boolean object;
+*/
+
+//CHECK#1
+var x = false;
+if (void x !== undefined) {
+ $ERROR('#1: var x = false; void x === undefined. Actual: ' + (void x));
+}
+
+//CHECK#2
+var x = new Boolean(true);
+if (void x !== undefined) {
+ $ERROR('#2: var x = new Boolean(true); void x === undefined. Actual: ' + (void x));
+}
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T2.js
new file mode 100644
index 000000000..5c2a33c54
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T2.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S11.4.2_A4_T2;
+* @section: 11.4.2;
+* @assertion: Operator "void" evaluates UnaryExpression and returns undefined;
+* @description: Type(x) is number primitive or Number object;
+*/
+
+//CHECK#1
+var x = 0.1;
+if (void x !== undefined) {
+ $ERROR('#1: var x = 0.1; void x === undefined. Actual: ' + (void x));
+}
+
+//CHECK#2
+var x = new Number(-1.1);
+if (void x !== undefined) {
+ $ERROR('#2: var x = new Number(-1.1); void x === undefined. Actual: ' + (void x));
+}
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T3.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T3.js
new file mode 100644
index 000000000..9e41f2c03
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T3.js
@@ -0,0 +1,27 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S11.4.2_A4_T3;
+* @section: 11.4.2;
+* @assertion: Operator "void" evaluates UnaryExpression and returns undefined;
+* @description: Type(x) is string primitive of String object;
+*/
+
+//CHECK#1
+var x = "1";
+if (void x !== undefined) {
+ $ERROR('#1: var x = "1"; void x === undefined. Actual: ' + (void x));
+}
+
+//CHECK#2
+var x = "x";
+if (isNaN(void x) !== true) {
+ $ERROR('#2: var x = "x"; void x === undefined. Actual: ' + (void x));
+}
+
+//CHECK#3
+var x = new String("-1");
+if (void x !== undefined) {
+ $ERROR('#3: var x = new String("-1"); void x === undefined. Actual: ' + (void x));
+}
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T4.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T4.js
new file mode 100644
index 000000000..db4d09672
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T4.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.4.2_A4_T4;
+* @section: 11.4.2;
+* @assertion: Operator "void" evaluates UnaryExpression and returns undefined;
+* @description: Type(x) is undefined or null;
+*/
+
+//CHECK#1
+var x;
+if (isNaN(void x) !== true) {
+ $ERROR('#1: var x; void x === undefined. Actual: ' + (void x));
+}
+
+//CHECK#2
+var x = null;
+if (void x !== undefined) {
+ $ERROR('#2: var x = null; void x === undefined. Actual: ' + (void x));
+}
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T5.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T5.js
new file mode 100644
index 000000000..d2df4cbd9
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T5.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.4.2_A4_T5;
+* @section: 11.4.2;
+* @assertion: Operator "void" evaluates UnaryExpression and returns undefined;
+* @description: Type(x) is Object object or Function object;
+*/
+
+//CHECK#1
+var x = {};
+if (isNaN(void x) !== true) {
+ $ERROR('#1: var x = {}; void x === undefined. Actual: ' + (void x));
+}
+
+//CHECK#2
+var x = function(){return 1};
+if (isNaN(void x) !== true) {
+ $ERROR('#2: var x = function(){return 1}; void x === undefined. Actual: ' + (void x));
+}
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T6.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T6.js
new file mode 100644
index 000000000..1acd5848c
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.2_The_void_Operator/S11.4.2_A4_T6.js
@@ -0,0 +1,19 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S11.4.2_A4_T6;
+* @section: 11.4.2;
+* @assertion: Operator "void" evaluates UnaryExpression and returns undefined;
+* @description: Checking Simple Assignment operator;
+*/
+
+//CHECK#1
+var x = 0;
+if (void (x = 1) !== undefined) {
+ $ERROR('#1: var x = 0; void (x = 1) === undefined. Actual: ' + (void (x = 1)));
+} else {
+ if (x !== 1) {
+ $ERROR('#1: var x = 0; void (x = 1); x === 1. Actual: ' + (x));
+ }
+}