Index: tests/DataRefTest.cpp |
diff --git a/tests/DataRefTest.cpp b/tests/DataRefTest.cpp |
index f1e645ec7e7cbac855b5bc9de44ca664384cdec4..a474019e925044246c754b7e5538a7d36cde190b 100644 |
--- a/tests/DataRefTest.cpp |
+++ b/tests/DataRefTest.cpp |
@@ -328,3 +328,10 @@ DEF_TEST(RWBuffer_size, r) { |
REPORTER_ASSERT(r, !iter.next()); |
REPORTER_ASSERT(r, 0 == iter.size()); |
} |
+ |
+// Tests that it is safe to destruct an SkRWBuffer without appending |
+// anything to it. |
+DEF_TEST(RWBuffer_noAppend, r) { |
+ SkRWBuffer buffer; |
+ REPORTER_ASSERT(r, 0 == buffer.size()); |
+} |