jdk8/jdk8/nashorn: f336aee22e85 (original) (raw)
OpenJDK / jdk8 / jdk8 / nashorn
changeset 48:f336aee22e85
8006852: Move tests from JIRA for prepopulated map failures Reviewed-by: sundar Contributed-by: james.laskey@oracle.com
jlaskey | |
---|---|
date | Thu, 24 Jan 2013 12:15:29 -0400 |
parents | edfa73d9fde7 |
children | bff7087396d7 |
files | test/script/basic/JDK-8006852a.js test/script/basic/JDK-8006852a.js.EXPECTED test/script/basic/JDK-8006852b.js |
diffstat | 3 files changed, 104 insertions(+), 0 deletions(-)[+] [-] test/script/basic/JDK-8006852a.js 50 test/script/basic/JDK-8006852a.js.EXPECTED 6 test/script/basic/JDK-8006852b.js 48 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/script/basic/JDK-8006852a.js Thu Jan 24 12:15:29 2013 -0400 @@ -0,0 +1,50 @@ +/*
- or visit www.oracle.com if you need additional information or have any
- */ + +/**
- *
- */
- +function Field(val){
- this.value = val;
[](#l1.38)
- get value(){
print("GETTER!"); [](#l1.41)
return this._value; [](#l1.42)
- },
- set value(val){
print("SETTER!"); [](#l1.45)
this._value = val + (++times); [](#l1.46)
- }
[](#l1.49)
+var f = new Field("test"); +print(f.value); +f.value = "test2"; +print(f.value);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/script/basic/JDK-8006852a.js.EXPECTED Thu Jan 24 12:15:29 2013 -0400
@@ -0,0 +1,6 @@
+SETTER
+GETTER
+test1
+SETTER
+GETTER
+test22
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/script/basic/JDK-8006852b.js Thu Jan 24 12:15:29 2013 -0400 @@ -0,0 +1,48 @@ +/*
- or visit www.oracle.com if you need additional information or have any
- */ + +/**
- *
- */
- +function MyCons(arg) {
- if (arg == 2) {
this.foo = 3;[](#l3.36)
- }
- this.bar = 44;
- // print(Debug.map(this));
+} + +MyCons.prototype.foo = "proto--foo"; + +var myObj = new MyCons(); +if (myObj.hasOwnProperty("foo")) {