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

Unified Diff: test/cctest/test-parsing.cc

Issue 1094963002: [modules] Parsing: add ModuleRequests where missing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index ca9063cf99124b01751dc83f639294c27786a907..9a585430b890edcb8318707a471ec261ff596d2b 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -5446,7 +5446,9 @@ TEST(ModuleParsingInternals) {
"export { x as y };"
"import { q as z } from 'm.js';"
"import n from 'n.js';"
- "export { a as b } from 'm.js';";
+ "export { a as b } from 'm.js';"
+ "export * from 'p.js';"
+ "import 'q.js'";
i::Handle<i::String> source = factory->NewStringFromAsciiChecked(kSource);
i::Handle<i::Script> script = factory->NewScript(source);
i::Zone zone;
@@ -5487,11 +5489,14 @@ TEST(ModuleParsingInternals) {
CHECK(import_decl->proxy()->raw_name()->IsOneByteEqualTo("n"));
CHECK(import_decl->module_specifier()->IsOneByteEqualTo("n.js"));
// TODO(adamk): Add test for indirect exports once they're fully implemented.
+ // TODO(adamk): Add test for star exports once they're fully implemented.
const i::ZoneList<const i::AstRawString*>& requested_modules =
descriptor->requested_modules();
- CHECK_EQ(2, requested_modules.length());
+ CHECK_EQ(4, requested_modules.length());
CHECK(requested_modules[0]->IsOneByteEqualTo("m.js"));
CHECK(requested_modules[1]->IsOneByteEqualTo("n.js"));
+ CHECK(requested_modules[2]->IsOneByteEqualTo("p.js"));
+ CHECK(requested_modules[3]->IsOneByteEqualTo("q.js"));
}
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698