Lines Matching refs:reporter

12 static void test_automalloc_realloc(skiatest::Reporter* reporter) {
17 REPORTER_ASSERT(reporter, array[0] == 1);
23 REPORTER_ASSERT(reporter, array[0] == 1);
27 REPORTER_ASSERT(reporter, array[0] == 1);
31 REPORTER_ASSERT(reporter, array[0] == 1);
43 REPORTER_ASSERT(reporter, array[i] == 10 - i);
47 REPORTER_ASSERT(reporter, array[i] == 10 - i);
51 REPORTER_ASSERT(reporter, array[0] = 10);
59 REPORTER_ASSERT(reporter, array[0] == 1);
65 REPORTER_ASSERT(reporter, array[0] == 1);
67 REPORTER_ASSERT(reporter, array[0] == 1);
70 DEF_TEST(Templates, reporter) {
71 test_automalloc_realloc(reporter);
78 static void test_container_apis(skiatest::Reporter* reporter) {
79 REPORTER_ASSERT(reporter, !TContainer((TCount)0).get());
80 REPORTER_ASSERT(reporter, !TContainer((TCount)0).data());
81 REPORTER_ASSERT(reporter, TContainer((TCount)1).get());
82 REPORTER_ASSERT(reporter, TContainer((TCount)1).data());
83 REPORTER_ASSERT(reporter, TContainer((TCount)kStackPreallocCount).get());
84 REPORTER_ASSERT(reporter, TContainer((TCount)kStackPreallocCount).data());
85 REPORTER_ASSERT(reporter, TContainer((TCount)kStackPreallocCount + 1).get());
86 REPORTER_ASSERT(reporter, TContainer((TCount)kStackPreallocCount + 1).data());
92 REPORTER_ASSERT(reporter, container.get());
93 REPORTER_ASSERT(reporter, container.get() == container.data());
96 REPORTER_ASSERT(reporter, container.get());
97 REPORTER_ASSERT(reporter, container.get() == container.data());
100 REPORTER_ASSERT(reporter, container.get());
101 REPORTER_ASSERT(reporter, container.get() == container.data());
104 REPORTER_ASSERT(reporter, !container.get());
105 REPORTER_ASSERT(reporter, !container.data());
108 DEF_TEST(TemplateContainerAPIs, reporter) {
109 test_container_apis<SkAutoTArray<int>, int>(reporter);
110 test_container_apis<SkAutoSTArray<kStackPreallocCount, int>, int>(reporter);
111 test_container_apis<SkAutoTMalloc<int>, size_t>(reporter);
112 test_container_apis<SkAutoSTMalloc<kStackPreallocCount, int>, size_t>(reporter);
116 template<typename TAutoMalloc> static void test_realloc_to_zero(skiatest::Reporter* reporter) {
118 REPORTER_ASSERT(reporter, autoMalloc.get());
121 REPORTER_ASSERT(reporter, !autoMalloc.get());
124 REPORTER_ASSERT(reporter, autoMalloc.get());
127 REPORTER_ASSERT(reporter, !autoMalloc.get());
130 REPORTER_ASSERT(reporter, autoMalloc.get());
133 DEF_TEST(AutoReallocToZero, reporter) {
134 test_realloc_to_zero<SkAutoTMalloc<int> >(reporter);
135 test_realloc_to_zero<SkAutoSTMalloc<kStackPreallocCount, int> >(reporter);