Debian Codegraph @

js/src/tests/test262/language/eval-code/indirect/non-string-object.js

raw
1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 info: If x is not a string value, return x
5 esid: sec-performeval
6 es5id: 15.1.2.1_A1.1_T2
7 description: Checking all objects
8 ---*/
9
10 var x = {};
11 assert.sameValue((0,eval)(x), x, 'ordinary object');
12
13 x = new Number(1);
14 assert.sameValue((0,eval)(x), x, 'Number object');
15
16 x = new Boolean(true);
17 assert.sameValue((0,eval)(x), x, 'Boolean object');
18
19 x = new String("1+1");
20 assert.sameValue((0,eval)(x), x, 'String object');
21
22 reportCompare(0, 0);