Home
last modified time | relevance | path

Searched refs:reporter (Results 1 – 25 of 776) sorted by relevance

12345678910>>...32

/external/skia/tests/
DJSONTest.cpp17 DEF_TEST(JSON_Parse, reporter) { in DEF_TEST() argument
136 REPORTER_ASSERT(reporter, success == (tst.out != nullptr)); in DEF_TEST()
144 REPORTER_ASSERT(reporter, !strcmp(tst.out, static_cast<const char*>(data->data()))); in DEF_TEST()
150 static void check_primitive(skiatest::Reporter* reporter, const Value& v, T pv, in check_primitive() argument
153 REPORTER_ASSERT(reporter, v.is<VT>() == is_type); in check_primitive()
155 REPORTER_ASSERT(reporter, (cast_t != nullptr) == is_type); in check_primitive()
158 REPORTER_ASSERT(reporter, &v.as<VT>() == cast_t); in check_primitive()
159 REPORTER_ASSERT(reporter, *v.as<VT>() == pv); in check_primitive()
164 static void check_vector(skiatest::Reporter* reporter, const Value& v, size_t expected_size, in check_vector() argument
166 REPORTER_ASSERT(reporter, v.is<T>() == is_vector); in check_vector()
[all …]
DRoundRectTest.cpp13 static void test_tricky_radii(skiatest::Reporter* reporter) { in test_tricky_radii() argument
32 REPORTER_ASSERT(reporter, (double) rr.radii(SkRRect::kUpperRight_Corner).fY + in test_tricky_radii()
38 static void test_empty_crbug_458524(skiatest::Reporter* reporter) { in test_empty_crbug_458524() argument
48 REPORTER_ASSERT(reporter, SkRRect::kEmpty_Type == other.getType()); in test_empty_crbug_458524()
53 static void test_empty(skiatest::Reporter* reporter) { in test_empty() argument
73 REPORTER_ASSERT(reporter, !r.isEmpty()); in test_empty()
74 REPORTER_ASSERT(reporter, r.rect() == oooRects[i].makeSorted()); in test_empty()
77 REPORTER_ASSERT(reporter, !r.isEmpty()); in test_empty()
78 REPORTER_ASSERT(reporter, r.rect() == oooRects[i].makeSorted()); in test_empty()
81 REPORTER_ASSERT(reporter, !r.isEmpty()); in test_empty()
[all …]
DRefCntTest.cpp23 static void test_refCnt(skiatest::Reporter* reporter) { in test_refCnt() argument
32 REPORTER_ASSERT(reporter, ref->unique()); in test_refCnt()
53 static void test_weakRefCnt(skiatest::Reporter* reporter) { in test_weakRefCnt() argument
66 REPORTER_ASSERT(reporter, ref->unique()); in test_weakRefCnt()
67 SkDEBUGCODE(REPORTER_ASSERT(reporter, ref->getWeakCnt() == 1)); in test_weakRefCnt()
71 DEF_TEST(RefCnt, reporter) { in DEF_TEST() argument
72 test_refCnt(reporter); in DEF_TEST()
73 test_weakRefCnt(reporter); in DEF_TEST()
83 #define check(reporter, ref, unref, make, kill) \ argument
84 REPORTER_ASSERT(reporter, gRefCounter == ref); \
[all …]
DTArrayTest.cpp16 static void TestTSet_basic(skiatest::Reporter* reporter) { in TestTSet_basic() argument
20 REPORTER_ASSERT(reporter, a.empty()); in TestTSet_basic()
21 REPORTER_ASSERT(reporter, a.count() == 0); in TestTSet_basic()
25 REPORTER_ASSERT(reporter, !a.empty()); in TestTSet_basic()
26 REPORTER_ASSERT(reporter, a.count() == 1); in TestTSet_basic()
30 REPORTER_ASSERT(reporter, a.empty()); in TestTSet_basic()
31 REPORTER_ASSERT(reporter, a.count() == 0); in TestTSet_basic()
35 REPORTER_ASSERT(reporter, a.push_back() = 1); in TestTSet_basic()
37 REPORTER_ASSERT(reporter, !a.empty()); in TestTSet_basic()
38 REPORTER_ASSERT(reporter, a.count() == 1); in TestTSet_basic()
[all …]
DResourceCacheTest.cpp35 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheCache, reporter, ctxInfo) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() argument
79 REPORTER_ASSERT(reporter, curCacheSize <= maxCacheSize); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
120 DEF_GPUTEST_FOR_CONTEXTS(ResourceCacheStencilBuffers, &is_rendering_and_not_angle_es3, reporter,
130 REPORTER_ASSERT(reporter, smallRT0);
135 REPORTER_ASSERT(reporter, smallRT1);
137 REPORTER_ASSERT(reporter, get_SB(smallRT0.get()) == get_SB(smallRT1.get()));
143 REPORTER_ASSERT(reporter, smallRT2);
145 REPORTER_ASSERT(reporter, get_SB(smallRT0.get()) == get_SB(smallRT2.get()));
151 REPORTER_ASSERT(reporter, bigRT);
153 REPORTER_ASSERT(reporter, get_SB(smallRT0.get()) != get_SB(bigRT.get()));
[all …]
DDataRefTest.cpp27 static void test_is_equal(skiatest::Reporter* reporter, in test_is_equal() argument
29 REPORTER_ASSERT(reporter, a->count() == b->count()); in test_is_equal()
34 REPORTER_ASSERT(reporter, sizea == sizeb); in test_is_equal()
35 REPORTER_ASSERT(reporter, !memcmp(mema, memb, sizea)); in test_is_equal()
39 static void test_datatable_is_empty(skiatest::Reporter* reporter, SkDataTable* table) { in test_datatable_is_empty() argument
40 REPORTER_ASSERT(reporter, table->isEmpty()); in test_datatable_is_empty()
41 REPORTER_ASSERT(reporter, 0 == table->count()); in test_datatable_is_empty()
44 static void test_emptytable(skiatest::Reporter* reporter) { in test_emptytable() argument
50 test_datatable_is_empty(reporter, table0.get()); in test_emptytable()
51 test_datatable_is_empty(reporter, table1.get()); in test_emptytable()
[all …]
DDequeTest.cpp11 static void assert_count(skiatest::Reporter* reporter, const SkDeque& deq, int count) { in assert_count() argument
13 REPORTER_ASSERT(reporter, deq.empty()); in assert_count()
14 REPORTER_ASSERT(reporter, 0 == deq.count()); in assert_count()
15 REPORTER_ASSERT(reporter, sizeof(int) == deq.elemSize()); in assert_count()
16 REPORTER_ASSERT(reporter, nullptr == deq.front()); in assert_count()
17 REPORTER_ASSERT(reporter, nullptr == deq.back()); in assert_count()
19 REPORTER_ASSERT(reporter, !deq.empty()); in assert_count()
20 REPORTER_ASSERT(reporter, count == deq.count()); in assert_count()
21 REPORTER_ASSERT(reporter, sizeof(int) == deq.elemSize()); in assert_count()
22 REPORTER_ASSERT(reporter, deq.front()); in assert_count()
[all …]
DUtilsTest.cpp27 static void test_autounref(skiatest::Reporter* reporter) { in test_autounref() argument
29 REPORTER_ASSERT(reporter, obj.unique()); in test_autounref()
32 REPORTER_ASSERT(reporter, &obj == tmp.get()); in test_autounref()
33 REPORTER_ASSERT(reporter, obj.unique()); in test_autounref()
35 REPORTER_ASSERT(reporter, &obj == tmp.release()); in test_autounref()
36 REPORTER_ASSERT(reporter, obj.unique()); in test_autounref()
37 REPORTER_ASSERT(reporter, nullptr == tmp.release()); in test_autounref()
38 REPORTER_ASSERT(reporter, nullptr == tmp.get()); in test_autounref()
41 REPORTER_ASSERT(reporter, !obj.unique()); in test_autounref()
45 REPORTER_ASSERT(reporter, obj.unique()); in test_autounref()
[all …]
DGpuLayerCacheTest.cpp49 static void create_layers(skiatest::Reporter* reporter,
64 REPORTER_ASSERT(reporter, layer);
67 REPORTER_ASSERT(reporter, temp == layer);
69 REPORTER_ASSERT(reporter, TestingAccess::NumLayers(cache) == idOffset + i + 1);
71 REPORTER_ASSERT(reporter, picture.uniqueID() == layer->pictureID());
72 REPORTER_ASSERT(reporter, layer->start() == idOffset + i + 1);
73 REPORTER_ASSERT(reporter, layer->stop() == idOffset + i + 2);
74 REPORTER_ASSERT(reporter, !layer->texture());
75 REPORTER_ASSERT(reporter, !layer->paint());
76 REPORTER_ASSERT(reporter, !layer->isAtlased());
[all …]
DWriter32Test.cpp14 static void check_contents(skiatest::Reporter* reporter, const SkWriter32& writer, in check_contents() argument
17 REPORTER_ASSERT(reporter, writer.bytesWritten() == size); in check_contents()
19 REPORTER_ASSERT(reporter, !memcmp(storage.get(), expected, size)); in check_contents()
23 static void test_reserve(skiatest::Reporter* reporter) { in test_reserve() argument
31 static void test_string_null(skiatest::Reporter* reporter) { in test_string_null() argument
38 check_contents(reporter, writer, expected, sizeof(expected)); in test_string_null()
41 static void test_rewind(skiatest::Reporter* reporter) { in test_rewind() argument
45 REPORTER_ASSERT(reporter, 0 == writer.bytesWritten()); in test_rewind()
49 check_contents(reporter, writer, array, sizeof(array)); in test_rewind()
52 REPORTER_ASSERT(reporter, sizeof(array) - 4 == writer.bytesWritten()); in test_rewind()
[all …]
DMatrix44Test.cpp31 template <typename T> void assert16(skiatest::Reporter* reporter, const T data[], in assert16() argument
36 REPORTER_ASSERT(reporter, data[0] == m0); in assert16()
37 REPORTER_ASSERT(reporter, data[1] == m1); in assert16()
38 REPORTER_ASSERT(reporter, data[2] == m2); in assert16()
39 REPORTER_ASSERT(reporter, data[3] == m3); in assert16()
41 REPORTER_ASSERT(reporter, data[4] == m4); in assert16()
42 REPORTER_ASSERT(reporter, data[5] == m5); in assert16()
43 REPORTER_ASSERT(reporter, data[6] == m6); in assert16()
44 REPORTER_ASSERT(reporter, data[7] == m7); in assert16()
46 REPORTER_ASSERT(reporter, data[8] == m8); in assert16()
[all …]
DMatrixTest.cpp36 static bool are_equal(skiatest::Reporter* reporter, in are_equal() argument
52 REPORTER_ASSERT(reporter, aVal == bVal && aValI == bValI); in are_equal()
55 REPORTER_ASSERT(reporter, foundZeroSignDiff); in are_equal()
66 REPORTER_ASSERT(reporter, aVal == bVal && aValI == bValI); in are_equal()
69 REPORTER_ASSERT(reporter, foundNaN); in are_equal()
81 static void assert9(skiatest::Reporter* reporter, const SkMatrix& m, in assert9() argument
87 REPORTER_ASSERT(reporter, buffer[0] == a); in assert9()
88 REPORTER_ASSERT(reporter, buffer[1] == b); in assert9()
89 REPORTER_ASSERT(reporter, buffer[2] == c); in assert9()
90 REPORTER_ASSERT(reporter, buffer[3] == d); in assert9()
[all …]
/external/skqp/tests/
DJSONTest.cpp17 DEF_TEST(JSON_Parse, reporter) { in DEF_TEST() argument
136 REPORTER_ASSERT(reporter, success == (tst.out != nullptr)); in DEF_TEST()
144 REPORTER_ASSERT(reporter, !strcmp(tst.out, static_cast<const char*>(data->data()))); in DEF_TEST()
150 static void check_primitive(skiatest::Reporter* reporter, const Value& v, T pv, in check_primitive() argument
153 REPORTER_ASSERT(reporter, v.is<VT>() == is_type); in check_primitive()
155 REPORTER_ASSERT(reporter, (cast_t != nullptr) == is_type); in check_primitive()
158 REPORTER_ASSERT(reporter, &v.as<VT>() == cast_t); in check_primitive()
159 REPORTER_ASSERT(reporter, *v.as<VT>() == pv); in check_primitive()
164 static void check_vector(skiatest::Reporter* reporter, const Value& v, size_t expected_size, in check_vector() argument
166 REPORTER_ASSERT(reporter, v.is<T>() == is_vector); in check_vector()
[all …]
DRoundRectTest.cpp13 static void test_tricky_radii(skiatest::Reporter* reporter) { in test_tricky_radii() argument
32 REPORTER_ASSERT(reporter, (double) rr.radii(SkRRect::kUpperRight_Corner).fY + in test_tricky_radii()
38 static void test_empty_crbug_458524(skiatest::Reporter* reporter) { in test_empty_crbug_458524() argument
48 REPORTER_ASSERT(reporter, SkRRect::kEmpty_Type == other.getType()); in test_empty_crbug_458524()
53 static void test_empty(skiatest::Reporter* reporter) { in test_empty() argument
73 REPORTER_ASSERT(reporter, !r.isEmpty()); in test_empty()
74 REPORTER_ASSERT(reporter, r.rect() == oooRects[i].makeSorted()); in test_empty()
77 REPORTER_ASSERT(reporter, !r.isEmpty()); in test_empty()
78 REPORTER_ASSERT(reporter, r.rect() == oooRects[i].makeSorted()); in test_empty()
81 REPORTER_ASSERT(reporter, !r.isEmpty()); in test_empty()
[all …]
DRefCntTest.cpp23 static void test_refCnt(skiatest::Reporter* reporter) { in test_refCnt() argument
32 REPORTER_ASSERT(reporter, ref->unique()); in test_refCnt()
53 static void test_weakRefCnt(skiatest::Reporter* reporter) { in test_weakRefCnt() argument
66 REPORTER_ASSERT(reporter, ref->unique()); in test_weakRefCnt()
67 SkDEBUGCODE(REPORTER_ASSERT(reporter, ref->getWeakCnt() == 1)); in test_weakRefCnt()
71 DEF_TEST(RefCnt, reporter) { in DEF_TEST() argument
72 test_refCnt(reporter); in DEF_TEST()
73 test_weakRefCnt(reporter); in DEF_TEST()
83 #define check(reporter, ref, unref, make, kill) \ argument
84 REPORTER_ASSERT(reporter, gRefCounter == ref); \
[all …]
DTArrayTest.cpp16 static void TestTSet_basic(skiatest::Reporter* reporter) { in TestTSet_basic() argument
20 REPORTER_ASSERT(reporter, a.empty()); in TestTSet_basic()
21 REPORTER_ASSERT(reporter, a.count() == 0); in TestTSet_basic()
25 REPORTER_ASSERT(reporter, !a.empty()); in TestTSet_basic()
26 REPORTER_ASSERT(reporter, a.count() == 1); in TestTSet_basic()
30 REPORTER_ASSERT(reporter, a.empty()); in TestTSet_basic()
31 REPORTER_ASSERT(reporter, a.count() == 0); in TestTSet_basic()
35 REPORTER_ASSERT(reporter, a.push_back() = 1); in TestTSet_basic()
37 REPORTER_ASSERT(reporter, !a.empty()); in TestTSet_basic()
38 REPORTER_ASSERT(reporter, a.count() == 1); in TestTSet_basic()
[all …]
DResourceCacheTest.cpp35 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheCache, reporter, ctxInfo) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() argument
79 REPORTER_ASSERT(reporter, curCacheSize <= maxCacheSize); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
120 DEF_GPUTEST_FOR_CONTEXTS(ResourceCacheStencilBuffers, &is_rendering_and_not_angle_es3, reporter,
130 REPORTER_ASSERT(reporter, smallRT0);
135 REPORTER_ASSERT(reporter, smallRT1);
137 REPORTER_ASSERT(reporter, get_SB(smallRT0.get()) == get_SB(smallRT1.get()));
143 REPORTER_ASSERT(reporter, smallRT2);
145 REPORTER_ASSERT(reporter, get_SB(smallRT0.get()) == get_SB(smallRT2.get()));
151 REPORTER_ASSERT(reporter, bigRT);
153 REPORTER_ASSERT(reporter, get_SB(smallRT0.get()) != get_SB(bigRT.get()));
[all …]
DDataRefTest.cpp27 static void test_is_equal(skiatest::Reporter* reporter, in test_is_equal() argument
29 REPORTER_ASSERT(reporter, a->count() == b->count()); in test_is_equal()
34 REPORTER_ASSERT(reporter, sizea == sizeb); in test_is_equal()
35 REPORTER_ASSERT(reporter, !memcmp(mema, memb, sizea)); in test_is_equal()
39 static void test_datatable_is_empty(skiatest::Reporter* reporter, SkDataTable* table) { in test_datatable_is_empty() argument
40 REPORTER_ASSERT(reporter, table->isEmpty()); in test_datatable_is_empty()
41 REPORTER_ASSERT(reporter, 0 == table->count()); in test_datatable_is_empty()
44 static void test_emptytable(skiatest::Reporter* reporter) { in test_emptytable() argument
50 test_datatable_is_empty(reporter, table0.get()); in test_emptytable()
51 test_datatable_is_empty(reporter, table1.get()); in test_emptytable()
[all …]
DDequeTest.cpp11 static void assert_count(skiatest::Reporter* reporter, const SkDeque& deq, int count) { in assert_count() argument
13 REPORTER_ASSERT(reporter, deq.empty()); in assert_count()
14 REPORTER_ASSERT(reporter, 0 == deq.count()); in assert_count()
15 REPORTER_ASSERT(reporter, sizeof(int) == deq.elemSize()); in assert_count()
16 REPORTER_ASSERT(reporter, nullptr == deq.front()); in assert_count()
17 REPORTER_ASSERT(reporter, nullptr == deq.back()); in assert_count()
19 REPORTER_ASSERT(reporter, !deq.empty()); in assert_count()
20 REPORTER_ASSERT(reporter, count == deq.count()); in assert_count()
21 REPORTER_ASSERT(reporter, sizeof(int) == deq.elemSize()); in assert_count()
22 REPORTER_ASSERT(reporter, deq.front()); in assert_count()
[all …]
DUtilsTest.cpp27 static void test_autounref(skiatest::Reporter* reporter) { in test_autounref() argument
29 REPORTER_ASSERT(reporter, obj.unique()); in test_autounref()
32 REPORTER_ASSERT(reporter, &obj == tmp.get()); in test_autounref()
33 REPORTER_ASSERT(reporter, obj.unique()); in test_autounref()
35 REPORTER_ASSERT(reporter, &obj == tmp.release()); in test_autounref()
36 REPORTER_ASSERT(reporter, obj.unique()); in test_autounref()
37 REPORTER_ASSERT(reporter, nullptr == tmp.release()); in test_autounref()
38 REPORTER_ASSERT(reporter, nullptr == tmp.get()); in test_autounref()
41 REPORTER_ASSERT(reporter, !obj.unique()); in test_autounref()
45 REPORTER_ASSERT(reporter, obj.unique()); in test_autounref()
[all …]
DGpuLayerCacheTest.cpp49 static void create_layers(skiatest::Reporter* reporter,
64 REPORTER_ASSERT(reporter, layer);
67 REPORTER_ASSERT(reporter, temp == layer);
69 REPORTER_ASSERT(reporter, TestingAccess::NumLayers(cache) == idOffset + i + 1);
71 REPORTER_ASSERT(reporter, picture.uniqueID() == layer->pictureID());
72 REPORTER_ASSERT(reporter, layer->start() == idOffset + i + 1);
73 REPORTER_ASSERT(reporter, layer->stop() == idOffset + i + 2);
74 REPORTER_ASSERT(reporter, !layer->texture());
75 REPORTER_ASSERT(reporter, !layer->paint());
76 REPORTER_ASSERT(reporter, !layer->isAtlased());
[all …]
DWriter32Test.cpp14 static void check_contents(skiatest::Reporter* reporter, const SkWriter32& writer, in check_contents() argument
17 REPORTER_ASSERT(reporter, writer.bytesWritten() == size); in check_contents()
19 REPORTER_ASSERT(reporter, !memcmp(storage.get(), expected, size)); in check_contents()
23 static void test_reserve(skiatest::Reporter* reporter) { in test_reserve() argument
31 static void test_string_null(skiatest::Reporter* reporter) { in test_string_null() argument
38 check_contents(reporter, writer, expected, sizeof(expected)); in test_string_null()
41 static void test_rewind(skiatest::Reporter* reporter) { in test_rewind() argument
45 REPORTER_ASSERT(reporter, 0 == writer.bytesWritten()); in test_rewind()
49 check_contents(reporter, writer, array, sizeof(array)); in test_rewind()
52 REPORTER_ASSERT(reporter, sizeof(array) - 4 == writer.bytesWritten()); in test_rewind()
[all …]
DMatrix44Test.cpp31 template <typename T> void assert16(skiatest::Reporter* reporter, const T data[], in assert16() argument
36 REPORTER_ASSERT(reporter, data[0] == m0); in assert16()
37 REPORTER_ASSERT(reporter, data[1] == m1); in assert16()
38 REPORTER_ASSERT(reporter, data[2] == m2); in assert16()
39 REPORTER_ASSERT(reporter, data[3] == m3); in assert16()
41 REPORTER_ASSERT(reporter, data[4] == m4); in assert16()
42 REPORTER_ASSERT(reporter, data[5] == m5); in assert16()
43 REPORTER_ASSERT(reporter, data[6] == m6); in assert16()
44 REPORTER_ASSERT(reporter, data[7] == m7); in assert16()
46 REPORTER_ASSERT(reporter, data[8] == m8); in assert16()
[all …]
DMatrixTest.cpp36 static bool are_equal(skiatest::Reporter* reporter, in are_equal() argument
52 REPORTER_ASSERT(reporter, aVal == bVal && aValI == bValI); in are_equal()
55 REPORTER_ASSERT(reporter, foundZeroSignDiff); in are_equal()
66 REPORTER_ASSERT(reporter, aVal == bVal && aValI == bValI); in are_equal()
69 REPORTER_ASSERT(reporter, foundNaN); in are_equal()
81 static void assert9(skiatest::Reporter* reporter, const SkMatrix& m, in assert9() argument
87 REPORTER_ASSERT(reporter, buffer[0] == a); in assert9()
88 REPORTER_ASSERT(reporter, buffer[1] == b); in assert9()
89 REPORTER_ASSERT(reporter, buffer[2] == c); in assert9()
90 REPORTER_ASSERT(reporter, buffer[3] == d); in assert9()
[all …]
DMetaDataTest.cpp12 static void test_ptrs(skiatest::Reporter* reporter) { in test_ptrs() argument
14 REPORTER_ASSERT(reporter, ref.unique()); in test_ptrs()
21 REPORTER_ASSERT(reporter, md0.findRefCnt(name)); in test_ptrs()
22 REPORTER_ASSERT(reporter, md0.hasRefCnt(name, &ref)); in test_ptrs()
23 REPORTER_ASSERT(reporter, !ref.unique()); in test_ptrs()
26 REPORTER_ASSERT(reporter, md1.findRefCnt(name)); in test_ptrs()
27 REPORTER_ASSERT(reporter, md1.hasRefCnt(name, &ref)); in test_ptrs()
28 REPORTER_ASSERT(reporter, !ref.unique()); in test_ptrs()
30 REPORTER_ASSERT(reporter, md0.removeRefCnt(name)); in test_ptrs()
31 REPORTER_ASSERT(reporter, !md0.findRefCnt(name)); in test_ptrs()
[all …]

12345678910>>...32