]>
Commit | Line | Data |
---|---|---|
81345200 A |
1 | function test(actualFunction, expected) { |
2 | var actual = actualFunction(); | |
3 | if (actual != expected) | |
4 | throw new Error("bad in " + actualFunction + " result: " + actual); | |
5 | } | |
6 | ||
7 | noInline(test); | |
8 | ||
9 | for (var i = 0; i < 10000; ++i) { | |
10 | test(function() { return "5" == 5; }, true); | |
11 | test(function() { return ({valueOf:function(){return 42;}}) == 42; }, true); | |
12 | test(function() { return ({valueOf:function(){return 42;}}) == ({valueOf:function(){return 42;}}) }, false); | |
13 | } |