aboutsummaryrefslogtreecommitdiff
path: root/tests/GLProgramsTest.cpp
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-10 22:08:27 +0000
committertfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-10 22:08:27 +0000
commit4ee16bfaedb14aff8cf102f1f0722ff2529a9699 (patch)
tree292ed655c6d81fb7e6061467d23e27bd27986a34 /tests/GLProgramsTest.cpp
parentf3abaeb0c5947e63856209166761d4ea766ff24b (diff)
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
Diffstat (limited to 'tests/GLProgramsTest.cpp')
-rw-r--r--tests/GLProgramsTest.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index 7e55cc72e7..10d56fe127 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 @@ bool GrGpuGL::programUnitTest(int maxStages) {
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 @@ static void GLProgramsTest(skiatest::Reporter* reporter, GrContextFactory* facto
}
}
-#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!