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

Side by Side Diff: test/cctest/test-regexp.cc

Issue 1221433021: Move SmartPointer to base. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove some unecessary header includes Created 5 years, 5 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 static void ExpectError(const char* input, 406 static void ExpectError(const char* input,
407 const char* expected) { 407 const char* expected) {
408 v8::HandleScope scope(CcTest::isolate()); 408 v8::HandleScope scope(CcTest::isolate());
409 Zone zone; 409 Zone zone;
410 FlatStringReader reader(CcTest::i_isolate(), CStrVector(input)); 410 FlatStringReader reader(CcTest::i_isolate(), CStrVector(input));
411 RegExpCompileData result; 411 RegExpCompileData result;
412 CHECK(!v8::internal::RegExpParser::ParseRegExp( 412 CHECK(!v8::internal::RegExpParser::ParseRegExp(
413 CcTest::i_isolate(), &zone, &reader, false, false, &result)); 413 CcTest::i_isolate(), &zone, &reader, false, false, &result));
414 CHECK(result.tree == NULL); 414 CHECK(result.tree == NULL);
415 CHECK(!result.error.is_null()); 415 CHECK(!result.error.is_null());
416 SmartArrayPointer<char> str = result.error->ToCString(ALLOW_NULLS); 416 v8::base::SmartArrayPointer<char> str = result.error->ToCString(ALLOW_NULLS);
417 CHECK_EQ(0, strcmp(expected, str.get())); 417 CHECK_EQ(0, strcmp(expected, str.get()));
418 } 418 }
419 419
420 420
421 TEST(Errors) { 421 TEST(Errors) {
422 const char* kEndBackslash = "\\ at end of pattern"; 422 const char* kEndBackslash = "\\ at end of pattern";
423 ExpectError("\\", kEndBackslash); 423 ExpectError("\\", kEndBackslash);
424 const char* kUnterminatedGroup = "Unterminated group"; 424 const char* kUnterminatedGroup = "Unterminated group";
425 ExpectError("(foo", kUnterminatedGroup); 425 ExpectError("(foo", kUnterminatedGroup);
426 const char* kInvalidGroup = "Invalid group"; 426 const char* kInvalidGroup = "Invalid group";
(...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after
1808 1808
1809 ZoneList<CharacterRange> first_only(4, &zone); 1809 ZoneList<CharacterRange> first_only(4, &zone);
1810 ZoneList<CharacterRange> second_only(4, &zone); 1810 ZoneList<CharacterRange> second_only(4, &zone);
1811 ZoneList<CharacterRange> both(4, &zone); 1811 ZoneList<CharacterRange> both(4, &zone);
1812 } 1812 }
1813 1813
1814 1814
1815 TEST(Graph) { 1815 TEST(Graph) {
1816 Execute("\\b\\w+\\b", false, true, true); 1816 Execute("\\b\\w+\\b", false, true, true);
1817 } 1817 }
OLDNEW
« BUILD.gn ('K') | « test/cctest/test-parsing.cc ('k') | test/cctest/test-reloc-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698