1 // vim: set ts=4 sw=4 tw=99 et:
3 function testUKeyUObject(a, key1, key2, key3) {
4 a.a = function () { return this.d; }
5 a.b = function () { return this.e; }
6 a.c = function() { return this.f; }
11 Object.defineProperty(a, "b", { get: function () { return function () { return this.e; } } });
12 assertEq(a[key1](), 20);
13 assertEq(a[key2](), "hi");
14 assertEq(a[key3](), 500);
17 for (var i = 0; i < 5; i++)
18 testUKeyUObject({}, "a", "b", "c");