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

Unified Diff: tests/Test.h

Issue 345753007: Preprend Test to test function name generated by DEF_TEST() macro. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: test_ Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/SkBase64Test.cpp ('k') | tests/UnitTestTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/Test.h
diff --git a/tests/Test.h b/tests/Test.h
index fc1890096e8cb6fca8955d7b8c289692d302700a..72b0bee1265b114fbab9492007998abb82935591 100644
--- a/tests/Test.h
+++ b/tests/Test.h
@@ -138,38 +138,38 @@ namespace skiatest {
(reporter)->reportFailed(desc); \
} while(0)
-#define DEF_TEST(name, reporter) \
- static void name(skiatest::Reporter*); \
- namespace skiatest { \
- class name##Class : public Test { \
- public: \
- static Test* Factory(void*) { return SkNEW(name##Class); } \
- protected: \
- virtual void onGetName(SkString* name) SK_OVERRIDE { \
- name->set(#name); \
- } \
- virtual void onRun(Reporter* r) SK_OVERRIDE { name(r); } \
- }; \
- static TestRegistry gReg_##name##Class(name##Class::Factory); \
- } \
- static void name(skiatest::Reporter* reporter)
-
-#define DEF_GPUTEST(name, reporter, factory) \
- static void name(skiatest::Reporter*, GrContextFactory*); \
- namespace skiatest { \
- class name##Class : public GpuTest { \
- public: \
- static Test* Factory(void*) { return SkNEW(name##Class); } \
- protected: \
- virtual void onGetName(SkString* name) SK_OVERRIDE { \
- name->set(#name); \
- } \
- virtual void onRun(Reporter* r) SK_OVERRIDE { \
- name(r, fGrContextFactory); \
- } \
- }; \
- static TestRegistry gReg_##name##Class(name##Class::Factory); \
- } \
- static void name(skiatest::Reporter* reporter, GrContextFactory* factory)
+#define DEF_TEST(name, reporter) \
+ static void test_##name(skiatest::Reporter*); \
+ namespace skiatest { \
+ class name##Class : public Test { \
+ public: \
+ static Test* Factory(void*) { return SkNEW(name##Class); } \
+ protected: \
+ virtual void onGetName(SkString* name) SK_OVERRIDE { \
+ name->set(#name); \
+ } \
+ virtual void onRun(Reporter* r) SK_OVERRIDE { test_##name(r); } \
+ }; \
+ static TestRegistry gReg_##name##Class(name##Class::Factory); \
+ } \
+ static void test_##name(skiatest::Reporter* reporter)
+
+#define DEF_GPUTEST(name, reporter, factory) \
+ static void test_##name(skiatest::Reporter*, GrContextFactory*); \
+ namespace skiatest { \
+ class name##Class : public GpuTest { \
+ public: \
+ static Test* Factory(void*) { return SkNEW(name##Class); } \
+ protected: \
+ virtual void onGetName(SkString* name) SK_OVERRIDE { \
+ name->set(#name); \
+ } \
+ virtual void onRun(Reporter* r) SK_OVERRIDE { \
+ test_##name(r, fGrContextFactory); \
+ } \
+ }; \
+ static TestRegistry gReg_##name##Class(name##Class::Factory); \
+ } \
+ static void test_##name(skiatest::Reporter* reporter, GrContextFactory* factory)
#endif
« no previous file with comments | « tests/SkBase64Test.cpp ('k') | tests/UnitTestTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698