Add a DEF_GPUTEST() macro.
This macro is similar to DEF_TEST() and simplifies the process of
setting up a GPU test.
BUG=skia:1952
TEST=tests
R=mtklein@google.com
Review URL: https://codereview.chromium.org/132293005
git-svn-id: http://skia.googlecode.com/svn/trunk@13033 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index 7e55cc7..10d56fe 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -21,6 +21,7 @@
#include "SkChecksum.h"
#include "SkRandom.h"
#include "Test.h"
+#include "TestClassDef.h"
void GrGLProgramDesc::setRandom(SkRandom* random,
const GrGpuGL* gpu,
@@ -226,7 +227,7 @@
return true;
}
-static void GLProgramsTest(skiatest::Reporter* reporter, GrContextFactory* factory) {
+DEF_GPUTEST(GLPrograms, reporter, factory) {
for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
GrContext* context = factory->get(static_cast<GrContextFactory::GLContextType>(type));
if (NULL != context) {
@@ -243,9 +244,6 @@
}
}
-#include "TestClassDef.h"
-DEFINE_GPUTESTCLASS("GLPrograms", GLProgramsTestClass, GLProgramsTest)
-
// This is evil evil evil. The linker may throw away whole translation units as dead code if it
// thinks none of the functions are called. It will do this even if there are static initializers
// in the unit that could pass pointers to functions from the unit out to other translation units!