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

Unified Diff: tests/TestClassDef.h

Issue 114563003: Get rid of DEFINE_TESTCLASS() macro. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: tileCount() Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/ImageFilterTest.cpp ('k') | tests/TileGridTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/TestClassDef.h
diff --git a/tests/TestClassDef.h b/tests/TestClassDef.h
index 89124c78faa8b8f063975f52e1b32fbc2cf91195..601603353c0021c1bca794499aab507fe82dcb4a 100644
--- a/tests/TestClassDef.h
+++ b/tests/TestClassDef.h
@@ -1,23 +1,23 @@
-
/*
* Copyright 2011 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
+
/* This file is meant to be included by .cpp files, so it can spew out a
customized class + global definition.
e.g.
#include "TestClassDef.h"
- DEFINE_TESTCLASS("MyTest", MyTestClass, MyTestFunction)
+ DEFINE_TESTCLASS_SHORT(MyTestFunction)
- where MyTestFunction is declared as
+ where MyTestFunction is declared as:
- void MyTestFunction(skiatest::Reporter*)
+ static void MyTestFunction(skiatest::Reporter* reporter) {
+ }
*/
-// FIXME: replace all three param callers with the short one param version
#define DEFINE_TESTCLASS_SHORT(function) \
namespace skiatest { \
class function##Class : public Test { \
@@ -30,18 +30,6 @@
static TestRegistry gReg_##function##Class(function##Class::Factory); \
}
-#define DEFINE_TESTCLASS(uiname, classname, function) \
- namespace skiatest { \
- class classname : public Test { \
- 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); } \
- }; \
- static TestRegistry gReg_##classname(classname::Factory); \
- }
-
#define DEFINE_GPUTESTCLASS(uiname, classname, function) \
namespace skiatest { \
class classname : public GpuTest { \
« no previous file with comments | « tests/ImageFilterTest.cpp ('k') | tests/TileGridTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698