aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual/v4/accessors.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/v4/accessors.js')
-rw-r--r--tests/manual/v4/accessors.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/manual/v4/accessors.js b/tests/manual/v4/accessors.js
new file mode 100644
index 0000000000..3874e4d329
--- /dev/null
+++ b/tests/manual/v4/accessors.js
@@ -0,0 +1,8 @@
+"use strict";
+var foo = { y: 1 }
+foo.__defineSetter__("x", function(x) { this.y = x;} )
+foo.__defineGetter__("x", function() { return this.y;} )
+print(foo.y);
+foo.x = "ok";
+print(foo.x);
+print(foo.y);