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

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

Issue 2302783002: [modules] Basic support of exports (Closed)
Patch Set: Disable module tests for deopt fuzzer. 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-exports1.js ('k') | test/mjsunit/modules-exports3.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 export function foo() { return 42 }
8 assertEquals(42, foo());
9 foo = 1;
10 assertEquals(1, foo);
11
12 let gaga = 43;
13 export {gaga as gugu};
14 assertEquals(43, gaga);
15
16 export default (function bar() { return 43 })
17 assertThrows(() => bar(), ReferenceError);
18 assertThrows("default", SyntaxError);
19 assertThrows("*default*", SyntaxError);
20
21
22 var bla = 44;
23 var blu = 45;
24 export {bla};
25 export {bla as blu};
26 export {bla as bli};
27 assertEquals(44, bla);
28 assertEquals(45, blu);
29 bla = 46;
30 assertEquals(46, bla);
31 assertEquals(45, blu);
OLDNEW
« no previous file with comments | « test/mjsunit/modules-exports1.js ('k') | test/mjsunit/modules-exports3.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698