/external/skia/tests/ |
H A D | GeometryTest.cpp | 15 static void testChopCubic(skiatest::Reporter* reporter) { argument 32 REPORTER_ASSERT(reporter, count); 36 DEF_TEST(Geometry, reporter) { 44 REPORTER_ASSERT(reporter, count == 1 || count == 2); 57 REPORTER_ASSERT(reporter, nearly_equal(cubic[i], dst[i])); 60 testChopCubic(reporter);
|
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 | MD5Test.cpp | 20 static void md5_test(const char* string, const SkMD5::Digest& expectedDigest, skiatest::Reporter* reporter) { argument 30 REPORTER_ASSERT(reporter, digests_equal(expectedDigest, digest)); 44 REPORTER_ASSERT(reporter, digests_equal(expectedDigest, digest)); 62 DEF_TEST(MD5, reporter) { 64 md5_test(md5_tests[i].message, md5_tests[i].digest, reporter);
|
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 DEF_TEST(OSPath, reporter) { 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 | ObjectPoolTest.cpp | 21 static bool verifyPool(skiatest::Reporter* reporter, argument 26 ERRORF(reporter, "%s - Pool available is %d not %d", 31 ERRORF(reporter, "%s - Pool blocks is %d not %d", 39 static void testObjectPool(skiatest::Reporter* reporter) { argument 42 verifyPool(reporter, pool, "empty", 0, 0); 47 if (!verifyPool(reporter, pool, "acquire", available, blocks)) { 56 if (!verifyPool(reporter, pool, "release", available, blocks)) { 62 REPORTER_ASSERT(reporter, used.isEmpty()); 63 verifyPool(reporter, pool, "releaseAll", available, blocks); 66 DEF_TEST(ObjectPool, reporter) { [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 DEF_TEST(ParsePath, reporter) { 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 | PathOpsSimplifyFailTest.cpp | 40 static void failOne(skiatest::Reporter* reporter, int index) { argument 63 REPORTER_ASSERT(reporter, !success); 64 REPORTER_ASSERT(reporter, result.isEmpty()); 65 REPORTER_ASSERT(reporter, result.getFillType() == SkPath::kWinding_FillType); 66 reporter->bumpTestCount(); 69 static void dontFailOne(skiatest::Reporter* reporter, int index) { argument 92 REPORTER_ASSERT(reporter, success || index == 13); 93 REPORTER_ASSERT(reporter, result.getFillType() != SkPath::kWinding_FillType); 94 reporter->bumpTestCount(); 97 DEF_TEST(PathOpsSimplifyFail, reporter) { [all...] |
H A D | PictureStateTreeTest.cpp | 67 static void check_bms(skiatest::Reporter* reporter, const SkBitmap& bm1, const SkBitmap& bm2) { argument 69 REPORTER_ASSERT(reporter, 0 == memcmp(bm1.getAddr(0, 0), bm2.getAddr(0, 0), bm1.getSize())); 72 static void test_reference_picture(skiatest::Reporter* reporter) { argument 90 REPORTER_ASSERT(reporter, 92 REPORTER_ASSERT(reporter, 94 check_bms(reporter, referenceBitmap, bbhBitmap); 102 REPORTER_ASSERT(reporter, 104 REPORTER_ASSERT(reporter, 106 check_bms(reporter, referenceBitmap, bbhBitmap); 114 REPORTER_ASSERT(reporter, [all...] |
H A D | QuickRejectTest.cpp | 52 static void test_drawBitmap(skiatest::Reporter* reporter) { argument 65 REPORTER_ASSERT(reporter, 0 == *dst.getAddr32(5, 5)); 69 REPORTER_ASSERT(reporter, 0xFFFFFFFF == *dst.getAddr32(5, 5)); 73 REPORTER_ASSERT(reporter, 0 == *dst.getAddr32(5, 5)); 77 REPORTER_ASSERT(reporter, 0 == *dst.getAddr32(5, 5)); 85 REPORTER_ASSERT(reporter, 0xFFFFFFFF == *dst.getAddr32(5, 5)); 88 DEF_TEST(QuickReject, reporter) { 89 test_drawBitmap(reporter);
|
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 | SHA1Test.cpp | 36 static void sha1_test(const SHA1Test& test, skiatest::Reporter* reporter) { argument 46 REPORTER_ASSERT(reporter, digests_equal(test.digest, digest)); 49 DEF_TEST(SHA1, reporter) { 51 sha1_test(sha1_tests[i], reporter);
|
H A D | SListTest.cpp | 18 static bool verifyEmptyList(skiatest::Reporter* reporter, argument 23 ERRORF(reporter, "%s - List not empty", stage); 27 ERRORF(reporter, "%s - List count is not zero, %d instead", stage, list.getCount()); 31 ERRORF(reporter, "%s - List has elements when empty", stage); 37 static bool verifyList(skiatest::Reporter* reporter, argument 43 ERRORF(reporter, "%s - List was too short, %d instead of %d", stage, list.getCount(), count); 49 ERRORF(reporter, "%s - List too short, should be %d", stage, count); 53 ERRORF(reporter, "%s - List entries at index %d of %d don't match", stage, index, count); 59 ERRORF(reporter, "%s - List too long, should be %d", stage, count); 65 static void testTInternalSList(skiatest::Reporter* reporter) { argument [all...] |
H A D | ShaderOpacityTest.cpp | 13 static void test_bitmap(skiatest::Reporter* reporter) { argument 22 REPORTER_ASSERT(reporter, shader); 23 REPORTER_ASSERT(reporter, !shader->isOpaque()); 32 REPORTER_ASSERT(reporter, shader); 33 REPORTER_ASSERT(reporter, !shader->isOpaque()); 40 REPORTER_ASSERT(reporter, shader); 41 REPORTER_ASSERT(reporter, shader->isOpaque()); 48 REPORTER_ASSERT(reporter, shader); 49 REPORTER_ASSERT(reporter, !shader->isOpaque()); 54 static void test_gradient(skiatest::Reporter* reporter) argument 98 test_color(skiatest::Reporter* reporter) argument [all...] |
H A D | SortTest.cpp | 24 static void check_sort(skiatest::Reporter* reporter, const char label[], argument 28 ERRORF(reporter, "%sSort [%d] failed %d %d", 34 DEF_TEST(Sort, reporter) { 54 check_sort(reporter, "Heap", workingArray, sortedArray, count); 58 check_sort(reporter, "Quick", workingArray, sortedArray, count);
|
H A D | StrokeTest.cpp | 21 static void test_strokerect(skiatest::Reporter* reporter) { argument 44 REPORTER_ASSERT(reporter, equal(outer, fillPath.getBounds())); 48 REPORTER_ASSERT(reporter, fillPath.isNestedRects(nested) == isMiter); 52 REPORTER_ASSERT(reporter, equal(nested[0], outer)); 53 REPORTER_ASSERT(reporter, equal(nested[1], inner)); 58 DEF_TEST(Stroke, reporter) { 59 test_strokerect(reporter);
|
H A D | TSetTest.cpp | 14 static void TestTSet_basic(skiatest::Reporter* reporter) { argument 16 REPORTER_ASSERT(reporter, set0.isEmpty()); 17 REPORTER_ASSERT(reporter, !set0.contains(-1)); 18 REPORTER_ASSERT(reporter, !set0.contains(0)); 19 REPORTER_ASSERT(reporter, !set0.contains(1)); 20 REPORTER_ASSERT(reporter, set0.count() == 0); 22 REPORTER_ASSERT(reporter, set0.add(0)); 23 REPORTER_ASSERT(reporter, !set0.isEmpty()); 24 REPORTER_ASSERT(reporter, !set0.contains(-1)); 25 REPORTER_ASSERT(reporter, set 46 TestTSet_advanced(skiatest::Reporter* reporter) argument 99 TestTSet_merge(skiatest::Reporter* reporter) argument [all...] |
/external/chromium_org/third_party/skia/dm/ |
H A D | DMTask.cpp | 7 Task::Task(Reporter* reporter, TaskRunner* taskRunner) argument 8 : fReporter(reporter) 45 CpuTask::CpuTask(Reporter* reporter, TaskRunner* taskRunner) : Task(reporter, taskRunner) {} argument 66 GpuTask::GpuTask(Reporter* reporter, TaskRunner* taskRunner) : Task(reporter, taskRunner) {} argument
|
/external/chromium_org/third_party/skia/tests/ |
H A D | ColorTest.cpp | 19 static inline void test_premul(skiatest::Reporter* reporter) { argument 30 REPORTER_ASSERT(reporter, p0 == p1); 34 REPORTER_ASSERT(reporter, ax <= a); 46 static void test_interp(skiatest::Reporter* reporter) { 57 REPORTER_ASSERT(reporter, SkFourByteInterp(src, dst, a0) == dst); 58 REPORTER_ASSERT(reporter, SkFourByteInterp(src, dst, a255) == src); 63 static inline void test_fast_interp(skiatest::Reporter* reporter) { argument 74 REPORTER_ASSERT(reporter, SkFastFourByteInterp(src, dst, a0) == dst); 75 REPORTER_ASSERT(reporter, SkFastFourByteInterp(src, dst, a255) == src); 79 DEF_TEST(Color, reporter) { [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, 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 | FlateTest.cpp | 38 static void TestFlate(skiatest::Reporter* reporter, SkMemoryStream* testStream, argument 48 REPORTER_ASSERT(reporter, deflateSuccess); 55 REPORTER_ASSERT(reporter, dataSize == inputSize); 57 REPORTER_ASSERT(reporter, memcmp(testData->data(), 69 REPORTER_ASSERT(reporter, inflateSuccess); 76 REPORTER_ASSERT(reporter, compressedSize == inputSize); 78 REPORTER_ASSERT(reporter, memcmp(testStream->getMemoryBase(), 85 REPORTER_ASSERT(reporter, dataSize == uncompressedData->size()); 87 REPORTER_ASSERT(reporter, memcmp(testData->data(), 96 REPORTER_ASSERT(reporter, compressionRati [all...] |
H A D | FontObjTest.cpp | 25 static void test_cachedfont(skiatest::Reporter* reporter, const SkPaint& paint) { argument 30 REPORTER_ASSERT(reporter, font->getTypeface() == paint.getTypeface()); 32 REPORTER_ASSERT(reporter, font->getSize() == paint.getTextSize()); 33 REPORTER_ASSERT(reporter, font->getScaleX() == paint.getTextScaleX()); 34 REPORTER_ASSERT(reporter, font->getSkewX() == paint.getTextSkewX()); 36 REPORTER_ASSERT(reporter, font->isVertical() == paint.isVerticalText()); 37 REPORTER_ASSERT(reporter, font->isEmbolden() == paint.isFakeBoldText()); 39 REPORTER_ASSERT(reporter, font->isUseNonLinearMetrics() == is_use_nonlinear_metrics(paint)); 40 REPORTER_ASSERT(reporter, font->isEnableAutoHints() == is_enable_auto_hints(paint)); 41 REPORTER_ASSERT(reporter, fon 44 test_cachedfont(skiatest::Reporter* reporter) argument [all...] |
H A D | GpuLayerCacheTest.cpp | 27 static void create_layers(skiatest::Reporter* reporter, argument 39 REPORTER_ASSERT(reporter, layer); 42 REPORTER_ASSERT(reporter, temp == layer); 44 REPORTER_ASSERT(reporter, TestingAccess::NumLayers(cache) == idOffset + i + 1); 46 REPORTER_ASSERT(reporter, picture.uniqueID() == layer->pictureID()); 47 REPORTER_ASSERT(reporter, layer->start() == idOffset + i + 1); 48 REPORTER_ASSERT(reporter, layer->stop() == idOffset + i + 2); 49 REPORTER_ASSERT(reporter, layer->ctm() == SkMatrix::I()); 50 REPORTER_ASSERT(reporter, NULL == layer->texture()); 51 REPORTER_ASSERT(reporter, NUL 58 lock_layer(skiatest::Reporter* reporter, GrLayerCache* cache, GrCachedLayer* layer) argument [all...] |
H A D | GrAllocatorTest.cpp | 27 skiatest::Reporter* reporter); 32 skiatest::Reporter* reporter) { 43 check_allocator_helper(allocator, cnt, popCnt, reporter); 45 check_allocator_helper(allocator, 0, 0, reporter); 51 skiatest::Reporter* reporter) { 52 REPORTER_ASSERT(reporter, (0 == cnt) == allocator->empty()); 53 REPORTER_ASSERT(reporter, cnt == allocator->count()); 54 REPORTER_ASSERT(reporter, cnt == C::gInstCnt); 58 REPORTER_ASSERT(reporter, iter.next() && i == iter.get()->fID); 60 REPORTER_ASSERT(reporter, !ite 31 check_allocator(GrTAllocator<C>* allocator, int cnt, int popCnt, skiatest::Reporter* reporter) argument 50 check_allocator_helper(GrTAllocator<C>* allocator, int cnt, int popCnt, skiatest::Reporter* reporter) argument [all...] |
H A D | LayerDrawLooperTest.cpp | 44 static void test_frontToBack(skiatest::Reporter* reporter) { argument 66 REPORTER_ASSERT(reporter, context->next(&canvas, &paint)); 67 REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrc_Mode)); 69 REPORTER_ASSERT(reporter, 10.0f == device.fLastMatrix.getTranslateX()); 70 REPORTER_ASSERT(reporter, 20.0f == device.fLastMatrix.getTranslateY()); 74 REPORTER_ASSERT(reporter, context->next(&canvas, &paint)); 75 REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode::kSrcOver_Mode)); 77 REPORTER_ASSERT(reporter, 0.0f == device.fLastMatrix.getTranslateX()); 78 REPORTER_ASSERT(reporter, 0.0f == device.fLastMatrix.getTranslateY()); 81 REPORTER_ASSERT(reporter, !contex 84 test_backToFront(skiatest::Reporter* reporter) argument 124 test_mixed(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 [all...] |