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

Side by Side Diff: tests/Test.h

Issue 23453031: Rewrite SkTRegistry to take any trivially-copyable type. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: reed+scroggo Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/ports/SkImageDecoder_WIC.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #ifndef skiatest_Test_DEFINED 8 #ifndef skiatest_Test_DEFINED
9 #define skiatest_Test_DEFINED 9 #define skiatest_Test_DEFINED
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 class GpuTest : public Test{ 80 class GpuTest : public Test{
81 public: 81 public:
82 GpuTest() : Test() {} 82 GpuTest() : Test() {}
83 static GrContextFactory* GetGrContextFactory(); 83 static GrContextFactory* GetGrContextFactory();
84 static void DestroyContexts(); 84 static void DestroyContexts();
85 virtual bool isThreadsafe() const { return false; } 85 virtual bool isThreadsafe() const { return false; }
86 private: 86 private:
87 }; 87 };
88 88
89 typedef SkTRegistry<Test*, void*> TestRegistry; 89 typedef SkTRegistry<Test*(*)(void*)> TestRegistry;
90 } 90 }
91 91
92 #define REPORTER_ASSERT(r, cond) \ 92 #define REPORTER_ASSERT(r, cond) \
93 do { \ 93 do { \
94 if (!(cond)) { \ 94 if (!(cond)) { \
95 SkString desc; \ 95 SkString desc; \
96 desc.printf("%s:%d: %s", __FILE__, __LINE__, #cond); \ 96 desc.printf("%s:%d: %s", __FILE__, __LINE__, #cond); \
97 r->reportFailed(desc); \ 97 r->reportFailed(desc); \
98 } \ 98 } \
99 } while(0) 99 } while(0)
100 100
101 #define REPORTER_ASSERT_MESSAGE(r, cond, message) \ 101 #define REPORTER_ASSERT_MESSAGE(r, cond, message) \
102 do { \ 102 do { \
103 if (!(cond)) { \ 103 if (!(cond)) { \
104 SkString desc; \ 104 SkString desc; \
105 desc.printf("%s %s:%d: %s", message, __FILE__, __LINE__, #cond); \ 105 desc.printf("%s %s:%d: %s", message, __FILE__, __LINE__, #cond); \
106 r->reportFailed(desc); \ 106 r->reportFailed(desc); \
107 } \ 107 } \
108 } while(0) 108 } while(0)
109 109
110 110
111 #endif 111 #endif
OLDNEW
« no previous file with comments | « src/ports/SkImageDecoder_WIC.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698