Avoid printing draw target info to stderr while running unit tests
Change draw target dump function to return a SkString. Clients can do
whatever they want with the string.
BUG=skia:1837
R=caryclark@google.com, bsalomon@google.com
Author: kkinnunen@nvidia.com
Review URL: https://codereview.chromium.org/72353003
git-svn-id: http://skia.googlecode.com/svn/trunk@12340 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/GrDrawTargetTest.cpp b/tests/GrDrawTargetTest.cpp
index a82524e..f2bcdc4 100644
--- a/tests/GrDrawTargetTest.cpp
+++ b/tests/GrDrawTargetTest.cpp
@@ -16,7 +16,8 @@
static void test_print(skiatest::Reporter*, const GrDrawTargetCaps* caps) {
// This used to assert.
- caps->print();
+ SkString result = caps->dump();
+ SkASSERT(!result.isEmpty());
}
static void TestGrDrawTarget(skiatest::Reporter* reporter, GrContextFactory* factory) {