aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SkSLErrorTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/SkSLErrorTest.cpp')
-rw-r--r--tests/SkSLErrorTest.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/SkSLErrorTest.cpp b/tests/SkSLErrorTest.cpp
index c9e342c6d5..e9e05c18d2 100644
--- a/tests/SkSLErrorTest.cpp
+++ b/tests/SkSLErrorTest.cpp
@@ -9,25 +9,24 @@
#include "Test.h"
-#if SK_SUPPORT_GPU
+#if SKIA_SUPPORT_GPU
static void test_failure(skiatest::Reporter* r, const char* src, const char* error) {
SkSL::Compiler compiler;
- SkDynamicMemoryWStream out;
- bool result = compiler.toSPIRV(SkSL::Program::kFragment_Kind, SkString(src), out);
- SkString skError(error);
- if (compiler.errorText() != skError) {
+ std::stringstream out;
+ bool result = compiler.toSPIRV(SkSL::Program::kFragment_Kind, src, out);
+ if (compiler.errorText() != error) {
SkDebugf("SKSL ERROR:\n source: %s\n expected: %s received: %s", src, error,
compiler.errorText().c_str());
}
REPORTER_ASSERT(r, !result);
- REPORTER_ASSERT(r, compiler.errorText() == skError);
+ REPORTER_ASSERT(r, compiler.errorText() == error);
}
static void test_success(skiatest::Reporter* r, const char* src) {
SkSL::Compiler compiler;
- SkDynamicMemoryWStream out;
- bool result = compiler.toSPIRV(SkSL::Program::kFragment_Kind, SkString(src), out);
+ std::stringstream out;
+ bool result = compiler.toSPIRV(SkSL::Program::kFragment_Kind, src, out);
REPORTER_ASSERT(r, result);
}