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

Unified Diff: tests/Writer32Test.cpp

Issue 19564007: Start from scratch on a faster SkFlatDictionary. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix windows build by making AllocScratch static Created 7 years, 5 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
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

Powered by Google App Engine
This is Rietveld 408576698