-
-
Save jugglinmike/b595db3ece6103bdbe08 to your computer and use it in GitHub Desktop.
New test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc | |
index 8fa445d..39e6c2b 100644 | |
--- a/test/cctest/test-parsing.cc | |
+++ b/test/cctest/test-parsing.cc | |
@@ -5946,6 +5946,31 @@ TEST(ModuleAwaitReserved) { | |
} | |
+TEST(Mike) { | |
+ i::FLAG_harmony_modules = true; | |
+ i::FLAG_min_preparse_length = 0; | |
+ i::Isolate* isolate = CcTest::i_isolate(); | |
+ i::Factory* factory = isolate->factory(); | |
+ | |
+ v8::HandleScope handles(CcTest::isolate()); | |
+ v8::Local<v8::Context> context = v8::Context::New(CcTest::isolate()); | |
+ v8::Context::Scope context_scope(context); | |
+ | |
+ isolate->stack_guard()->SetStackLimit(i::GetCurrentStackPosition() - | |
+ 128 * 1024); | |
+ | |
+ i::Handle<i::String> source = | |
+ factory->NewStringFromAsciiChecked("function f() { var await = 0; }"); | |
+ | |
+ i::Handle<i::Script> script = factory->NewScript(source); | |
+ i::Zone zone; | |
+ i::ParseInfo info(&zone, script); | |
+ i::Parser parser(&info); | |
+ info.set_module(); | |
+ CHECK(!parser.Parse(&info)); | |
+} | |
+ | |
+ | |
TEST(ModuleAwaitPermitted) { | |
i::FLAG_harmony_modules = true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment