js/src/jit-test/tests/ion/bug984830.js

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:c30a24252ba6
1 function getTestCaseResult(expected, actual) {
2 if (actual != expected)
3 return Math.abs(actual - expected) <= 1E-10;
4 }
5 function InstanceOf(object, constructor) {
6 while ( object != null )
7 object = object.__proto__;
8 }
9 function WorkerBee () {}
10 function Engineer () {}
11 Engineer.prototype = new WorkerBee();
12 var pat = new Engineer();
13 getTestCaseResult(pat.__proto__.__proto__.__proto__.__proto__ == Object.prototype);
14 getTestCaseResult(InstanceOf(pat, Engineer));
15 evaluate("getTestCaseResult( Object.prototype.__proto__ );", { compileAndGo: true });

mercurial