File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
graal-js/src/com.oracle.truffle.js.test/js/runtime Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2020, 2020, Oracle and/or its affiliates. All rights reserved.
3+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+ *
5+ * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
6+ */
7+ /*
8+ * Test otherwise untested indirect eval.
9+ */
10+
11+ load ( '../assert.js' ) ;
12+
13+ var indirecteval = eval ;
14+ assertSame ( 42 , indirecteval ( 42 ) ) ;
15+ assertSame ( 42n , indirecteval ( 42n ) ) ;
16+ assertSame ( 42 , indirecteval ( Debug . createSafeInteger ( 42 ) ) ) ;
17+ assertSame ( 42.5 , indirecteval ( 42.5 ) ) ;
18+ assertSame ( true , indirecteval ( true ) ) ;
19+
20+ var symbol = Symbol ( 'test' ) ;
21+ assertSame ( symbol , indirecteval ( symbol ) ) ;
22+
23+ var obj = { foo :'bar' } ;
24+ assertSame ( obj , indirecteval ( obj ) ) ;
25+
26+ true ;
You can’t perform that action at this time.
0 commit comments