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

Unified Diff: tests/GrDrawTargetTest.cpp

Issue 66333002: Fix stale assert in GrDrawTarget::print (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month 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 | « src/gpu/GrDrawTarget.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GrDrawTargetTest.cpp
diff --git a/tests/GrDrawTargetTest.cpp b/tests/GrDrawTargetTest.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..a82524e88c40b7bc670e5a0fbde25c3d03ea428b
--- /dev/null
+++ b/tests/GrDrawTargetTest.cpp
@@ -0,0 +1,38 @@
+
+/*
+ * Copyright 2013 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#if SK_SUPPORT_GPU
+
+#include "GrContext.h"
+#include "GrContextFactory.h"
+#include "GrGpu.h"
+#include "GrDrawTargetCaps.h"
+#include "Test.h"
+
+static void test_print(skiatest::Reporter*, const GrDrawTargetCaps* caps) {
+ // This used to assert.
+ caps->print();
+}
+
+static void TestGrDrawTarget(skiatest::Reporter* reporter, GrContextFactory* factory) {
+ for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
+ GrContextFactory::GLContextType glType = static_cast<GrContextFactory::GLContextType>(type);
+
+ GrContext* grContext = factory->get(glType);
+ if (NULL == grContext) {
+ continue;
+ }
+
+ test_print(reporter, grContext->getGpu()->caps());
+ }
+}
+
+#include "TestClassDef.h"
+DEFINE_GPUTESTCLASS("GrDrawTarget", TestGrDrawTargetClass, TestGrDrawTarget)
+
+#endif
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698