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 {b, c} from "modules-skip-2.js"; |
| 8 import {a, set_a} from "modules-skip-1.js"; |
| 9 import x from "modules-skip-2.js"; |
| 10 |
| 11 assertEquals(42, x); |
| 12 |
| 13 assertEquals(1, a); |
| 14 assertEquals(1, b); |
| 15 assertEquals(1, c); |
| 16 |
| 17 set_a(2); |
| 18 assertEquals(2, a); |
| 19 assertEquals(2, b); |
| 20 assertEquals(2, c); |
| 21 |
| 22 assertThrows(() => a = 3, TypeError); |
| 23 assertThrows(() => b = 3, TypeError); |
| 24 assertThrows(() => c = 3, TypeError); |
| 25 |
| 26 assertEquals(2, a); |
| 27 assertEquals(2, b); |
| 28 assertEquals(2, c); |
| 29 |
| 30 assertThrows(() => x = 43, TypeError); |
| 31 assertEquals(42, x); |
OLD | NEW |