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)1).get());
81 REPORTER_ASSERT(reporter, TContainer((TCount)kStackPreallocCount).get());
82 REPORTER_ASSERT(reporter, TContainer((TCount)kStackPreallocCount + 1).get());
88 REPORTER_ASSERT(reporter, container.get());
91 REPORTER_ASSERT(reporter, container.get());
94 REPORTER_ASSERT(reporter, container.get());
97 REPORTER_ASSERT(reporter, !container.get());
100 DEF_TEST(TemplateContainerAPIs, reporter) {
101 test_container_apis<SkAutoTArray<int>, int>(reporter);
102 test_container_apis<SkAutoSTArray<kStackPreallocCount, int>, int>(reporter);
103 test_container_apis<SkAutoTMalloc<int>, size_t>(reporter);
104 test_container_apis<SkAutoSTMalloc<kStackPreallocCount, int>, size_t>(reporter);
108 template<typename TAutoMalloc> static void test_realloc_to_zero(skiatest::Reporter* reporter) {
110 REPORTER_ASSERT(reporter, autoMalloc.get());
113 REPORTER_ASSERT(reporter, !autoMalloc.get());
116 REPORTER_ASSERT(reporter, autoMalloc.get());
119 REPORTER_ASSERT(reporter, !autoMalloc.get());
122 REPORTER_ASSERT(reporter, autoMalloc.get());
125 DEF_TEST(AutoReallocToZero, reporter) {
126 test_realloc_to_zero<SkAutoTMalloc<int> >(reporter);
127 test_realloc_to_zero<SkAutoSTMalloc<kStackPreallocCount, int> >(reporter);