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/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp
index 3fe071c..07bf0ce 100644
--- a/tests/GrSurfaceTest.cpp
+++ b/tests/GrSurfaceTest.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2013 Google Inc.
*
@@ -6,19 +5,17 @@
* found in the LICENSE file.
*/
-// This is a GPU-backend specific test.
-
-#include "SkTypes.h"
-
#if SK_SUPPORT_GPU
-#include "Test.h"
#include "GrContext.h"
#include "GrContextFactory.h"
#include "GrRenderTarget.h"
#include "GrTexture.h"
+#include "SkTypes.h"
+#include "Test.h"
+#include "TestClassDef.h"
-static void GrSurfaceIsSameTest(skiatest::Reporter* reporter, GrContextFactory* factory) {
+DEF_GPUTEST(GrSurfaceTest, reporter, factory) {
GrContext* context = factory->get(GrContextFactory::kNull_GLContextType);
if (NULL != context) {
GrTextureDesc desc;
@@ -62,7 +59,4 @@
}
}
-#include "TestClassDef.h"
-DEFINE_GPUTESTCLASS("GrSurfaceIsSame", GrSurfaceIsSameTestClass, GrSurfaceIsSameTest)
-
#endif