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

Unified Diff: tests/DataRefTest.cpp

Issue 1691383002: Make SkRWBuffer destruct safely (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months 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/core/SkRWBuffer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
+}
« no previous file with comments | « src/core/SkRWBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698