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

Unified Diff: tests/Writer32Test.cpp

Issue 51033004: add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 | « tests/ShaderImageFilterTest.cpp ('k') | tests/XfermodeTest.cpp » ('j') | 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 8b4aba5ec329f16dbdbf737a16ced22788725d4c..15218378ecd6e7996a2fac42a82f363fc89f00d9 100644
--- a/tests/Writer32Test.cpp
+++ b/tests/Writer32Test.cpp
@@ -86,7 +86,7 @@ static void test_ptr(skiatest::Reporter* reporter) {
writer.writePtr(p1);
writer.write8(0x66);
- size_t size = writer.size();
+ size_t size = writer.bytesWritten();
REPORTER_ASSERT(reporter, 2 * sizeof(void*) + 2 * sizeof(int32_t));
char buffer[32];
@@ -103,14 +103,14 @@ static void test_ptr(skiatest::Reporter* reporter) {
static void test1(skiatest::Reporter* reporter, SkWriter32* writer) {
const uint32_t data[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
for (size_t i = 0; i < SK_ARRAY_COUNT(data); ++i) {
- REPORTER_ASSERT(reporter, i*4 == writer->size());
+ REPORTER_ASSERT(reporter, i*4 == writer->bytesWritten());
writer->write32(data[i]);
uint32_t* addr = writer->peek32(i * 4);
REPORTER_ASSERT(reporter, data[i] == *addr);
}
char buffer[sizeof(data)];
- REPORTER_ASSERT(reporter, sizeof(buffer) == writer->size());
+ REPORTER_ASSERT(reporter, sizeof(buffer) == writer->bytesWritten());
writer->flatten(buffer);
REPORTER_ASSERT(reporter, !memcmp(data, buffer, sizeof(buffer)));
}
@@ -124,7 +124,7 @@ static void test2(skiatest::Reporter* reporter, SkWriter32* writer) {
len += SkWriter32::WriteStringSize(gStr, i);
writer->writeString(gStr, i);
}
- REPORTER_ASSERT(reporter, writer->size() == len);
+ REPORTER_ASSERT(reporter, writer->bytesWritten() == len);
SkAutoMalloc storage(len);
writer->flatten(storage.get());
@@ -167,7 +167,7 @@ static void testWritePad(skiatest::Reporter* reporter, SkWriter32* writer) {
}
}
- uint32_t totalBytes = writer->size();
+ uint32_t totalBytes = writer->bytesWritten();
SkAutoMalloc readStorage(totalBytes);
writer->flatten(readStorage.get());
« no previous file with comments | « tests/ShaderImageFilterTest.cpp ('k') | tests/XfermodeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698