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

Side by Side Diff: third_party/re2/testinstall.cc

Issue 1530113002: Revert of Update re2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « third_party/re2/re2_test.bzl ('k') | third_party/re2/util/arena.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 The RE2 Authors. All Rights Reserved. 1 // Copyright 2008 The RE2 Authors. All Rights Reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 #include <re2/re2.h> 5 #include <re2/re2.h>
6 #include <re2/filtered_re2.h> 6 #include <re2/filtered_re2.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 using namespace re2; 9 using namespace re2;
10 10
11 int main(void) { 11 int main(void) {
12 FilteredRE2 f; 12 FilteredRE2 f;
13 int id; 13 int id;
14 f.Add("a.*b.*c", RE2::DefaultOptions, &id); 14 f.Add("a.*b.*c", RE2::DefaultOptions, &id);
15 vector<string> v; 15 vector<string> v;
16 f.Compile(&v); 16 f.Compile(&v);
17 vector<int> ids;
18 f.FirstMatch("abbccc", ids);
19 17
20 if(RE2::FullMatch("axbyc", "a.*b.*c")) { 18 if(RE2::FullMatch("axbyc", "a.*b.*c")) {
21 printf("PASS\n"); 19 printf("PASS\n");
22 return 0; 20 return 0;
23 } 21 }
24 printf("FAIL\n"); 22 printf("FAIL\n");
25 return 2; 23 return 2;
26 } 24 }
OLDNEW
« no previous file with comments | « third_party/re2/re2_test.bzl ('k') | third_party/re2/util/arena.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698