Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/strict-equals/S11.9.4_A8_T4.js

raw
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 info: If Type(x) is different from Type(y), return false
6 es5id: 11.9.4_A8_T4
7 description: x or y is null or undefined
8 ---*/
9
10 //CHECK#1
11 if (undefined === null) {
12 $ERROR('#1: undefined !== null');
13 }
14
15 //CHECK#2
16 if (null === undefined) {
17 $ERROR('#2: null !== undefined');
18 }
19
20 //CHECK#3
21 if (null === 0) {
22 $ERROR('#3: null !== 0');
23 }
24
25 //CHECK#4
26 if (0 === null) {
27 $ERROR('#4: 0 !== null');
28 }
29
30 //CHECK#5
31 if (null === false) {
32 $ERROR('#5: null !== false');
33 }
34
35 //CHECK#6
36 if (false === null) {
37 $ERROR('#6: false !== null');
38 }
39
40 //CHECK#7
41 if (undefined === false) {
42 $ERROR('#7: undefined !== false');
43 }
44
45 //CHECK#8
46 if (false === undefined) {
47 $ERROR('#8: false !== undefined');
48 }
49
50 //CHECK#9
51 if (null === new Object()) {
52 $ERROR('#9: null !== new Object()');
53 }
54
55 //CHECK#10
56 if (new Object() === null) {
57 $ERROR('#10: new Object() !== null');
58 }
59
60 //CHECK#11
61 if (null === "null") {
62 $ERROR('#11: null !== "null"');
63 }
64
65 //CHECK#12
66 if ("null" === null) {
67 $ERROR('#12: "null" !== null');
68 }
69
70 //CHECK#13
71 if (undefined === "undefined") {
72 $ERROR('#13: undefined !== "undefined"');
73 }
74
75 //CHECK#14
76 if ("undefined" === undefined) {
77 $ERROR('#14: "undefined" !== undefined');
78 }