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

Unified Diff: tests/ResourceCacheTest.cpp

Issue 132293005: Add a DEF_GPUTEST() macro. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fatory -> factory 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/ReadWriteAlphaTest.cpp ('k') | tests/SurfaceTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ResourceCacheTest.cpp
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index 1bb6766b2c1f160a245cd9b3baa3a5e3166e816e..6707ebf312a0b7f71ea84fa9f0ab2220d3398e16 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -5,12 +5,12 @@
* found in the LICENSE file.
*/
-#include "Test.h"
-
-// This is a GPU test
#if SK_SUPPORT_GPU
+
#include "GrContextFactory.h"
#include "SkGpuDevice.h"
+#include "Test.h"
+#include "TestClassDef.h"
static const int gWidth = 640;
static const int gHeight = 480;
@@ -58,8 +58,7 @@ static void test_cache(skiatest::Reporter* reporter,
context->setTextureCacheLimits(oldMaxNum, oldMaxBytes);
}
-////////////////////////////////////////////////////////////////////////////////
-static void TestResourceCache(skiatest::Reporter* reporter, GrContextFactory* factory) {
+DEF_GPUTEST(ResourceCache, reporter, factory) {
for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
GrContextFactory::GLContextType glType = static_cast<GrContextFactory::GLContextType>(type);
if (!GrContextFactory::IsRenderingGLContext(glType)) {
@@ -84,8 +83,4 @@ static void TestResourceCache(skiatest::Reporter* reporter, GrContextFactory* fa
}
}
-////////////////////////////////////////////////////////////////////////////////
-#include "TestClassDef.h"
-DEFINE_GPUTESTCLASS("ResourceCache", ResourceCacheTestClass, TestResourceCache)
-
#endif
« no previous file with comments | « tests/ReadWriteAlphaTest.cpp ('k') | tests/SurfaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698