3 Object.defineProperty(this, "prop1", {
9 Object.defineProperty(this, "prop2", {
11 get: function() { return 15; }
14 Object.defineProperty(this, "prop3", {
19 Object.defineProperty(this, "prop4", {
21 get: function() { return 20; },
45 assertThrowsInstanceOf(() => x.f1(), TypeError);
48 assertThrowsInstanceOf(() => x.f2(), TypeError);
49 assertEq(x.prop2, 15);
51 assertThrowsInstanceOf(() => x.f3(), TypeError);
52 assertEq(x.prop3, undefined);
54 assertThrowsInstanceOf(() => x.f4(), TypeError);
55 assertEq(x.prop4, 20);
57 if (typeof reportCompare === 'function')
58 reportCompare(0,0,"OK");