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

Side by Side Diff: third_party/re2/util/test.h

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 4 years, 12 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
« no previous file with comments | « third_party/re2/util/strutil.cc ('k') | third_party/re2/util/test.cc » ('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 #ifndef RE2_UTIL_TEST_H__
6 #define RE2_UTIL_TEST_H__
7
8 #include "util/util.h"
9 #include "util/flags.h"
10
11 #define TEST(x, y) \
12 void x##y(void); \
13 TestRegisterer r##x##y(x##y, # x "." # y); \
14 void x##y(void)
15
16 void RegisterTest(void (*)(void), const char*);
17
18 class TestRegisterer {
19 public:
20 TestRegisterer(void (*fn)(void), const char *s) {
21 RegisterTest(fn, s);
22 }
23 };
24
25 // TODO(rsc): Do a better job.
26 #define EXPECT_EQ CHECK_EQ
27 #define EXPECT_TRUE CHECK
28 #define EXPECT_LT CHECK_LT
29 #define EXPECT_GT CHECK_GT
30 #define EXPECT_LE CHECK_LE
31 #define EXPECT_GE CHECK_GE
32 #define EXPECT_FALSE(x) CHECK(!(x))
33
34 namespace testing {
35 class MallocCounter {
36 public:
37 MallocCounter(int x) {}
38 static const int THIS_THREAD_ONLY = 0;
39 long long HeapGrowth() { return 0; }
40 long long PeakHeapGrowth() { return 0; }
41 void Reset() {}
42 };
43 } // namespace testing
44
45 #endif // RE2_UTIL_TEST_H__
OLDNEW
« no previous file with comments | « third_party/re2/util/strutil.cc ('k') | third_party/re2/util/test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698