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

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

Issue 3613009: Addressing Mads' comments from http://codereview.chromium.org/3585010/show. (Closed)
Patch Set: Created 10 years, 2 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/execution.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-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index c8dd07ff4f986c77285ee5bb900090bc523464ac..8058bffc7939dd97abbf3511cf6148047e2a3f50 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -11715,4 +11715,11 @@ TEST(RegExp) {
context->Global()->Set(v8_str("re"), re);
ExpectTrue("re.test('FoobarbaZ')");
+
+ v8::TryCatch try_catch;
+ re = v8::RegExp::New(v8_str("foo["), v8::RegExp::kNone);
+ CHECK(re.IsEmpty());
+ CHECK(try_catch.HasCaught());
+ context->Global()->Set(v8_str("ex"), try_catch.Exception());
+ ExpectTrue("ex instanceof SyntaxError");
}
« no previous file with comments | « src/execution.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698