| Index: test/mjsunit/modules/export2.js
|
| diff --git a/test/mjsunit/modules/export2.js b/test/mjsunit/modules/export2.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..b23a98148d0addff9ea8813c92cd08d0b8c89739
|
| --- /dev/null
|
| +++ b/test/mjsunit/modules/export2.js
|
| @@ -0,0 +1,31 @@
|
| +// Copyright 2016 the V8 project authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// MODULE
|
| +
|
| +export function foo() { return 42 }
|
| +assertEquals(42, foo());
|
| +foo = 1;
|
| +assertEquals(1, foo);
|
| +
|
| +let gaga = 43;
|
| +export {gaga as gugu};
|
| +assertEquals(43, gaga);
|
| +
|
| +export default (function bar() { return 43 })
|
| +assertThrows(() => bar(), ReferenceError);
|
| +assertThrows("default", SyntaxError);
|
| +assertThrows("*default*", SyntaxError);
|
| +
|
| +
|
| +var shit = 44;
|
| +var shiit = 45;
|
| +export {shit};
|
| +export {shit as shiit};
|
| +export {shit as shiiit};
|
| +assertEquals(44, shit);
|
| +assertEquals(45, shiit);
|
| +shit = 46;
|
| +assertEquals(46, shit);
|
| +assertEquals(45, shiit);
|
|
|