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

Side by Side Diff: third_party/re2/util/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
« no previous file with comments | « third_party/re2/util/test.h ('k') | third_party/re2/util/thread.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2009 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 #include <stdio.h>
6 #ifndef _WIN32
7 #include <sys/resource.h>
8 #endif
9 #include "util/test.h"
10
11 DEFINE_string(test_tmpdir, "/var/tmp", "temp directory");
12
13 struct Test {
14 void (*fn)(void);
15 const char *name;
16 };
17
18 static Test tests[10000];
19 static int ntests;
20
21 void RegisterTest(void (*fn)(void), const char *name) {
22 tests[ntests].fn = fn;
23 tests[ntests++].name = name;
24 }
25
26 int main(int argc, char **argv) {
27 for (int i = 0; i < ntests; i++) {
28 printf("%s\n", tests[i].name);
29 tests[i].fn();
30 }
31 printf("PASS\n");
32 return 0;
33 }
OLDNEW
« no previous file with comments | « third_party/re2/util/test.h ('k') | third_party/re2/util/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698