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

Unified Diff: tests/Writer32Test.cpp

Issue 145053003: Have peek32 return uint32_t& to make it harder to look at more than 4 bytes. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: read write at 32 Created 6 years, 11 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/SkWriteBuffer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/Writer32Test.cpp
diff --git a/tests/Writer32Test.cpp b/tests/Writer32Test.cpp
index fa024baffdab345d5371a7794ad9046c904aedd2..2f8b5c6edff8048897c4a32e5332e998d7cfde71 100644
--- a/tests/Writer32Test.cpp
+++ b/tests/Writer32Test.cpp
@@ -102,8 +102,7 @@ static void test1(skiatest::Reporter* reporter, SkWriter32* writer) {
for (size_t i = 0; i < SK_ARRAY_COUNT(data); ++i) {
REPORTER_ASSERT(reporter, i*4 == writer->bytesWritten());
writer->write32(data[i]);
- uint32_t* addr = writer->peek32(i * 4);
- REPORTER_ASSERT(reporter, data[i] == *addr);
+ REPORTER_ASSERT(reporter, data[i] == writer->read32At(i*4));
}
char buffer[sizeof(data)];
« no previous file with comments | « src/core/SkWriteBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698