Flutter Engine
The Flutter Engine
Static Public Member Functions | List of all members
SerializationTest Class Reference

Static Public Member Functions

template<typename T >
static void TestAlignment (T *testObj, skiatest::Reporter *reporter)
 

Detailed Description

Definition at line 75 of file SerializationTest.cpp.

Member Function Documentation

◆ TestAlignment()

template<typename T >
static void SerializationTest::TestAlignment ( T testObj,
skiatest::Reporter reporter 
)
inlinestatic

Definition at line 79 of file SerializationTest.cpp.

79 {
80 // Test memory read/write functions directly
81 unsigned char dataWritten[1024];
82 size_t bytesWrittenToMemory = testObj->writeToMemory(dataWritten);
83 REPORTER_ASSERT(reporter, SkAlign4(bytesWrittenToMemory) == bytesWrittenToMemory);
84 size_t bytesReadFromMemory = testObj->readFromMemory(dataWritten, bytesWrittenToMemory);
85 REPORTER_ASSERT(reporter, SkAlign4(bytesReadFromMemory) == bytesReadFromMemory);
86}
reporter
Definition: FontMgrTest.cpp:39
static constexpr T SkAlign4(T x)
Definition: SkAlign.h:16
#define REPORTER_ASSERT(r, cond,...)
Definition: Test.h:286

The documentation for this class was generated from the following file: