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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/execution.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 11697 matching lines...) Expand 10 before | Expand all | Expand 10 after
11708 re = v8::RegExp::New(v8_str("foobarbaz"), 11708 re = v8::RegExp::New(v8_str("foobarbaz"),
11709 static_cast<v8::RegExp::Flags>(v8::RegExp::kIgnoreCase | 11709 static_cast<v8::RegExp::Flags>(v8::RegExp::kIgnoreCase |
11710 v8::RegExp::kMultiline)); 11710 v8::RegExp::kMultiline));
11711 CHECK(re->IsRegExp()); 11711 CHECK(re->IsRegExp());
11712 CHECK(re->GetSource()->Equals(v8_str("foobarbaz"))); 11712 CHECK(re->GetSource()->Equals(v8_str("foobarbaz")));
11713 CHECK_EQ(static_cast<int>(re->GetFlags()), 11713 CHECK_EQ(static_cast<int>(re->GetFlags()),
11714 v8::RegExp::kIgnoreCase | v8::RegExp::kMultiline); 11714 v8::RegExp::kIgnoreCase | v8::RegExp::kMultiline);
11715 11715
11716 context->Global()->Set(v8_str("re"), re); 11716 context->Global()->Set(v8_str("re"), re);
11717 ExpectTrue("re.test('FoobarbaZ')"); 11717 ExpectTrue("re.test('FoobarbaZ')");
11718
11719 v8::TryCatch try_catch;
11720 re = v8::RegExp::New(v8_str("foo["), v8::RegExp::kNone);
11721 CHECK(re.IsEmpty());
11722 CHECK(try_catch.HasCaught());
11723 context->Global()->Set(v8_str("ex"), try_catch.Exception());
11724 ExpectTrue("ex instanceof SyntaxError");
11718 } 11725 }
OLDNEW
« 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