File indexing completed on 2024-04-28 15:28:38

0001 shouldBe("typeof Object()", "'object'");
0002 shouldBe("var o = Object(); o.x = 11; o.x;", "11");
0003 shouldBeTrue("Object(undefined).__proto__ === Object.prototype");
0004 shouldBeTrue("Object(null).__proto__ === Object.prototype");
0005 shouldBe("Object(1).valueOf()", "1");
0006 shouldBe("Object(true).valueOf()", "true");
0007 shouldBe("Object('s').valueOf()", "'s'");
0008 shouldBe("Object({x: 12}).x", "12");
0009 
0010 shouldBe("typeof (new Object())", "'object'");
0011 shouldBeTrue("(new Object(undefined)).__proto__ === Object.prototype");
0012 shouldBeTrue("(new Object(null)).__proto__ === Object.prototype");
0013 shouldBeTrue("(new Object(1)).__proto__ === Number.prototype");
0014 shouldBe("(new Object(1)).valueOf()", "1");
0015 shouldBeTrue("(new Object(true)).__proto__ === Boolean.prototype");
0016 shouldBe("(new Object(true)).valueOf()", "true");
0017 shouldBeTrue("(new Object('s')).__proto__ === String.prototype");
0018 shouldBe("(new Object('s')).valueOf()", "'s'");
0019 
0020 shouldBe("String(Object())", "'[object Object]'");
0021 shouldBe("Object().toString()", "'[object Object]'");
0022 shouldBe("String(Object().valueOf())", "'[object Object]'");