Debian Codegraph @

js/src/tests/test262/language/module-code/instn-named-id-name.js

raw
1 // |reftest| module
2 // Copyright (C) 2016 the V8 project authors. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 description: >
6 The first identifier in an ImportSpecifier containing `as` may be any valid
7 IdentifierName
8 esid: sec-imports
9 info: |
10 ImportSpecifier:
11 ImportedBinding
12 IdentifierName as ImportedBinding
13 flags: [module]
14 ---*/
15
16 var _if = 1;
17 var _import = 2;
18 var _export = 3;
19 var _await = 4;
20 var _arguments = 5;
21 var _eval = 6;
22 var _default = 7;
23 var _as = 8;
24
25 export {
26 _if as if,
27 _import as import,
28 _export as export,
29 _await as await,
30 _arguments as arguments,
31 _eval as eval,
32 _default as default,
33 _as as as
34 };
35
36 import {
37 if as if_,
38 import as import_,
39 export as export_,
40 await as await_,
41 arguments as arguments_,
42 eval as eval_,
43 default as default_,
44 as as as
45 } from './instn-named-id-name.js';
46
47 assert.sameValue(if_, 1);
48 assert.sameValue(import_, 2);
49 assert.sameValue(export_, 3);
50 assert.sameValue(await_, 4);
51 assert.sameValue(arguments_, 5);
52 assert.sameValue(eval_, 6);
53 assert.sameValue(default_, 7);
54 assert.sameValue(as, 8);
55
56 reportCompare(0, 0);