summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug994016.js
blob: 326dfdc5dfb76bcc707f4c761e3acfe6e8edd816 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
function test(x) {
    return typeof x != "object"
}

var obj = {};
var func = function() {};

assertEq(test(""), true)
assertEq(test(""), true)
assertEq(test(1), true)
assertEq(test(1), true)
assertEq(test(1.5), true)
assertEq(test(1.5), true)
assertEq(test(undefined), true)
assertEq(test(undefined), true)
assertEq(test(func), true)
assertEq(test(func), true)

function test2(x) {
    return typeof x != "string"
}

assertEq(test2(1), true)
assertEq(test2(1), true)
assertEq(test2(1.5), true)
assertEq(test2(1.5), true)
assertEq(test2(undefined), true)
assertEq(test2(undefined), true)
assertEq(test2(func), true)
assertEq(test2(func), true)
assertEq(test2(obj), true)
assertEq(test2(obj), true)

function test3(x) {
    return typeof x != "undefined"
}

assertEq(test3(1), true)
assertEq(test3(1), true)
assertEq(test3(1.5), true)
assertEq(test3(1.5), true)
assertEq(test3(func), true)
assertEq(test3(func), true)
assertEq(test3(obj), true)
assertEq(test3(obj), true)
assertEq(test(""), true)
assertEq(test(""), true)