Index: tests/TestClassDef.h |
diff --git a/tests/TestClassDef.h b/tests/TestClassDef.h |
index f874acc007f32638c58211245289d5314e1529d9..8351ba71ec03875f5cafdbf5bc05acce3b1aa4ea 100644 |
--- a/tests/TestClassDef.h |
+++ b/tests/TestClassDef.h |
@@ -11,9 +11,9 @@ |
e.g. |
#include "TestClassDef.h" |
- DEF_TEST(some_test_name, r) { |
+ DEF_TEST(TestName, reporter) { |
... |
- REPORTER_ASSERT(r, x == 15); |
+ REPORTER_ASSERT(reporter, x == 15); |
} |
*/ |
@@ -31,16 +31,18 @@ |
} \ |
static void name(skiatest::Reporter* reporter) |
-#define DEFINE_GPUTESTCLASS(uiname, classname, function) \ |
- namespace skiatest { \ |
- class classname : public GpuTest { \ |
- public: \ |
- static Test* Factory(void*) { return SkNEW(classname); } \ |
- protected: \ |
- virtual void onGetName(SkString* name) SK_OVERRIDE { name->set(uiname); } \ |
- virtual void onRun(Reporter* reporter) SK_OVERRIDE { \ |
- function(reporter, GetGrContextFactory()); \ |
- } \ |
- }; \ |
- static TestRegistry gReg_##classname(classname::Factory); \ |
- } |
+#define DEF_GPUTEST(name, reporter, factory) \ |
+ static void name(skiatest::Reporter* reporter, GrContextFactory* factory); \ |
+ 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* reporter) SK_OVERRIDE { \ |
+ name(reporter, GetGrContextFactory()); \ |
+ } \ |
+ }; \ |
+ static TestRegistry gReg_##name##Class(name##Class::Factory); \ |
+ } \ |
+ static void name(skiatest::Reporter* reporter, GrContextFactory* factory) |