js/src/tests/test262/ch11/11.1/11.1.5/11.1.5-0-1.js

branch
TOR_BUG_3246
changeset 6
8bccb770b82d
equal deleted inserted replaced
-1:000000000000 0:553f14f29e53
1 /// Copyright (c) 2012 Ecma International. All rights reserved.
2 /// Ecma International makes this code available under the terms and conditions set
3 /// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
4 /// "Use Terms"). Any redistribution of this code must retain the above
5 /// copyright and this notice and otherwise comply with the Use Terms.
6 /**
7 * it isn't clear what specific requirements of the specificaiton are being tested here. This test should
8 * probably be replaced by some more targeted tests. AllenWB
9 *
10 * @path ch11/11.1/11.1.5/11.1.5-0-1.js
11 * @description Object literal - get set property
12 */
13
14
15 function testcase() {
16 var s1 = "In getter";
17 var s2 = "In setter";
18 var s3 = "Modified by setter";
19 eval("var o = {get foo(){ return s1;},set foo(arg){return s2 = s3}};");
20 if(o.foo !== s1)
21 return false;
22 o.foo=10;
23 if(s2 !== s3)
24 return false;
25 return true;
26 }
27 runTestCase(testcase);

mercurial