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

Unified Diff: tests/TestClassDef.h

Issue 138563004: Move macros from TestClassDef.h to Test.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: upload Created 6 years, 11 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/Test.h ('k') | tests/TestSize.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
deleted file mode 100644
index 8351ba71ec03875f5cafdbf5bc05acce3b1aa4ea..0000000000000000000000000000000000000000
--- a/tests/TestClassDef.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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"
-
- DEF_TEST(TestName, reporter) {
- ...
- REPORTER_ASSERT(reporter, x == 15);
- }
-*/
-
-#define DEF_TEST(name, reporter) \
- static void name(skiatest::Reporter* 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* reporter) SK_OVERRIDE { name(reporter); } \
- }; \
- 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* 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)
« no previous file with comments | « tests/Test.h ('k') | tests/TestSize.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698