]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/string-ident-to-not-string-var-equality.js
9 function test(a
, b
, expected
) {
10 var fooActual
= foo(a
, b
);
11 var barActual
= bar(a
, b
);
13 if (fooActual
!= expected
)
14 throw new Error("Bad result: " + fooActual
);
15 if (barActual
!= expected
)
16 throw new Error("Bad result: " + barActual
);
19 for (var i
= 0; i
< 10000; ++i
) {
20 test("foo", "foo", true);
21 test("foo", "bar", false);
22 test("fuz", 42, false);
23 test("buz", {}, false);
24 test("bla", null, false);
29 for (var i
= 0; i
< 2; ++i
)
32 test(fooString
, "foo", true);