OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 // |
| 5 // MODULE |
| 6 |
| 7 import {a as x, a as y} from "modules-skip-1.js"; |
| 8 import {b as z, get_a, set_a} from "modules-skip-1.js"; |
| 9 |
| 10 assertEquals(1, get_a()); |
| 11 assertEquals(1, x); |
| 12 assertEquals(1, y); |
| 13 assertEquals(1, z); |
| 14 |
| 15 set_a(2); |
| 16 assertEquals(2, get_a()); |
| 17 assertEquals(2, x); |
| 18 assertEquals(2, y); |
| 19 assertEquals(2, z); |
| 20 |
| 21 assertThrows(() => x = 3, TypeError); |
| 22 assertThrows(() => y = 3, TypeError); |
| 23 assertThrows(() => z = 3, TypeError); |
| 24 |
| 25 assertEquals(2, get_a()); |
| 26 assertEquals(2, x); |
| 27 assertEquals(2, y); |
| 28 assertEquals(2, z); |
| 29 |
| 30 assertEquals(2, eval('get_a()')); |
| 31 assertEquals(2, eval('x')); |
| 32 assertEquals(2, eval('y')); |
| 33 assertEquals(2, eval('z')); |
| 34 |
| 35 assertEquals(2, (() => get_a())()); |
| 36 assertEquals(2, (() => x)()); |
| 37 assertEquals(2, (() => y)()); |
| 38 assertEquals(2, (() => z)()); |
OLD | NEW |