/external/skia/tests/ |
H A D | BitSetTest.cpp | 11 static void TestBitSet(skiatest::Reporter* reporter) { argument 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, NULL == deq.front()); 17 REPORTER_ASSERT(reporter, NULL == 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, NUL 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 164 TestDeque(skiatest::Reporter* reporter) argument [all...] |
H A D | TSetTest.cpp | 13 static void TestTSet_basic(skiatest::Reporter* reporter) { argument 15 REPORTER_ASSERT(reporter, set0.isEmpty()); 16 REPORTER_ASSERT(reporter, !set0.contains(-1)); 17 REPORTER_ASSERT(reporter, !set0.contains(0)); 18 REPORTER_ASSERT(reporter, !set0.contains(1)); 19 REPORTER_ASSERT(reporter, set0.count() == 0); 21 REPORTER_ASSERT(reporter, set0.add(0)); 22 REPORTER_ASSERT(reporter, !set0.isEmpty()); 23 REPORTER_ASSERT(reporter, !set0.contains(-1)); 24 REPORTER_ASSERT(reporter, set 45 TestTSet_advanced(skiatest::Reporter* reporter) argument 98 TestTSet_merge(skiatest::Reporter* reporter) argument 130 TestTSet(skiatest::Reporter* reporter) argument [all...] |
H A D | FrontBufferedStreamTest.cpp | 13 static void test_read(skiatest::Reporter* reporter, SkStream* bufferedStream, argument 19 REPORTER_ASSERT(reporter, bytesRead == bytesToRead || bufferedStream->isAtEnd()); 20 REPORTER_ASSERT(reporter, memcmp(storage.get(), expectations, bytesRead) == 0); 23 static void test_rewind(skiatest::Reporter* reporter, argument 26 REPORTER_ASSERT(reporter, success == shouldSucceed); 36 static void test_incremental_buffering(skiatest::Reporter* reporter, size_t bufferSize) { argument 42 test_read(reporter, bufferedStream, gAbcs, bufferSize >> 1); 46 test_rewind(reporter, bufferedStream, true); 47 test_read(reporter, bufferedStream, gAbcs, bufferSize >> 2); 50 test_read(reporter, bufferedStrea 63 test_perfectly_sized_buffer(skiatest::Reporter* reporter, size_t bufferSize) argument 81 test_skipping(skiatest::Reporter* reporter, size_t bufferSize) argument 102 test_buffers(skiatest::Reporter* reporter, size_t bufferSize) argument 108 TestStreams(skiatest::Reporter* reporter) argument [all...] |
H A D | RefDictTest.cpp | 20 static void TestRefDict(skiatest::Reporter* reporter) { argument 24 REPORTER_ASSERT(reporter, NULL == dict.find(NULL)); 25 REPORTER_ASSERT(reporter, NULL == dict.find("foo")); 26 REPORTER_ASSERT(reporter, NULL == dict.find("bar")); 29 REPORTER_ASSERT(reporter, &data0 == dict.find("foo")); 30 REPORTER_ASSERT(reporter, 2 == data0.getRefCnt()); 33 REPORTER_ASSERT(reporter, &data0 == dict.find("foo")); 34 REPORTER_ASSERT(reporter, 2 == data0.getRefCnt()); 37 REPORTER_ASSERT(reporter, &data1 == dict.find("foo")); 38 REPORTER_ASSERT(reporter, [all...] |
H A D | TestSize.cpp | 11 static void TestISize(skiatest::Reporter* reporter) { argument 15 REPORTER_ASSERT(reporter, a.isEmpty()); 17 REPORTER_ASSERT(reporter, a.isEmpty()); 19 REPORTER_ASSERT(reporter, a.isEmpty()); 21 REPORTER_ASSERT(reporter, a == b); 24 REPORTER_ASSERT(reporter, !a.isEmpty()); 26 REPORTER_ASSERT(reporter, !b.isEmpty()); 27 REPORTER_ASSERT(reporter, a == b); 28 REPORTER_ASSERT(reporter, !(a != b)); 29 REPORTER_ASSERT(reporter, 33 TestSize(skiatest::Reporter* reporter) argument [all...] |
H A D | MetaDataTest.cpp | 11 static void test_ptrs(skiatest::Reporter* reporter) { argument 13 REPORTER_ASSERT(reporter, 1 == ref.getRefCnt()); 20 REPORTER_ASSERT(reporter, md0.findRefCnt(name)); 21 REPORTER_ASSERT(reporter, md0.hasRefCnt(name, &ref)); 22 REPORTER_ASSERT(reporter, 2 == ref.getRefCnt()); 25 REPORTER_ASSERT(reporter, md1.findRefCnt(name)); 26 REPORTER_ASSERT(reporter, md1.hasRefCnt(name, &ref)); 27 REPORTER_ASSERT(reporter, 3 == ref.getRefCnt()); 29 REPORTER_ASSERT(reporter, md0.removeRefCnt(name)); 30 REPORTER_ASSERT(reporter, !md 37 TestMetaData(skiatest::Reporter* reporter) argument [all...] |
H A D | Reader32Test.cpp | 14 static void assert_eof(skiatest::Reporter* reporter, const SkReader32& reader) { argument 15 REPORTER_ASSERT(reporter, reader.eof()); 16 REPORTER_ASSERT(reporter, reader.size() == reader.offset()); 17 REPORTER_ASSERT(reporter, (const char*)reader.peek() == 21 static void assert_start(skiatest::Reporter* reporter, const SkReader32& reader) { argument 22 REPORTER_ASSERT(reporter, 0 == reader.offset()); 23 REPORTER_ASSERT(reporter, reader.size() == reader.available()); 24 REPORTER_ASSERT(reporter, reader.isAvailable(reader.size())); 25 REPORTER_ASSERT(reporter, !reader.isAvailable(reader.size() + 1)); 26 REPORTER_ASSERT(reporter, reade 29 assert_empty(skiatest::Reporter* reporter, const SkReader32& reader) argument 38 Tests(skiatest::Reporter* reporter) argument [all...] |
H A D | UtilsTest.cpp | 30 static void test_autounref(skiatest::Reporter* reporter) { argument 32 REPORTER_ASSERT(reporter, 1 == obj.getRefCnt()); 35 REPORTER_ASSERT(reporter, &obj == tmp.get()); 36 REPORTER_ASSERT(reporter, 1 == obj.getRefCnt()); 38 REPORTER_ASSERT(reporter, &obj == tmp.detach()); 39 REPORTER_ASSERT(reporter, 1 == obj.getRefCnt()); 40 REPORTER_ASSERT(reporter, NULL == tmp.detach()); 41 REPORTER_ASSERT(reporter, NULL == tmp.get()); 44 REPORTER_ASSERT(reporter, 2 == obj.getRefCnt()); 48 REPORTER_ASSERT(reporter, 51 test_autostarray(skiatest::Reporter* reporter) argument 124 test_search(skiatest::Reporter* reporter) argument 169 test_utf16(skiatest::Reporter* reporter) argument 188 TestUTF(skiatest::Reporter* reporter) argument [all...] |
H A D | PathOpsDPointTest.cpp | 23 static void PathOpsDPointTest(skiatest::Reporter* reporter) { argument 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)); 41 REPORTER_ASSERT(reporter, [all...] |
H A D | XfermodeTest.cpp | 18 static void test_asMode(skiatest::Reporter* reporter) { argument 23 REPORTER_ASSERT(reporter, reportedMode != mode); 26 REPORTER_ASSERT(reporter, SkXfermode::IsMode(xfer, &reportedMode)); 27 REPORTER_ASSERT(reporter, reportedMode == mode); 32 REPORTER_ASSERT(reporter, xfer->asMode(&reportedMode)); 33 REPORTER_ASSERT(reporter, reportedMode == mode); 36 REPORTER_ASSERT(reporter, SkXfermode::kSrcOver_Mode == mode); 42 REPORTER_ASSERT(reporter, !bogusXfer->asMode(&reportedMode)); 43 REPORTER_ASSERT(reporter, reportedMode == ILLEGAL_MODE); 44 REPORTER_ASSERT(reporter, !SkXfermod 49 test_IsMode(skiatest::Reporter* reporter) argument 66 test_xfermodes(skiatest::Reporter* reporter) argument [all...] |
H A D | StringTest.cpp | 37 static void TestString(skiatest::Reporter* reporter) { argument 43 REPORTER_ASSERT(reporter, a.isEmpty()); 44 REPORTER_ASSERT(reporter, a == b && a == c && a == d); 52 REPORTER_ASSERT(reporter, !a.isEmpty()); 53 REPORTER_ASSERT(reporter, a.size() == 5); 54 REPORTER_ASSERT(reporter, a == b && a == c && a == d); 55 REPORTER_ASSERT(reporter, a.equals("hello", 5)); 56 REPORTER_ASSERT(reporter, a.equals("hello")); 57 REPORTER_ASSERT(reporter, !a.equals("help")); 59 REPORTER_ASSERT(reporter, [all...] |
H A D | DataRefTest.cpp | 17 static void test_is_equal(skiatest::Reporter* reporter, argument 19 REPORTER_ASSERT(reporter, a->count() == b->count()); 24 REPORTER_ASSERT(reporter, sizea == sizeb); 25 REPORTER_ASSERT(reporter, !memcmp(mema, memb, sizea)); 29 static void test_datatable_flatten(skiatest::Reporter* reporter, argument 41 test_is_equal(reporter, table, newTable); 44 static void test_datatable_is_empty(skiatest::Reporter* reporter, argument 46 REPORTER_ASSERT(reporter, table->isEmpty()); 47 REPORTER_ASSERT(reporter, 0 == table->count()); 48 test_datatable_flatten(reporter, tabl 51 test_emptytable(skiatest::Reporter* reporter) argument 68 test_simpletable(skiatest::Reporter* reporter) argument 84 test_vartable(skiatest::Reporter* reporter) argument 111 test_tablebuilder(skiatest::Reporter* reporter) argument 138 test_globaltable(skiatest::Reporter* reporter) argument 157 TestDataTable(skiatest::Reporter* reporter) argument 172 test_dataset_subset(skiatest::Reporter* reporter, const SkDataSet& outer, const SkDataSet& inner) argument 182 test_datasets_equal(skiatest::Reporter* reporter, const SkDataSet& ds0, const SkDataSet& ds1) argument 190 test_dataset(skiatest::Reporter* reporter, const SkDataSet& ds, int count) argument 213 test_dataset(skiatest::Reporter* reporter) argument 238 assert_len(skiatest::Reporter* reporter, SkData* ref, size_t len) argument 242 assert_data(skiatest::Reporter* reporter, SkData* ref, const void* data, size_t len) argument 248 test_cstring(skiatest::Reporter* reporter) argument 262 test_files(skiatest::Reporter* reporter) argument 295 TestData(skiatest::Reporter* reporter) argument [all...] |
H A D | GrContextFactoryTest.cpp | 14 static void test_context_factory(skiatest::Reporter* reporter, argument 20 REPORTER_ASSERT(reporter, 25 REPORTER_ASSERT(reporter, 30 REPORTER_ASSERT(reporter,
|
H A D | Writer32Test.cpp | 16 static void check_contents(skiatest::Reporter* reporter, const SkWriter32& writer, argument 19 REPORTER_ASSERT(reporter, writer.bytesWritten() == size); 21 REPORTER_ASSERT(reporter, !memcmp(storage.get(), expected, size)); 24 static void test_string_null(skiatest::Reporter* reporter) { argument 35 check_contents(reporter, writer, null, sizeof(null)); 37 REPORTER_ASSERT(reporter, NULL == str); 38 REPORTER_ASSERT(reporter, 0 == len); 46 check_contents(reporter, writer, empty, sizeof(empty)); 48 REPORTER_ASSERT(reporter, 0 == strcmp("", str)); 49 REPORTER_ASSERT(reporter, 52 test_rewind(skiatest::Reporter* reporter) argument 84 test_ptr(skiatest::Reporter* reporter) argument 112 test1(skiatest::Reporter* reporter, SkWriter32* writer) argument 127 test2(skiatest::Reporter* reporter, SkWriter32* writer) argument 158 testWritePad(skiatest::Reporter* reporter, SkWriter32* writer) argument 200 Tests(skiatest::Reporter* reporter) argument [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 120 PointTest(skiatest::Reporter* reporter) argument [all...] |
H A D | OSPathTest.cpp | 16 * @param reporter Reporter for test conditions. 22 static void test_dir_with_file(skiatest::Reporter* reporter, SkString dir, argument 38 REPORTER_ASSERT(reporter, fullName.size() == expectedSize); 43 REPORTER_ASSERT(reporter, basename.equals(filename)); 46 REPORTER_ASSERT(reporter, !basename.contains(SkPATH_SEPARATOR)); 50 REPORTER_ASSERT(reporter, basename.equals(filename)); 53 static void test_os_path_utils_tests(skiatest::Reporter* reporter) { argument 56 test_dir_with_file(reporter, dir, filename); 60 test_dir_with_file(reporter, dir, filename); 63 test_dir_with_file(reporter, di [all...] |
H A D | MatrixTest.cpp | 36 static bool are_equal(skiatest::Reporter* reporter, argument 53 REPORTER_ASSERT(reporter, aVal == bVal && aValI == aValI); 56 REPORTER_ASSERT(reporter, foundZeroSignDiff); 67 REPORTER_ASSERT(reporter, aVal == bVal && aValI == bValI); 70 REPORTER_ASSERT(reporter, foundNaN); 73 REPORTER_ASSERT(reporter, false); 85 static void test_matrix_recttorect(skiatest::Reporter* reporter) { argument 92 REPORTER_ASSERT(reporter, SkMatrix::kIdentity_Mask == matrix.getType()); 93 REPORTER_ASSERT(reporter, matrix.rectStaysRect()); 97 REPORTER_ASSERT(reporter, SkMatri 113 test_flatten(skiatest::Reporter* reporter, const SkMatrix& m) argument 132 test_matrix_max_stretch(skiatest::Reporter* reporter) argument 220 test_matrix_is_similarity(skiatest::Reporter* reporter) argument 369 test_matrix_decomposition(skiatest::Reporter* reporter) argument 595 TestMatrix(skiatest::Reporter* reporter) argument [all...] |
H A D | ParsePathTest.cpp | 11 static void test_to_from(skiatest::Reporter* reporter, const SkPath& path) { argument 17 REPORTER_ASSERT(reporter, success); 20 REPORTER_ASSERT(reporter, str == str2); 23 REPORTER_ASSERT(reporter, path == path2); 41 static void TestParsePath(skiatest::Reporter* reporter) { argument 45 REPORTER_ASSERT(reporter, success); 48 REPORTER_ASSERT(reporter, expectedBounds == pathBounds); 50 test_to_from(reporter, path); 57 test_to_from(reporter, p); 59 test_to_from(reporter, [all...] |
H A D | PictureUtilsTest.cpp | 11 static void test_filepath_creation(skiatest::Reporter* reporter) { argument 16 REPORTER_ASSERT(reporter, result.equals("test/path/test")); 19 static void test_get_basename(skiatest::Reporter* reporter) { argument 23 REPORTER_ASSERT(reporter, result.equals("basename")); 28 REPORTER_ASSERT(reporter, result.equals("dir")); 33 REPORTER_ASSERT(reporter, result.equals("path")); 39 REPORTER_ASSERT(reporter, result.equals("winbasename")); 44 REPORTER_ASSERT(reporter, result.equals("windir")); 48 static void TestPictureUtils(skiatest::Reporter* reporter) { argument 49 test_filepath_creation(reporter); [all...] |
H A D | GrSurfaceTest.cpp | 21 static void GrSurfaceIsSameTest(skiatest::Reporter* reporter, GrContextFactory* factory) { argument 35 REPORTER_ASSERT(reporter, texRT1->isSameAs(texRT1)); 36 REPORTER_ASSERT(reporter, texRT1->isSameAs(texRT1->asRenderTarget())); 37 REPORTER_ASSERT(reporter, texRT1->asRenderTarget()->isSameAs(texRT1)); 38 REPORTER_ASSERT(reporter, !texRT2->isSameAs(texRT1)); 39 REPORTER_ASSERT(reporter, !texRT2->asRenderTarget()->isSameAs(texRT1)); 40 REPORTER_ASSERT(reporter, !texRT2->isSameAs(texRT1->asRenderTarget())); 41 REPORTER_ASSERT(reporter, !texRT2->isSameAs(tex1)); 42 REPORTER_ASSERT(reporter, !texRT2->asRenderTarget()->isSameAs(tex1)); 52 REPORTER_ASSERT(reporter, externalTexR [all...] |
H A D | ShaderOpacityTest.cpp | 13 static void test_bitmap(skiatest::Reporter* reporter) { argument 20 REPORTER_ASSERT(reporter, shader); 21 REPORTER_ASSERT(reporter, !shader->isOpaque()); 30 REPORTER_ASSERT(reporter, shader); 31 REPORTER_ASSERT(reporter, !shader->isOpaque()); 38 REPORTER_ASSERT(reporter, shader); 39 REPORTER_ASSERT(reporter, shader->isOpaque()); 46 REPORTER_ASSERT(reporter, shader); 47 REPORTER_ASSERT(reporter, !shader->isOpaque()); 52 static void test_gradient(skiatest::Reporter* reporter) argument 96 test_color(skiatest::Reporter* reporter) argument 111 test_shader_opacity(skiatest::Reporter* reporter) argument [all...] |
H A D | FlateTest.cpp | 33 static void TestFlate(skiatest::Reporter* reporter, SkMemoryStream* testStream, argument 47 REPORTER_ASSERT(reporter, status); 53 REPORTER_ASSERT(reporter, testData.getLength() == inputSize); 54 REPORTER_ASSERT(reporter, memcmp(testData.getMemoryBase(), 60 REPORTER_ASSERT(reporter, compressed.getOffset() < 1024); 62 REPORTER_ASSERT(reporter, compressed.getOffset() > 1024); 69 REPORTER_ASSERT(reporter, status); 75 REPORTER_ASSERT(reporter, data1->size() == inputSize); 76 REPORTER_ASSERT(reporter, memcmp(testStream->getMemoryBase(), 82 REPORTER_ASSERT(reporter, testDat 88 TestFlateCompression(skiatest::Reporter* reporter) argument [all...] |
H A D | Matrix44Test.cpp | 31 template <typename T> void assert16(skiatest::Reporter* reporter, const T data[], argument 36 REPORTER_ASSERT(reporter, data[0] == m0); 37 REPORTER_ASSERT(reporter, data[1] == m1); 38 REPORTER_ASSERT(reporter, data[2] == m2); 39 REPORTER_ASSERT(reporter, data[3] == m3); 41 REPORTER_ASSERT(reporter, data[4] == m4); 42 REPORTER_ASSERT(reporter, data[5] == m5); 43 REPORTER_ASSERT(reporter, data[6] == m6); 44 REPORTER_ASSERT(reporter, data[7] == m7); 46 REPORTER_ASSERT(reporter, dat 80 test_constructor(skiatest::Reporter* reporter) argument 111 test_translate(skiatest::Reporter* reporter) argument 136 test_scale(skiatest::Reporter* reporter) argument 185 test_map2(skiatest::Reporter* reporter, const SkMatrix44& mat) argument 203 test_map2(skiatest::Reporter* reporter) argument 212 test_gettype(skiatest::Reporter* reporter) argument 247 test_common_angles(skiatest::Reporter* reporter) argument 259 test_concat(skiatest::Reporter* reporter) argument 297 test_determinant(skiatest::Reporter* reporter) argument 322 test_transpose(skiatest::Reporter* reporter) argument 338 test_get_set_double(skiatest::Reporter* reporter) argument 353 test_set_row_col_major(skiatest::Reporter* reporter) argument 377 TestMatrix44(skiatest::Reporter* reporter) argument [all...] |
H A D | MemsetTest.cpp | 12 static void test_chunkalloc(skiatest::Reporter* reporter) { argument 16 REPORTER_ASSERT(reporter, 0 == alloc.totalCapacity()); 17 REPORTER_ASSERT(reporter, 0 == alloc.totalUsed()); 18 REPORTER_ASSERT(reporter, 0 == alloc.blockCount()); 19 REPORTER_ASSERT(reporter, !alloc.contains(NULL)); 20 REPORTER_ASSERT(reporter, !alloc.contains(reporter)); 23 REPORTER_ASSERT(reporter, 0 == alloc.totalCapacity()); 24 REPORTER_ASSERT(reporter, 0 == alloc.totalUsed()); 25 REPORTER_ASSERT(reporter, 77 test_16(skiatest::Reporter* reporter) argument 95 test_32(skiatest::Reporter* reporter) argument 118 TestMemset(skiatest::Reporter* reporter) argument [all...] |