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/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp
index fb177df..47a5f5a 100644
--- a/tests/ReadWriteAlphaTest.cpp
+++ b/tests/ReadWriteAlphaTest.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2012 Google Inc.
*
@@ -9,14 +8,15 @@
// This test is specific to the GPU backend.
#if SK_SUPPORT_GPU && !defined(SK_BUILD_FOR_ANDROID)
-#include "Test.h"
-#include "SkGpuDevice.h"
#include "GrContextFactory.h"
+#include "SkGpuDevice.h"
+#include "Test.h"
+#include "TestClassDef.h"
static const int X_SIZE = 12;
static const int Y_SIZE = 12;
-static void ReadWriteAlphaTest(skiatest::Reporter* reporter, GrContextFactory* factory) {
+DEF_GPUTEST(ReadWriteAlpha, reporter, factory) {
for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
GrContextFactory::GLContextType glType = static_cast<GrContextFactory::GLContextType>(type);
if (!GrContextFactory::IsRenderingGLContext(glType)) {
@@ -110,7 +110,4 @@
}
}
-#include "TestClassDef.h"
-DEFINE_GPUTESTCLASS("ReadWriteAlpha", ReadWriteAlphaTestClass, ReadWriteAlphaTest)
-
#endif