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

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: 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
« src/core/SkPictureRecord.cpp ('K') | « 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..3116d844dfac07fd6f16338c39c8c7b96e00189f 100644
--- a/tests/Writer32Test.cpp
+++ b/tests/Writer32Test.cpp
@@ -102,8 +102,8 @@ 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);
+ uint32_t peek = writer->peek32(i * 4);
+ REPORTER_ASSERT(reporter, data[i] == peek);
}
char buffer[sizeof(data)];
« src/core/SkPictureRecord.cpp ('K') | « src/core/SkWriteBuffer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698