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 * as foo from "modules-namespace4.js"; |
| 8 |
| 9 assertSame(undefined, a); |
| 10 assertThrows(() => b, ReferenceError); |
| 11 assertThrows(() => c, ReferenceError); |
| 12 assertEquals(45, d()); |
| 13 |
| 14 assertSame(undefined, foo.a); |
| 15 assertThrows(() => foo.b, ReferenceError); |
| 16 assertThrows(() => foo.c, ReferenceError); |
| 17 assertEquals(45, foo.d()); |
| 18 assertThrows(() => foo.default, ReferenceError); |
| 19 assertSame(undefined, foo.doesnotexist); |
| 20 |
| 21 export var a = 42; |
| 22 export let b = 43; |
| 23 export const c = 44; |
| 24 export function d() { return 45 }; |
| 25 export default 46; |
| 26 |
| 27 assertEquals(42, a); |
| 28 assertEquals(43, b); |
| 29 assertEquals(44, c); |
| 30 assertEquals(45, d()); |
| 31 |
| 32 assertEquals(42, foo.a); |
| 33 assertEquals(43, foo.b); |
| 34 assertEquals(44, foo.c); |
| 35 assertEquals(45, foo.d()); |
| 36 assertEquals(46, foo.default); |
| 37 assertSame(undefined, foo.doesnotexist); |
OLD | NEW |