aboutsummaryrefslogtreecommitdiffstats
path: root/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.8_Bitwise_NOT_Operator/S11.4.8_A2.1_T1.js
diff options
context:
space:
mode:
authorDavid Fugate <dfugate@microsoft.com>2011-06-28 10:36:30 -0700
committerDavid Fugate <dfugate@microsoft.com>2011-06-28 10:36:30 -0700
commit0005b0b87b55ee11277e414c4063ae97b3c793e1 (patch)
treefc37bea04c3ff1cf21dff9ee02f51f2757958cd9 /external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.8_Bitwise_NOT_Operator/S11.4.8_A2.1_T1.js
parent55855b285e67bc29e567c515459726cb1a110163 (diff)
parente69a5fa68f7b946e385786ab13981385b769db64 (diff)
Merged remote changes
Diffstat (limited to 'external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.8_Bitwise_NOT_Operator/S11.4.8_A2.1_T1.js')
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.8_Bitwise_NOT_Operator/S11.4.8_A2.1_T1.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.8_Bitwise_NOT_Operator/S11.4.8_A2.1_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.8_Bitwise_NOT_Operator/S11.4.8_A2.1_T1.js
new file mode 100644
index 000000000..39107ff07
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/11_Expressions/11.4_Unary_Operators/11.4.8_Bitwise_NOT_Operator/S11.4.8_A2.1_T1.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.4.8_A2.1_T1;
+* @section: 11.4.8;
+* @assertion: Operator ~x uses GetValue;
+* @description: Either Type(x) is not Reference or GetBase(x) is not null;
+*/
+
+//CHECK#1
+if (~0 !== -1) {
+ $ERROR('#1: ~0 === -1. Actual: ' + (~0));
+}
+
+//CHECK#2
+if (~(~0) !== 0) {
+ $ERROR('#2: ~(~0) === 0. Actual: ' + (~(~0)));
+}
+
+//CHECK#3
+var x = 0;
+if (~x !== -1) {
+ $ERROR('#3: var x = 0; ~x === -1. Actual: ' + (~x));
+}
+
+//CHECK#4
+var x = 0;
+if (~(~x) !== 0) {
+ $ERROR('#4: var x = 0; ~(~x) === 0. Actual: ' + (~(~x)));
+}
+
+//CHECK#5
+var object = new Object();
+object.prop = 0;
+if (~object.prop !== -1) {
+ $ERROR('#5: var object = new Object(); object.prop = 0; ~object.prop === -1. Actual: ' + (~object.prop));
+}