/external/skia/tests/ |
H A D | TestTest.cpp | 17 DEF_TEST(TestNormal, reporter) { 18 REPORTER_ASSERT(reporter, reporter); 23 DEF_GPUTEST(TestGpuFactory, reporter, factory) { 24 REPORTER_ASSERT(reporter, reporter); 25 REPORTER_ASSERT(reporter, factory); 32 DEF_GPUTEST_FOR_ALL_CONTEXTS(TestGpuAllContexts, reporter, context) { 33 REPORTER_ASSERT(reporter, reporter); [all...] |
H A D | RuntimeConfigTest.cpp | 15 DEF_TEST(RuntimeConfig, reporter) { 16 REPORTER_ASSERT(reporter, 1 == c_RTConfTestVariable); 20 REPORTER_ASSERT(reporter, 2 == c_RTConfTestVariable); 23 REPORTER_ASSERT(reporter, 1 == c_RTConfTestVariable);
|
H A D | TracingTest.cpp | 11 DEF_TEST(Tracing, reporter) {
|
H A D | BitSetTest.cpp | 11 DEF_TEST(BitSet, reporter) { 13 REPORTER_ASSERT(reporter, set0.isBitSet(0) == false); 14 REPORTER_ASSERT(reporter, set0.isBitSet(32767) == false); 15 REPORTER_ASSERT(reporter, set0.isBitSet(65535) == false); 18 REPORTER_ASSERT(reporter, set0 == set1); 21 REPORTER_ASSERT(reporter, set0.isBitSet(22) == true); 23 REPORTER_ASSERT(reporter, set0.isBitSet(24) == true); 25 REPORTER_ASSERT(reporter, set0.isBitSet(35) == true); 27 REPORTER_ASSERT(reporter, set0.isBitSet(22) == false); 28 REPORTER_ASSERT(reporter, set [all...] |
H A D | DequeTest.cpp | 11 static void assert_count(skiatest::Reporter* reporter, const SkDeque& deq, int count) { argument 13 REPORTER_ASSERT(reporter, deq.empty()); 14 REPORTER_ASSERT(reporter, 0 == deq.count()); 15 REPORTER_ASSERT(reporter, sizeof(int) == deq.elemSize()); 16 REPORTER_ASSERT(reporter, nullptr == deq.front()); 17 REPORTER_ASSERT(reporter, nullptr == deq.back()); 19 REPORTER_ASSERT(reporter, !deq.empty()); 20 REPORTER_ASSERT(reporter, count == deq.count()); 21 REPORTER_ASSERT(reporter, sizeof(int) == deq.elemSize()); 22 REPORTER_ASSERT(reporter, de 32 assert_iter(skiatest::Reporter* reporter, const SkDeque& deq, int max, int min) argument 83 assert_blocks(skiatest::Reporter* reporter, const SkDeque& deq, int allocCount) argument 100 TestSub(skiatest::Reporter* reporter, int allocCount) argument [all...] |
H A D | RefDictTest.cpp | 18 DEF_TEST(RefDict, reporter) { 22 REPORTER_ASSERT(reporter, nullptr == dict.find(nullptr)); 23 REPORTER_ASSERT(reporter, nullptr == dict.find("foo")); 24 REPORTER_ASSERT(reporter, nullptr == dict.find("bar")); 27 REPORTER_ASSERT(reporter, &data0 == dict.find("foo")); 28 REPORTER_ASSERT(reporter, !data0.unique()); 31 REPORTER_ASSERT(reporter, &data0 == dict.find("foo")); 32 REPORTER_ASSERT(reporter, !data0.unique()); 35 REPORTER_ASSERT(reporter, &data1 == dict.find("foo")); 36 REPORTER_ASSERT(reporter, data [all...] |
H A D | DiscardableMemoryPoolTest.cpp | 11 DEF_TEST(DiscardableMemoryPool, reporter) { 15 REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed()); 18 REPORTER_ASSERT(reporter, dm1->data() != nullptr); 19 REPORTER_ASSERT(reporter, 100 == pool->getRAMUsed()); 21 REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed()); 22 REPORTER_ASSERT(reporter, !dm1->lock()); 26 REPORTER_ASSERT(reporter, 200 == pool->getRAMUsed()); 29 REPORTER_ASSERT(reporter, 200 == pool->getRAMUsed()); 30 REPORTER_ASSERT(reporter, dm2->lock()); 33 REPORTER_ASSERT(reporter, !dm [all...] |
H A D | MetaDataTest.cpp | 12 static void test_ptrs(skiatest::Reporter* reporter) { argument 14 REPORTER_ASSERT(reporter, ref.unique()); 21 REPORTER_ASSERT(reporter, md0.findRefCnt(name)); 22 REPORTER_ASSERT(reporter, md0.hasRefCnt(name, &ref)); 23 REPORTER_ASSERT(reporter, !ref.unique()); 26 REPORTER_ASSERT(reporter, md1.findRefCnt(name)); 27 REPORTER_ASSERT(reporter, md1.hasRefCnt(name, &ref)); 28 REPORTER_ASSERT(reporter, !ref.unique()); 30 REPORTER_ASSERT(reporter, md0.removeRefCnt(name)); 31 REPORTER_ASSERT(reporter, !md [all...] |
H A D | SizeTest.cpp | 12 DEF_TEST(ISize, reporter) { 16 REPORTER_ASSERT(reporter, a.isEmpty()); 18 REPORTER_ASSERT(reporter, a.isEmpty()); 20 REPORTER_ASSERT(reporter, a.isEmpty()); 22 REPORTER_ASSERT(reporter, a == b); 25 REPORTER_ASSERT(reporter, !a.isEmpty()); 27 REPORTER_ASSERT(reporter, !b.isEmpty()); 28 REPORTER_ASSERT(reporter, a == b); 29 REPORTER_ASSERT(reporter, !(a != b)); 30 REPORTER_ASSERT(reporter, [all...] |
H A D | Reader32Test.cpp | 11 static void assert_eof(skiatest::Reporter* reporter, const SkReader32& reader) { argument 12 REPORTER_ASSERT(reporter, reader.eof()); 13 REPORTER_ASSERT(reporter, reader.size() == reader.offset()); 14 REPORTER_ASSERT(reporter, (const char*)reader.peek() == 18 static void assert_start(skiatest::Reporter* reporter, const SkReader32& reader) { argument 19 REPORTER_ASSERT(reporter, 0 == reader.offset()); 20 REPORTER_ASSERT(reporter, reader.size() == reader.available()); 21 REPORTER_ASSERT(reporter, reader.isAvailable(reader.size())); 22 REPORTER_ASSERT(reporter, !reader.isAvailable(reader.size() + 1)); 23 REPORTER_ASSERT(reporter, reade 26 assert_empty(skiatest::Reporter* reporter, const SkReader32& reader) argument [all...] |
H A D | GpuRectanizerTest.cpp | 21 static void test_rectanizer_basic(skiatest::Reporter* reporter, GrRectanizer* rectanizer) { argument 22 REPORTER_ASSERT(reporter, kWidth == rectanizer->width()); 23 REPORTER_ASSERT(reporter, kHeight == rectanizer->height()); 27 REPORTER_ASSERT(reporter, rectanizer->addRect(50, 50, &loc)); 28 REPORTER_ASSERT(reporter, rectanizer->percentFull() > 0.0f); 30 REPORTER_ASSERT(reporter, rectanizer->percentFull() == 0.0f); 47 static void test_skyline(skiatest::Reporter* reporter, const SkTDArray<SkISize>& rects) { argument 50 test_rectanizer_basic(reporter, &skylineRectanizer); 51 test_rectanizer_inserts(reporter, &skylineRectanizer, rects); 54 static void test_pow2(skiatest::Reporter* reporter, cons argument [all...] |
H A D | UtilsTest.cpp | 28 static void test_autounref(skiatest::Reporter* reporter) { argument 30 REPORTER_ASSERT(reporter, obj.unique()); 33 REPORTER_ASSERT(reporter, &obj == tmp.get()); 34 REPORTER_ASSERT(reporter, obj.unique()); 36 REPORTER_ASSERT(reporter, &obj == tmp.detach()); 37 REPORTER_ASSERT(reporter, obj.unique()); 38 REPORTER_ASSERT(reporter, nullptr == tmp.detach()); 39 REPORTER_ASSERT(reporter, nullptr == tmp.get()); 42 REPORTER_ASSERT(reporter, !obj.unique()); 46 REPORTER_ASSERT(reporter, ob 49 test_autostarray(skiatest::Reporter* reporter) argument 122 test_search(skiatest::Reporter* reporter) argument 167 test_utf16(skiatest::Reporter* reporter) argument [all...] |
H A D | FrontBufferedStreamTest.cpp | 16 static void test_read(skiatest::Reporter* reporter, SkStream* bufferedStream, argument 22 REPORTER_ASSERT(reporter, bytesRead == bytesToRead || bufferedStream->isAtEnd()); 23 REPORTER_ASSERT(reporter, memcmp(storage.get(), expectations, bytesRead) == 0); 26 static void test_rewind(skiatest::Reporter* reporter, argument 29 REPORTER_ASSERT(reporter, success == shouldSucceed); 36 static void test_hasLength(skiatest::Reporter* reporter, argument 40 REPORTER_ASSERT(reporter, bufferedStream.hasLength()); 42 REPORTER_ASSERT(reporter, !bufferedStream.hasLength()); 53 static void test_incremental_buffering(skiatest::Reporter* reporter, size_t bufferSize) { argument 60 test_hasLength(reporter, *bufferedStrea 84 test_perfectly_sized_buffer(skiatest::Reporter* reporter, size_t bufferSize) argument 103 test_skipping(skiatest::Reporter* reporter, size_t bufferSize) argument 153 test_read_beyond_buffer(skiatest::Reporter* reporter, size_t bufferSize) argument 201 test_length_combos(skiatest::Reporter* reporter, size_t bufferSize) argument 213 test_initial_offset(skiatest::Reporter* reporter, size_t bufferSize) argument 243 test_buffers(skiatest::Reporter* reporter, size_t bufferSize) argument [all...] |
H A D | XfermodeTest.cpp | 14 static void test_asMode(skiatest::Reporter* reporter) { argument 19 REPORTER_ASSERT(reporter, reportedMode != mode); 22 REPORTER_ASSERT(reporter, SkXfermode::AsMode(xfer, &reportedMode)); 23 REPORTER_ASSERT(reporter, reportedMode == mode); 28 REPORTER_ASSERT(reporter, xfer->asMode(&reportedMode)); 29 REPORTER_ASSERT(reporter, reportedMode == mode); 32 REPORTER_ASSERT(reporter, SkXfermode::kSrcOver_Mode == mode); 37 static void test_IsMode(skiatest::Reporter* reporter) { argument 38 REPORTER_ASSERT(reporter, SkXfermode::IsMode(nullptr, 45 REPORTER_ASSERT(reporter, SkXfermod [all...] |
H A D | TestConfigParsing.cpp | 29 DEF_TEST(ParseConfigs_Gpu, reporter) { 36 REPORTER_ASSERT(reporter, configs.count() == 1); 37 REPORTER_ASSERT(reporter, configs[0]->getTag().equals("gpu")); 38 REPORTER_ASSERT(reporter, configs[0]->getViaParts().count() == 0); 40 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()); 41 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getContextType() 43 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseNVPR() == false); 44 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getUseDIText() == false); 45 REPORTER_ASSERT(reporter, configs[0]->asConfigGpu()->getSamples() == 0); 49 DEF_TEST(ParseConfigs_OutParam, reporter) { [all...] |
H A D | DrawFilterTest.cpp | 29 static void test_saverestore(skiatest::Reporter* reporter) { argument 35 REPORTER_ASSERT(reporter, nullptr == canvas->getDrawFilter()); 39 REPORTER_ASSERT(reporter, nullptr != canvas->getDrawFilter()); 42 REPORTER_ASSERT(reporter, nullptr == canvas->getDrawFilter()); 45 DEF_TEST(DrawFilter, reporter) { 46 test_saverestore(reporter);
|
H A D | DataRefTest.cpp | 16 static void test_is_equal(skiatest::Reporter* reporter, argument 18 REPORTER_ASSERT(reporter, a->count() == b->count()); 23 REPORTER_ASSERT(reporter, sizea == sizeb); 24 REPORTER_ASSERT(reporter, !memcmp(mema, memb, sizea)); 28 static void test_datatable_is_empty(skiatest::Reporter* reporter, argument 30 REPORTER_ASSERT(reporter, table->isEmpty()); 31 REPORTER_ASSERT(reporter, 0 == table->count()); 34 static void test_emptytable(skiatest::Reporter* reporter) { argument 41 test_datatable_is_empty(reporter, table0); 42 test_datatable_is_empty(reporter, table 51 test_simpletable(skiatest::Reporter* reporter) argument 66 test_vartable(skiatest::Reporter* reporter) argument 92 test_tablebuilder(skiatest::Reporter* reporter) argument 118 test_globaltable(skiatest::Reporter* reporter) argument 152 assert_len(skiatest::Reporter* reporter, SkData* ref, size_t len) argument 156 assert_data(skiatest::Reporter* reporter, SkData* ref, const void* data, size_t len) argument 162 test_cstring(skiatest::Reporter* reporter) argument 176 test_files(skiatest::Reporter* reporter) argument 241 check_abcs(skiatest::Reporter* reporter, const char buffer[], size_t size) argument 249 check_alphabet_stream(skiatest::Reporter* reporter, SkStream* stream) argument 271 check_alphabet_buffer(skiatest::Reporter* reporter, const SkROBuffer* reader) argument [all...] |
H A D | PathOpsDPointTest.cpp | 23 DEF_TEST(PathOpsDPoint, reporter) { 28 REPORTER_ASSERT(reporter, p == pt); 29 REPORTER_ASSERT(reporter, !(pt != pt)); 32 REPORTER_ASSERT(reporter, p == pt); 34 REPORTER_ASSERT(reporter, p == pt); 35 REPORTER_ASSERT(reporter, p.approximatelyEqual(pt)); 38 REPORTER_ASSERT(reporter, p == pt); 39 REPORTER_ASSERT(reporter, p.approximatelyEqual(sPt)); 40 REPORTER_ASSERT(reporter, p.roughlyEqual(pt)); 42 REPORTER_ASSERT(reporter, [all...] |
H A D | SmallAllocatorTest.cpp | 30 template<uint32_t kMaxObjects, size_t kBytes> void test_allocator(skiatest::Reporter* reporter) { argument 35 REPORTER_ASSERT(reporter, c != nullptr); 36 REPORTER_ASSERT(reporter, CountingClass::GetCount() == static_cast<int>(i+1)); 39 REPORTER_ASSERT(reporter, CountingClass::GetCount() == 0); 44 DEF_TEST(SmallAllocator_destructor, reporter) { 48 test_allocator<5, 20>(reporter); 49 test_allocator<10, 40>(reporter); 50 test_allocator<20, 80>(reporter); 55 test_allocator<50, 20>(reporter); 56 test_allocator<100, 20>(reporter); [all...] |
H A D | TemplatesTest.cpp | 12 static void test_automalloc_realloc(skiatest::Reporter* reporter) { argument 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, arra [all...] |
H A D | PointTest.cpp | 14 static void test_casts(skiatest::Reporter* reporter) { argument 21 REPORTER_ASSERT(reporter, p.asScalars() == pPtr); 22 REPORTER_ASSERT(reporter, r.asScalars() == rPtr); 26 static void test_Normalize(skiatest::Reporter* reporter, argument 33 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(returned, oldLength)); 34 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(newLength, SK_Scalar1)); 39 static void test_length(skiatest::Reporter* reporter, SkScalar x, SkScalar y, argument 47 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(s1, s2)); 48 REPORTER_ASSERT(reporter, SkScalarNearlyEqual(s1, expectedLength)); 50 test_Normalize(reporter, 60 get_value(skiatest::Reporter* reporter, T value) argument 71 force_as_float(skiatest::Reporter* reporter, float value) argument 86 test_overflow(skiatest::Reporter* reporter) argument 109 test_underflow(skiatest::Reporter* reporter) argument [all...] |
H A D | Writer32Test.cpp | 13 static void check_contents(skiatest::Reporter* reporter, const SkWriter32& writer, argument 16 REPORTER_ASSERT(reporter, writer.bytesWritten() == size); 18 REPORTER_ASSERT(reporter, !memcmp(storage.get(), expected, size)); 22 static void test_reserve(skiatest::Reporter* reporter) { argument 30 static void test_string_null(skiatest::Reporter* reporter) { argument 37 check_contents(reporter, writer, expected, sizeof(expected)); 40 static void test_rewind(skiatest::Reporter* reporter) { argument 44 REPORTER_ASSERT(reporter, 0 == writer.bytesWritten()); 48 check_contents(reporter, writer, array, sizeof(array)); 51 REPORTER_ASSERT(reporter, sizeo 72 test_ptr(skiatest::Reporter* reporter) argument 100 test1(skiatest::Reporter* reporter, SkWriter32* writer) argument 114 test2(skiatest::Reporter* reporter, SkWriter32* writer) argument 145 testWritePad(skiatest::Reporter* reporter, SkWriter32* writer) argument 184 testOverwriteT(skiatest::Reporter* reporter, SkWriter32* writer) argument [all...] |
H A D | GrTRecorderTest.cpp | 30 static void test_empty_back_and_pop(skiatest::Reporter* reporter) { argument 39 REPORTER_ASSERT(reporter, recorder.empty()); 43 REPORTER_ASSERT(reporter, i == *GrNEW_APPEND_TO_RECORDER(recorder, 46 REPORTER_ASSERT(reporter, i == 51 REPORTER_ASSERT(reporter, !recorder.empty()); 52 REPORTER_ASSERT(reporter, i == recorder.back()); 56 REPORTER_ASSERT(reporter, !recorder.empty()); 57 REPORTER_ASSERT(reporter, i-1 == recorder.back()); 62 REPORTER_ASSERT(reporter, !recorder.empty()); 64 REPORTER_ASSERT(reporter, recorde 88 test_extra_data(skiatest::Reporter* reporter) argument 223 test_subclasses(skiatest::Reporter* reporter) argument 266 test_subclasses_iters(skiatest::Reporter* reporter, Order& order, Base::Recorder::Iter& iter, Base::Recorder::ReverseIter& reverseIter, int i) argument [all...] |
H A D | MemoryTest.cpp | 3 DEF_TEST(memory_calloc, reporter) { 8 REPORTER_ASSERT(reporter, 0 == zeros[i]);
|
H A D | TArrayTest.cpp | 14 static void TestTSet_basic(skiatest::Reporter* reporter) { argument 18 REPORTER_ASSERT(reporter, a.empty()); 19 REPORTER_ASSERT(reporter, a.count() == 0); 23 REPORTER_ASSERT(reporter, !a.empty()); 24 REPORTER_ASSERT(reporter, a.count() == 1); 28 REPORTER_ASSERT(reporter, a.empty()); 29 REPORTER_ASSERT(reporter, a.count() == 0); 33 REPORTER_ASSERT(reporter, a.push_back() = 1); 35 REPORTER_ASSERT(reporter, !a.empty()); 36 REPORTER_ASSERT(reporter, 73 test_swap(skiatest::Reporter* reporter) argument [all...] |