summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug964229-2.js
blob: 0ccbd7c0192ba732b4d6bfea971551b2768f4ccb (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
49
50
51
52
53
54
55
56
57
58
function test1(re, test) {
    return re.test(test);
}

assertEq(true, test1(/undefined/, undefined));
assertEq(true, test1(/undefined/, undefined));

function test2(re, test) {
    return re.test(test);
}

assertEq(true, test2(/null/, null));
assertEq(true, test2(/null/, null));

function test3(re, test) {
    return re.test(test);
}

assertEq(true, test3(/0/, 0));
assertEq(true, test3(/0/, 0));

function test4(re, test) {
    return re.test(test);
}

assertEq(true, test4(/12.12/, 12.12));
assertEq(true, test4(/12.12/, 12.12));

function test5(re, test) {
    return re.test(test);
}

assertEq(true, test5(/true/, true));
assertEq(true, test5(/false/, false));
assertEq(true, test5(/true/, true));
assertEq(true, test5(/false/, false));

function test6(re, test) {
    return re.test(test);
}

assertEq(true, test6(/object/, {}));
assertEq(true, test6(/object/, {}));

assertEq(true, test1(/test/, "test"));
assertEq(true, test1(/test/, "test"));
assertEq(true, test1(/undefined/, undefined));
assertEq(true, test1(/undefined/, undefined));
assertEq(true, test1(/null/, null));
assertEq(true, test1(/null/, null));
assertEq(true, test1(/0.1/, 0.1));
assertEq(true, test1(/0.1/, 0.1));
assertEq(true, test1(/20000/, 20000));
assertEq(true, test1(/20000/, 20000));
assertEq(true, test1(/object/, {}));
assertEq(true, test1(/object/, {}));