michael@0: function getTestCaseResult(expected, actual) { michael@0: if (actual != expected) michael@0: return Math.abs(actual - expected) <= 1E-10; michael@0: } michael@0: function InstanceOf(object, constructor) { michael@0: while ( object != null ) michael@0: object = object.__proto__; michael@0: } michael@0: function WorkerBee () {} michael@0: function Engineer () {} michael@0: Engineer.prototype = new WorkerBee(); michael@0: var pat = new Engineer(); michael@0: getTestCaseResult(pat.__proto__.__proto__.__proto__.__proto__ == Object.prototype); michael@0: getTestCaseResult(InstanceOf(pat, Engineer)); michael@0: evaluate("getTestCaseResult( Object.prototype.__proto__ );", { compileAndGo: true });