summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/logical-or/S11.11.2_A4_T4.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/language/expressions/logical-or/S11.11.2_A4_T4.js')
-rw-r--r--js/src/tests/test262/language/expressions/logical-or/S11.11.2_A4_T4.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/expressions/logical-or/S11.11.2_A4_T4.js b/js/src/tests/test262/language/expressions/logical-or/S11.11.2_A4_T4.js
new file mode 100644
index 0000000000..782faad38c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/logical-or/S11.11.2_A4_T4.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.
+
+/*---
+info: If ToBoolean(x) is true, return x
+es5id: 11.11.2_A4_T4
+description: Type(x) or Type(y) vary between Null and Undefined
+---*/
+
+//CHECK#1
+if ((true || undefined) !== true) {
+ throw new Test262Error('#1: (true || undefined) === true');
+}
+
+//CHECK#2
+if ((true || null) !== true) {
+ throw new Test262Error('#2: (true || null) === true');
+}
+
+reportCompare(0, 0);