aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/DataRefTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/DataRefTest.cpp')
-rw-r--r--tests/DataRefTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/DataRefTest.cpp b/tests/DataRefTest.cpp
index f1e645ec7e..a474019e92 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());
+}