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

Side by Side Diff: third_party/re2/re2/testing/exhaustive_test.cc

Issue 1544433002: Replace RE2 import with a dependency (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-Added LICENSE and OWNERS file 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2008 The RE2 Authors. All Rights Reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // Exhaustive testing of regular expression matching.
6
7 #include "util/test.h"
8 #include "re2/testing/exhaustive_tester.h"
9
10 namespace re2 {
11
12 DECLARE_string(regexp_engines);
13
14 // Test very simple expressions.
15 TEST(EgrepLiterals, Lowercase) {
16 EgrepTest(3, 2, "abc.", 3, "abc", "");
17 }
18
19 // Test mixed-case expressions.
20 TEST(EgrepLiterals, MixedCase) {
21 EgrepTest(3, 2, "AaBb.", 2, "AaBb", "");
22 }
23
24 // Test mixed-case in case-insensitive mode.
25 TEST(EgrepLiterals, FoldCase) {
26 // The punctuation characters surround A-Z and a-z
27 // in the ASCII table. This looks for bugs in the
28 // bytemap range code in the DFA.
29 EgrepTest(3, 2, "abAB.", 2, "aBc@_~", "(?i:%s)");
30 }
31
32 // Test very simple expressions.
33 TEST(EgrepLiterals, UTF8) {
34 EgrepTest(3, 2, "ab.", 4, "a\xE2\x98\xBA", "");
35 }
36
37 } // namespace re2
38
OLDNEW
« no previous file with comments | « third_party/re2/re2/testing/exhaustive3_test.cc ('k') | third_party/re2/re2/testing/exhaustive_tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698