diff options
Diffstat (limited to 'deps/v8/test/cctest/test-parsing.cc')
-rw-r--r-- | deps/v8/test/cctest/test-parsing.cc | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/deps/v8/test/cctest/test-parsing.cc b/deps/v8/test/cctest/test-parsing.cc index aaef09b91e..ba69b6d2f6 100644 --- a/deps/v8/test/cctest/test-parsing.cc +++ b/deps/v8/test/cctest/test-parsing.cc @@ -4701,10 +4701,10 @@ TEST(ImportExpressionSuccess) { // context. // For example, a top level "import(" is parsed as an // import declaration. The parser parses the import token correctly - // and then shows an "Unexpected token (" error message. The + // and then shows an "Unexpected token '('" error message. The // preparser does not understand the import keyword (this test is // run without kAllowHarmonyDynamicImport flag), so this results in - // an "Unexpected token import" error. + // an "Unexpected token 'import'" error. RunParserSyncTest(context_data, data, kError); RunModuleParserSyncTest(context_data, data, kError, nullptr, 0, nullptr, 0, nullptr, 0, true, true); @@ -4772,7 +4772,7 @@ TEST(ImportExpressionErrors) { // as an import declaration. The parser parses the import token // correctly and then shows an "Unexpected end of input" error // message because of the '{'. The preparser shows an "Unexpected - // token {" because it's not a valid token in a CallExpression. + // token '{'" because it's not a valid token in a CallExpression. RunModuleParserSyncTest(context_data, data, kError, nullptr, 0, flags, arraysize(flags), nullptr, 0, true, true); } @@ -7424,7 +7424,7 @@ TEST(EnumReserved) { RunModuleParserSyncTest(context_data, kErrorSources, kError); } -static void CheckEntry(const i::ModuleDescriptor::Entry* entry, +static void CheckEntry(const i::SourceTextModuleDescriptor::Entry* entry, const char* export_name, const char* local_name, const char* import_name, int module_request) { CHECK_NOT_NULL(entry); @@ -7487,7 +7487,7 @@ TEST(ModuleParsingInternals) { CHECK(outer_scope->is_script_scope()); CHECK_NULL(outer_scope->outer_scope()); CHECK(module_scope->is_module_scope()); - const i::ModuleDescriptor::Entry* entry; + const i::SourceTextModuleDescriptor::Entry* entry; i::Declaration::List* declarations = module_scope->declarations(); CHECK_EQ(13, declarations->LengthForTest()); @@ -7572,7 +7572,7 @@ TEST(ModuleParsingInternals) { CHECK(declarations->AtForTest(12)->var()->location() == i::VariableLocation::MODULE); - i::ModuleDescriptor* descriptor = module_scope->module(); + i::SourceTextModuleDescriptor* descriptor = module_scope->module(); CHECK_NOT_NULL(descriptor); CHECK_EQ(5u, descriptor->module_requests().size()); @@ -11319,15 +11319,9 @@ TEST(HashbangSyntax) { const char* data[] = {"function\nFN\n(\n)\n {\n}\nFN();", nullptr}; - i::FLAG_harmony_hashbang = true; RunParserSyncTest(context_data, data, kSuccess); RunParserSyncTest(context_data, data, kSuccess, nullptr, 0, nullptr, 0, nullptr, 0, true); - - i::FLAG_harmony_hashbang = false; - RunParserSyncTest(context_data, data, kError); - RunParserSyncTest(context_data, data, kError, nullptr, 0, nullptr, 0, nullptr, - 0, true); } TEST(HashbangSyntaxErrors) { @@ -11370,12 +11364,6 @@ TEST(HashbangSyntaxErrors) { const char* hashbang_data[] = {"#!\n", "#!---IGNORED---\n", nullptr}; auto SyntaxErrorTest = [](const char* context_data[][2], const char* data[]) { - i::FLAG_harmony_hashbang = true; - RunParserSyncTest(context_data, data, kError); - RunParserSyncTest(context_data, data, kError, nullptr, 0, nullptr, 0, - nullptr, 0, true); - - i::FLAG_harmony_hashbang = false; RunParserSyncTest(context_data, data, kError); RunParserSyncTest(context_data, data, kError, nullptr, 0, nullptr, 0, nullptr, 0, true); |