Index: test/cctest/test-parsing.cc |
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc |
index 02f8869c419fc4c70504c2ac87fa1cf8fe3e7ee3..7318448497b9ea28598205ff40e5cbc591de9d10 100644 |
--- a/test/cctest/test-parsing.cc |
+++ b/test/cctest/test-parsing.cc |
@@ -5219,7 +5219,10 @@ TEST(ModuleParsingInternals) { |
128 * 1024); |
static const char kSource[] = |
- "let x = 5; export { x as y }; import { q as z } from 'm.js';"; |
+ "let x = 5;" |
+ "export { x as y };" |
+ "import { q as z } from 'm.js';" |
+ "import n from 'n.js'"; |
i::Handle<i::String> source = factory->NewStringFromAsciiChecked(kSource); |
i::Handle<i::Script> script = factory->NewScript(source); |
i::CompilationInfoWithZone info(script); |
@@ -5241,13 +5244,17 @@ TEST(ModuleParsingInternals) { |
} |
CHECK_EQ(1, num_exports); |
i::ZoneList<i::Declaration*>* declarations = func->scope()->declarations(); |
- CHECK_EQ(2, declarations->length()); |
+ CHECK_EQ(3, declarations->length()); |
CHECK(declarations->at(0)->proxy()->raw_name()->IsOneByteEqualTo("x")); |
i::ImportDeclaration* import_decl = |
declarations->at(1)->AsImportDeclaration(); |
CHECK(import_decl->import_name()->IsOneByteEqualTo("q")); |
CHECK(import_decl->proxy()->raw_name()->IsOneByteEqualTo("z")); |
CHECK(import_decl->module_specifier()->IsOneByteEqualTo("m.js")); |
+ import_decl = declarations->at(2)->AsImportDeclaration(); |
+ CHECK(import_decl->import_name()->IsOneByteEqualTo("default")); |
+ CHECK(import_decl->proxy()->raw_name()->IsOneByteEqualTo("n")); |
+ CHECK(import_decl->module_specifier()->IsOneByteEqualTo("n.js")); |
} |