Debian Codegraph @

js/src/tests/test262/language/eval-code/direct/cptn-nrml-expr-obj.js

raw
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 info: |
6 If Result(3).type is normal and its completion value is a value V,
7 then return the value V
8 es5id: 15.1.2.1_A3.1_T2
9 description: Expression statement. Eval return object value
10 ---*/
11
12 //CHECK#1
13 var x = {};
14 var y;
15 if (eval("y = x") !== x) {
16 throw new Test262Error('#1: var x = {}; eval("y = x") === x. Actual: ' + (eval("y = x")));
17 }
18
19
20 //CHECK#2
21 if (eval("x") !== x) {
22 throw new Test262Error('#2: var x = {}; eval("x") === x. Actual: ' + (eval("x")));
23 }
24
25 reportCompare(0, 0);