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

Unified Diff: third_party/re2/re2/testing/possible_match_test.cc

Issue 1516543002: Update re2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated update instructions Created 5 years 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 | « third_party/re2/re2/testing/parse_test.cc ('k') | third_party/re2/re2/testing/random_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/re2/re2/testing/possible_match_test.cc
diff --git a/third_party/re2/re2/testing/possible_match_test.cc b/third_party/re2/re2/testing/possible_match_test.cc
index 7c2400eb5b4320670859db9a2624c761e36c357c..46871651fcdff2bc17670e6b5df8c554bd1fe936 100644
--- a/third_party/re2/re2/testing/possible_match_test.cc
+++ b/third_party/re2/re2/testing/possible_match_test.cc
@@ -7,6 +7,7 @@
#include "re2/prog.h"
#include "re2/re2.h"
#include "re2/regexp.h"
+#include "re2/testing/exhaustive_tester.h"
#include "re2/testing/regexp_generator.h"
#include "re2/testing/string_generator.h"
@@ -136,26 +137,26 @@ TEST(PossibleMatchRange, Failures) {
// are no valid UTF-8 strings beginning with byte 0xFF.
EXPECT_FALSE(RE2("[\\s\\S]+", RE2::Latin1).
PossibleMatchRange(&min, &max, 10))
- << "min=" << CEscape(min) << ", max=" << CEscape(max);
+ << "min=" << CEscape(min) << ", max=" << CEscape(max);
EXPECT_FALSE(RE2("[\\0-\xFF]+", RE2::Latin1).
PossibleMatchRange(&min, &max, 10))
- << "min=" << CEscape(min) << ", max=" << CEscape(max);
+ << "min=" << CEscape(min) << ", max=" << CEscape(max);
EXPECT_FALSE(RE2(".+hello", RE2::Latin1).
PossibleMatchRange(&min, &max, 10))
- << "min=" << CEscape(min) << ", max=" << CEscape(max);
+ << "min=" << CEscape(min) << ", max=" << CEscape(max);
EXPECT_FALSE(RE2(".*hello", RE2::Latin1).
PossibleMatchRange(&min, &max, 10))
- << "min=" << CEscape(min) << ", max=" << CEscape(max);
+ << "min=" << CEscape(min) << ", max=" << CEscape(max);
EXPECT_FALSE(RE2(".*", RE2::Latin1).
PossibleMatchRange(&min, &max, 10))
- << "min=" << CEscape(min) << ", max=" << CEscape(max);
+ << "min=" << CEscape(min) << ", max=" << CEscape(max);
EXPECT_FALSE(RE2("\\C*").
PossibleMatchRange(&min, &max, 10))
- << "min=" << CEscape(min) << ", max=" << CEscape(max);
+ << "min=" << CEscape(min) << ", max=" << CEscape(max);
// Fails because it's a malformed regexp.
EXPECT_FALSE(RE2("*hello").PossibleMatchRange(&min, &max, 10))
- << "min=" << CEscape(min) << ", max=" << CEscape(max);
+ << "min=" << CEscape(min) << ", max=" << CEscape(max);
}
// Exhaustive test: generate all regexps within parameters,
@@ -186,7 +187,7 @@ class PossibleMatchTester : public RegexpGenerator {
int regexps_; // Number of HandleRegexp calls
int tests_; // Number of regexp tests.
- DISALLOW_EVIL_CONSTRUCTORS(PossibleMatchTester);
+ DISALLOW_COPY_AND_ASSIGN(PossibleMatchTester);
};
// Processes a single generated regexp.
@@ -224,7 +225,7 @@ TEST(PossibleMatchRange, Exhaustive) {
int natom = 3;
int noperator = 3;
int stringlen = 5;
- if (DEBUG_MODE) {
+ if (RE2_DEBUG_MODE) {
natom = 2;
noperator = 3;
stringlen = 3;
« no previous file with comments | « third_party/re2/re2/testing/parse_test.cc ('k') | third_party/re2/re2/testing/random_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698