Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 });