Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: test/mjsunit/modules-imports3.js

Issue 2362083002: [modules] Do basic linking. (Closed)
Patch Set: Rename files because the presubmit tool is so fragile. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mjsunit/modules-imports2.js ('k') | test/mjsunit/modules-imports4.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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)());
OLDNEW
« no previous file with comments | « test/mjsunit/modules-imports2.js ('k') | test/mjsunit/modules-imports4.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698