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

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

Issue 582953002: Revert "Require V8 to be explicitly initialized before an Isolate is created" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | « test/cctest/test-random-number-generator.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-regexp.cc
diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc
index b22b3484dd78c18e46da01b49d930235f1a47839..801e4b33b4493dccf730bb709f5c55d2be601308 100644
--- a/test/cctest/test-regexp.cc
+++ b/test/cctest/test-regexp.cc
@@ -85,6 +85,7 @@ using namespace v8::internal;
static bool CheckParse(const char* input) {
+ V8::Initialize(NULL);
v8::HandleScope scope(CcTest::isolate());
Zone zone(CcTest::i_isolate());
FlatStringReader reader(CcTest::i_isolate(), CStrVector(input));
@@ -95,6 +96,7 @@ static bool CheckParse(const char* input) {
static void CheckParseEq(const char* input, const char* expected) {
+ V8::Initialize(NULL);
v8::HandleScope scope(CcTest::isolate());
Zone zone(CcTest::i_isolate());
FlatStringReader reader(CcTest::i_isolate(), CStrVector(input));
@@ -110,6 +112,7 @@ static void CheckParseEq(const char* input, const char* expected) {
static bool CheckSimple(const char* input) {
+ V8::Initialize(NULL);
v8::HandleScope scope(CcTest::isolate());
Zone zone(CcTest::i_isolate());
FlatStringReader reader(CcTest::i_isolate(), CStrVector(input));
@@ -128,6 +131,7 @@ struct MinMaxPair {
static MinMaxPair CheckMinMaxMatch(const char* input) {
+ V8::Initialize(NULL);
v8::HandleScope scope(CcTest::isolate());
Zone zone(CcTest::i_isolate());
FlatStringReader reader(CcTest::i_isolate(), CStrVector(input));
@@ -152,6 +156,8 @@ static MinMaxPair CheckMinMaxMatch(const char* input) {
}
TEST(Parser) {
+ V8::Initialize(NULL);
+
CHECK_PARSE_ERROR("?");
CheckParseEq("abc", "'abc'");
@@ -401,6 +407,7 @@ TEST(ParserRegression) {
static void ExpectError(const char* input,
const char* expected) {
+ V8::Initialize(NULL);
v8::HandleScope scope(CcTest::isolate());
Zone zone(CcTest::i_isolate());
FlatStringReader reader(CcTest::i_isolate(), CStrVector(input));
@@ -487,6 +494,7 @@ static void TestCharacterClassEscapes(uc16 c, bool (pred)(uc16 c)) {
TEST(CharacterClassEscapes) {
+ v8::internal::V8::Initialize(NULL);
TestCharacterClassEscapes('.', IsRegExpNewline);
TestCharacterClassEscapes('d', IsDigit);
TestCharacterClassEscapes('D', NotDigit);
@@ -499,6 +507,7 @@ TEST(CharacterClassEscapes) {
static RegExpNode* Compile(const char* input, bool multiline, bool is_one_byte,
Zone* zone) {
+ V8::Initialize(NULL);
Isolate* isolate = CcTest::i_isolate();
FlatStringReader reader(isolate, CStrVector(input));
RegExpCompileData compile_data;
@@ -555,6 +564,7 @@ static unsigned PseudoRandom(int i, int j) {
TEST(SplayTreeSimple) {
+ v8::internal::V8::Initialize(NULL);
static const unsigned kLimit = 1000;
Zone zone(CcTest::i_isolate());
ZoneSplayTree<TestConfig> tree(&zone);
@@ -607,6 +617,7 @@ TEST(SplayTreeSimple) {
TEST(DispatchTableConstruction) {
+ v8::internal::V8::Initialize(NULL);
// Initialize test data.
static const int kLimit = 1000;
static const int kRangeCount = 8;
@@ -1351,6 +1362,7 @@ TEST(MacroAssemblerNativeLotsOfRegisters) {
#else // V8_INTERPRETED_REGEXP
TEST(MacroAssembler) {
+ V8::Initialize(NULL);
byte codes[1024];
Zone zone(CcTest::i_isolate());
RegExpMacroAssemblerIrregexp m(Vector<byte>(codes, 1024), &zone);
@@ -1416,6 +1428,7 @@ TEST(MacroAssembler) {
TEST(AddInverseToTable) {
+ v8::internal::V8::Initialize(NULL);
static const int kLimit = 1000;
static const int kRangeCount = 16;
for (int t = 0; t < 10; t++) {
@@ -1575,6 +1588,7 @@ static void TestSimpleRangeCaseIndependence(CharacterRange input,
TEST(CharacterRangeCaseIndependence) {
+ v8::internal::V8::Initialize(NULL);
TestSimpleRangeCaseIndependence(CharacterRange::Singleton('a'),
CharacterRange::Singleton('A'));
TestSimpleRangeCaseIndependence(CharacterRange::Singleton('z'),
@@ -1616,6 +1630,7 @@ static bool InClass(uc16 c, ZoneList<CharacterRange>* ranges) {
TEST(CharClassDifference) {
+ v8::internal::V8::Initialize(NULL);
Zone zone(CcTest::i_isolate());
ZoneList<CharacterRange>* base =
new(&zone) ZoneList<CharacterRange>(1, &zone);
@@ -1643,6 +1658,7 @@ TEST(CharClassDifference) {
TEST(CanonicalizeCharacterSets) {
+ v8::internal::V8::Initialize(NULL);
Zone zone(CcTest::i_isolate());
ZoneList<CharacterRange>* list =
new(&zone) ZoneList<CharacterRange>(4, &zone);
@@ -1704,6 +1720,7 @@ TEST(CanonicalizeCharacterSets) {
TEST(CharacterRangeMerge) {
+ v8::internal::V8::Initialize(NULL);
Zone zone(CcTest::i_isolate());
ZoneList<CharacterRange> l1(4, &zone);
ZoneList<CharacterRange> l2(4, &zone);
@@ -1791,5 +1808,6 @@ TEST(CharacterRangeMerge) {
TEST(Graph) {
+ V8::Initialize(NULL);
Execute("\\b\\w+\\b", false, true, true);
}
« no previous file with comments | « test/cctest/test-random-number-generator.cc ('k') | test/cctest/test-serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698