Lines Matching refs:reporter
11 static void assert_eof(skiatest::Reporter* reporter, const SkReader32& reader) { in assert_eof() argument
12 REPORTER_ASSERT(reporter, reader.eof()); in assert_eof()
13 REPORTER_ASSERT(reporter, reader.size() == reader.offset()); in assert_eof()
14 REPORTER_ASSERT(reporter, (const char*)reader.peek() == in assert_eof()
18 static void assert_start(skiatest::Reporter* reporter, const SkReader32& reader) { in assert_start() argument
19 REPORTER_ASSERT(reporter, 0 == reader.offset()); in assert_start()
20 REPORTER_ASSERT(reporter, reader.size() == reader.available()); in assert_start()
21 REPORTER_ASSERT(reporter, reader.isAvailable(reader.size())); in assert_start()
22 REPORTER_ASSERT(reporter, !reader.isAvailable(reader.size() + 1)); in assert_start()
23 REPORTER_ASSERT(reporter, reader.peek() == reader.base()); in assert_start()
26 static void assert_empty(skiatest::Reporter* reporter, const SkReader32& reader) { in assert_empty() argument
27 REPORTER_ASSERT(reporter, 0 == reader.size()); in assert_empty()
28 REPORTER_ASSERT(reporter, 0 == reader.offset()); in assert_empty()
29 REPORTER_ASSERT(reporter, 0 == reader.available()); in assert_empty()
30 REPORTER_ASSERT(reporter, !reader.isAvailable(1)); in assert_empty()
31 assert_eof(reporter, reader); in assert_empty()
32 assert_start(reporter, reader); in assert_empty()
35 DEF_TEST(Reader32, reporter) { in DEF_TEST() argument
37 assert_empty(reporter, reader); in DEF_TEST()
38 REPORTER_ASSERT(reporter, nullptr == reader.base()); in DEF_TEST()
39 REPORTER_ASSERT(reporter, nullptr == reader.peek()); in DEF_TEST()
51 REPORTER_ASSERT(reporter, sizeof(data) == reader.size()); in DEF_TEST()
52 REPORTER_ASSERT(reporter, i*4 == reader.offset()); in DEF_TEST()
53 REPORTER_ASSERT(reporter, (const void*)data == reader.base()); in DEF_TEST()
54 REPORTER_ASSERT(reporter, (const void*)&data[i] == reader.peek()); in DEF_TEST()
55 REPORTER_ASSERT(reporter, data[i] == reader.readInt()); in DEF_TEST()
57 assert_eof(reporter, reader); in DEF_TEST()
59 assert_start(reporter, reader); in DEF_TEST()
61 REPORTER_ASSERT(reporter, !memcmp(data, buffer, sizeof(data))); in DEF_TEST()
65 REPORTER_ASSERT(reporter, sizeof(data2) == reader.size()); in DEF_TEST()
66 REPORTER_ASSERT(reporter, i*4 == reader.offset()); in DEF_TEST()
67 REPORTER_ASSERT(reporter, (const void*)data2 == reader.base()); in DEF_TEST()
68 REPORTER_ASSERT(reporter, (const void*)&data2[i] == reader.peek()); in DEF_TEST()
69 REPORTER_ASSERT(reporter, data2[i] == reader.readScalar()); in DEF_TEST()
71 assert_eof(reporter, reader); in DEF_TEST()
73 assert_start(reporter, reader); in DEF_TEST()
75 REPORTER_ASSERT(reporter, !memcmp(data2, buffer, sizeof(data2))); in DEF_TEST()
78 assert_empty(reporter, reader); in DEF_TEST()
79 REPORTER_ASSERT(reporter, nullptr == reader.base()); in DEF_TEST()
80 REPORTER_ASSERT(reporter, nullptr == reader.peek()); in DEF_TEST()