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

Unified Diff: tests/SerializationTest.cpp

Issue 1920423002: Prototype code that turns any/every flattenable into JSON (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix copyright dates in new files Created 4 years, 7 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/PaintTest.cpp ('k') | tools/debugger/SkDrawCommand.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/SerializationTest.cpp
diff --git a/tests/SerializationTest.cpp b/tests/SerializationTest.cpp
index a8f253f0257eebe4c9cf0c025fddd177a67e4352..4750bbe25d436a13de76f62ede826487c719efb4 100644
--- a/tests/SerializationTest.cpp
+++ b/tests/SerializationTest.cpp
@@ -139,7 +139,7 @@ template<> struct SerializationTestUtils<SkString, true> {
template<typename T, bool testInvalid>
static void TestObjectSerializationNoAlign(T* testObj, skiatest::Reporter* reporter) {
- SkWriteBuffer writer;
+ SkBinaryWriteBuffer writer;
SerializationUtils<T>::Write(writer, testObj);
size_t bytesWritten = writer.bytesWritten();
REPORTER_ASSERT(reporter, SkAlign4(bytesWritten) == bytesWritten);
@@ -177,7 +177,7 @@ static void TestObjectSerialization(T* testObj, skiatest::Reporter* reporter) {
template<typename T>
static T* TestFlattenableSerialization(T* testObj, bool shouldSucceed,
skiatest::Reporter* reporter) {
- SkWriteBuffer writer;
+ SkBinaryWriteBuffer writer;
SerializationUtils<T>::Write(writer, testObj);
size_t bytesWritten = writer.bytesWritten();
REPORTER_ASSERT(reporter, SkAlign4(bytesWritten) == bytesWritten);
@@ -215,7 +215,7 @@ static T* TestFlattenableSerialization(T* testObj, bool shouldSucceed,
template<typename T>
static void TestArraySerialization(T* data, skiatest::Reporter* reporter) {
- SkWriteBuffer writer;
+ SkBinaryWriteBuffer writer;
SerializationUtils<T>::Write(writer, data, kArraySize);
size_t bytesWritten = writer.bytesWritten();
// This should write the length (in 4 bytes) and the array
@@ -533,7 +533,7 @@ DEF_TEST(Serialization, reporter) {
sk_sp<SkPicture> pict(recorder.finishRecordingAsPicture());
// Serialize picture
- SkWriteBuffer writer;
+ SkBinaryWriteBuffer writer;
pict->flatten(writer);
size_t size = writer.bytesWritten();
SkAutoTMalloc<unsigned char> data(size);
« no previous file with comments | « tests/PaintTest.cpp ('k') | tools/debugger/SkDrawCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698