aboutsummaryrefslogtreecommitdiffstats
path: root/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type
diff options
context:
space:
mode:
Diffstat (limited to 'external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type')
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A1_T1.js20
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A1_T2.js74
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A2.1.js12
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A2.2.js12
-rw-r--r--external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A3.js41
5 files changed, 159 insertions, 0 deletions
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A1_T1.js b/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A1_T1.js
new file mode 100644
index 000000000..187ecb95d
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A1_T1.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: S8.3_A1_T1;
+ * @section: 8.3;
+ * @assertion: The Boolean type have two values, called true and false;
+ * @description: Assign true and false to variables;
+*/
+
+if (x == undefined) {
+ $ERROR("x == undefined, but actual is "+ x);
+}
+
+////////////////////////////////////////////////////////////////////////
+// CHECK#1
+var x = true;
+var y = false;
+//
+////////////////////////////////////////////////////////////////////////
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A1_T2.js b/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A1_T2.js
new file mode 100644
index 000000000..264fa3471
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A1_T2.js
@@ -0,0 +1,74 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * @name: S8.3_A1_T2;
+ * @section: 8.3;
+ * @assertion: The Boolean type have two values, called true and false;
+ * @description: Check type of true/false and it`s equality;
+*/
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#1
+if (typeof(true) !== "boolean") {
+ $ERROR('#1: typeof(true) === "boolean"');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#2
+if (typeof(true) != "boolean") {
+ $ERROR('#2: typeof(true) == "boolean"');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#3
+if (typeof(false) !== "boolean") {
+ $ERROR('#3: typeof(false) === "boolean"');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#4
+if (typeof(false) != "boolean") {
+ $ERROR('#4: typeof(false) == "boolean"');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#5
+if (true === false) {
+ $ERROR('#5: true !== false');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#6
+if (true == false) {
+ $ERROR('#6: true != false');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#7
+if (false === true) {
+ $ERROR('#7: false !== true');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////
+// CHECK#8
+if (false == true) {
+ $ERROR('#8: false != true');
+}
+//
+//////////////////////////////////////////////////////////////////////
+
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A2.1.js b/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A2.1.js
new file mode 100644
index 000000000..a65c209fa
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A2.1.js
@@ -0,0 +1,12 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * @name: S8.3_A2.1;
+ * @section: 8.3;
+ * @assertion: The true is reserved word;
+ * @description: Checking if execution of "true=1" fails;
+ * @negative
+*/
+
+true = 1;
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A2.2.js b/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A2.2.js
new file mode 100644
index 000000000..b258b6572
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A2.2.js
@@ -0,0 +1,12 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+ * @name: S8.3_A2.2;
+ * @section: 8.3;
+ * @assertion: The false is reserved word;
+ * @description: Checking if execution of "false=0" fails;
+ * @negative
+*/
+
+false = 0;
diff --git a/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A3.js b/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A3.js
new file mode 100644
index 000000000..e0c4c2bff
--- /dev/null
+++ b/external/contributions/Google/sputniktests/tests/Conformance/08_Types/8.3_The_Boolean_Type/S8.3_A3.js
@@ -0,0 +1,41 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/**
+* @name: S8.3_A3;
+* @section: 8.3;
+* @assertion: Applaing negation to boolean works well;
+* @description: Check not false equals true, not true equals false;
+*/
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (!false !== true){
+ $ERROR('#1: !false === true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (!false != true){
+ $ERROR('#2: !false == true');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (!true !== false){
+ $ERROR('#3: !true === false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+if (!true != false){
+ $ERROR('#4: !true == false');
+}
+//
+//////////////////////////////////////////////////////////////////////////////