Index: tests/Writer32Test.cpp |
diff --git a/tests/Writer32Test.cpp b/tests/Writer32Test.cpp |
index 498be9cb81a4d32601d99bc8b2084e946b0d1b30..e5b93634ac743447b22fdb7f155573809d5a49d6 100644 |
--- a/tests/Writer32Test.cpp |
+++ b/tests/Writer32Test.cpp |
@@ -187,18 +187,23 @@ static void Tests(skiatest::Reporter* reporter) { |
SkWriter32 writer(0); |
uint32_t storage[256]; |
writer.reset(storage, sizeof(storage)); |
+ // These three writes are small enough to fit in storage. |
test1(reporter, &writer); |
+ REPORTER_ASSERT(reporter, writer.wroteOnlyToStorage()); |
writer.reset(storage, sizeof(storage)); |
test2(reporter, &writer); |
+ REPORTER_ASSERT(reporter, writer.wroteOnlyToStorage()); |
writer.reset(storage, sizeof(storage)); |
testWritePad(reporter, &writer); |
+ REPORTER_ASSERT(reporter, writer.wroteOnlyToStorage()); |
- // try overflowing the storage-block |
+ // Try overflowing the storage-block. |
uint32_t smallStorage[8]; |
writer.reset(smallStorage, sizeof(smallStorage)); |
test2(reporter, &writer); |
+ REPORTER_ASSERT(reporter, !writer.wroteOnlyToStorage()); |
} |
// small storage |