/external/skia/tests/ |
SmallAllocatorTest.cpp | 30 template<uint32_t kMaxObjects, size_t kBytes> void test_allocator(skiatest::Reporter* reporter) { 35 REPORTER_ASSERT(reporter, c != NULL); 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); [all...] |
PointTest.cpp | 14 static void test_casts(skiatest::Reporter* reporter) { 21 REPORTER_ASSERT(reporter, p.asScalars() == pPtr); 22 REPORTER_ASSERT(reporter, r.asScalars() == rPtr); 26 static void test_Normalize(skiatest::Reporter* reporter, 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 [all...] |
MemoryTest.cpp | 3 DEF_TEST(memory_calloc, reporter) { 8 REPORTER_ASSERT(reporter, 0 == zeros[i]);
|
TextureCompressionTest.cpp | 21 DEF_TEST(CompressLATCFailDimensions, reporter) { 26 REPORTER_ASSERT(reporter, kWidth % kLATCBlockDimension != 0); 27 REPORTER_ASSERT(reporter, kHeight % kLATCBlockDimension != 0); 30 REPORTER_ASSERT(reporter, setInfoSuccess); 33 REPORTER_ASSERT(reporter, allocPixelsSuccess); 38 REPORTER_ASSERT(reporter, NULL == latcData); 45 DEF_TEST(CompressLATCFailColorType, reporter) { 50 REPORTER_ASSERT(reporter, kWidth % kLATCBlockDimension == 0); 51 REPORTER_ASSERT(reporter, kHeight % kLATCBlockDimension == 0); 54 REPORTER_ASSERT(reporter, setInfoSuccess) [all...] |
OSPathTest.cpp | 16 * @param reporter Reporter for test conditions. 22 static void test_dir_with_file(skiatest::Reporter* reporter, SkString dir, 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) [all...] |
DiscardableMemoryTest.cpp | 12 DEF_TEST(DiscardableMemory, reporter) { 16 REPORTER_ASSERT(reporter, dm.get() != NULL); 21 REPORTER_ASSERT(reporter, ptr != NULL); 25 REPORTER_ASSERT(reporter, success); 30 REPORTER_ASSERT(reporter, 0 == memcmp(ptr, testString, len));
|
ObjectPoolTest.cpp | 21 static bool verifyPool(skiatest::Reporter* reporter, 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) { 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()) [all...] |
ParsePathTest.cpp | 11 static void test_to_from(skiatest::Reporter* reporter, const SkPath& path) { 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) [all...] |
GrBinHashKeyTest.cpp | 15 DEF_TEST(GrBinHashKeyTest, reporter) { 28 REPORTER_ASSERT(reporter, keyA == keyA2); 29 REPORTER_ASSERT(reporter, keyA.getHash() == keyA2.getHash()); 32 REPORTER_ASSERT(reporter, keyA == keyA2); 33 REPORTER_ASSERT(reporter, keyA.getHash() == keyA2.getHash()); 37 REPORTER_ASSERT(reporter, keyA < keyB); 38 REPORTER_ASSERT(reporter, keyA.getHash() != keyB.getHash());
|
TypefaceTest.cpp | 11 DEF_TEST(Typeface, reporter) { 16 REPORTER_ASSERT(reporter, SkTypeface::Equal(t1.get(), t2.get())); 17 REPORTER_ASSERT(reporter, SkTypeface::Equal(0, t1.get())); 18 REPORTER_ASSERT(reporter, SkTypeface::Equal(0, t2.get())); 19 REPORTER_ASSERT(reporter, SkTypeface::Equal(t1.get(), 0)); 20 REPORTER_ASSERT(reporter, SkTypeface::Equal(t2.get(), 0)); 24 REPORTER_ASSERT(reporter, NULL == t3.get());
|
Writer32Test.cpp | 13 static void check_contents(skiatest::Reporter* reporter, const SkWriter32& writer, 16 REPORTER_ASSERT(reporter, writer.bytesWritten() == size); 18 REPORTER_ASSERT(reporter, !memcmp(storage.get(), expected, size)); 22 static void test_reserve(skiatest::Reporter* reporter) { 30 static void test_string_null(skiatest::Reporter* reporter) { 37 check_contents(reporter, writer, expected, sizeof(expected)); 40 static void test_rewind(skiatest::Reporter* reporter) [all...] |
/external/chromium_org/third_party/skia/tests/ |
PointTest.cpp | 14 static void test_casts(skiatest::Reporter* reporter) { 21 REPORTER_ASSERT(reporter, p.asScalars() == pPtr); 22 REPORTER_ASSERT(reporter, r.asScalars() == rPtr); 26 static void test_Normalize(skiatest::Reporter* reporter, 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 [all...] |
MemoryTest.cpp | 3 DEF_TEST(memory_calloc, reporter) { 8 REPORTER_ASSERT(reporter, 0 == zeros[i]);
|
InterpolatorTest.cpp | 19 DEF_TEST(Interpolator, reporter) { 28 REPORTER_ASSERT(reporter, result == SkInterpolator::kFreezeStart_Result); 29 REPORTER_ASSERT(reporter, memcmp(v, v1, sizeof(v)) == 0); 32 REPORTER_ASSERT(reporter, result == SkInterpolator::kFreezeStart_Result); 33 REPORTER_ASSERT(reporter, memcmp(v, v1, sizeof(v)) == 0); 36 REPORTER_ASSERT(reporter, result == SkInterpolator::kNormal_Result); 37 REPORTER_ASSERT(reporter, memcmp(v, v1, sizeof(v)) == 0); 40 REPORTER_ASSERT(reporter, result == SkInterpolator::kNormal_Result); 41 REPORTER_ASSERT(reporter, memcmp(v, v2, sizeof(v)) == 0); 44 REPORTER_ASSERT(reporter, result == SkInterpolator::kFreezeEnd_Result) [all...] |
BitmapTest.cpp | 12 static void test_allocpixels(skiatest::Reporter* reporter) { 20 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes()); 22 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes()); 25 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes()); 28 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes()); 30 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes()); 33 REPORTER_ASSERT(reporter, explicitRowBytes == bm.rowBytes()); 37 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes()); 40 REPORTER_ASSERT(reporter, info.minRowBytes() == bm.rowBytes()) [all...] |
DiscardableMemoryTest.cpp | 12 DEF_TEST(DiscardableMemory, reporter) { 16 REPORTER_ASSERT(reporter, dm.get() != NULL); 21 REPORTER_ASSERT(reporter, ptr != NULL); 25 REPORTER_ASSERT(reporter, success); 30 REPORTER_ASSERT(reporter, 0 == memcmp(ptr, testString, len));
|
GpuLayerCacheTest.cpp | 27 static void create_layers(skiatest::Reporter* reporter, 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()) [all...] |
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()) [all...] |
ObjectPoolTest.cpp | 21 static bool verifyPool(skiatest::Reporter* reporter, 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) { 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()) [all...] |
ParsePathTest.cpp | 11 static void test_to_from(skiatest::Reporter* reporter, const SkPath& path) { 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) [all...] |
TypefaceTest.cpp | 11 DEF_TEST(Typeface, reporter) { 16 REPORTER_ASSERT(reporter, SkTypeface::Equal(t1.get(), t2.get())); 17 REPORTER_ASSERT(reporter, SkTypeface::Equal(0, t1.get())); 18 REPORTER_ASSERT(reporter, SkTypeface::Equal(0, t2.get())); 19 REPORTER_ASSERT(reporter, SkTypeface::Equal(t1.get(), 0)); 20 REPORTER_ASSERT(reporter, SkTypeface::Equal(t2.get(), 0)); 24 REPORTER_ASSERT(reporter, NULL == t3.get());
|
Writer32Test.cpp | 13 static void check_contents(skiatest::Reporter* reporter, const SkWriter32& writer, 16 REPORTER_ASSERT(reporter, writer.bytesWritten() == size); 18 REPORTER_ASSERT(reporter, !memcmp(storage.get(), expected, size)); 22 static void test_reserve(skiatest::Reporter* reporter) { 30 static void test_string_null(skiatest::Reporter* reporter) { 37 check_contents(reporter, writer, expected, sizeof(expected)); 40 static void test_rewind(skiatest::Reporter* reporter) [all...] |
AsADashTest.cpp | 14 DEF_TEST(AsADashTest_noneDash, reporter) { 19 REPORTER_ASSERT(reporter, SkPathEffect::kNone_DashType == dashType); 22 DEF_TEST(AsADashTest_nullInfo, reporter) { 28 REPORTER_ASSERT(reporter, SkPathEffect::kDash_DashType == dashType); 31 DEF_TEST(AsADashTest_usingDash, reporter) { 41 REPORTER_ASSERT(reporter, SkPathEffect::kDash_DashType == dashType); 42 REPORTER_ASSERT(reporter, 4 == info.fCount); 43 REPORTER_ASSERT(reporter, SkScalarMod(phase, totalIntSum) == info.fPhase); 49 REPORTER_ASSERT(reporter, inIntervals[0] == info.fIntervals[0]); 50 REPORTER_ASSERT(reporter, inIntervals[1] == info.fIntervals[1]) [all...] |
GrSurfaceTest.cpp | 17 DEF_GPUTEST(GrSurface, reporter, factory) { 31 REPORTER_ASSERT(reporter, texRT1->isSameAs(texRT1)); 32 REPORTER_ASSERT(reporter, texRT1->isSameAs(texRT1->asRenderTarget())); 33 REPORTER_ASSERT(reporter, texRT1->asRenderTarget()->isSameAs(texRT1)); 34 REPORTER_ASSERT(reporter, !texRT2->isSameAs(texRT1)); 35 REPORTER_ASSERT(reporter, !texRT2->asRenderTarget()->isSameAs(texRT1)); 36 REPORTER_ASSERT(reporter, !texRT2->isSameAs(texRT1->asRenderTarget())); 37 REPORTER_ASSERT(reporter, !texRT2->isSameAs(tex1)); 38 REPORTER_ASSERT(reporter, !texRT2->asRenderTarget()->isSameAs(tex1)); 48 REPORTER_ASSERT(reporter, externalTexRT->isSameAs(externalTexRT)) [all...] |
/external/chromium_org/third_party/skia/forth/ |
ForthTests.cpp | 11 class Reporter { 15 Reporter() : fFailureCount(0) {} 20 typedef void (*ForthWordTestProc)(ForthWord*, ForthEngine*, Reporter*); 22 #define FORTH_ASSERT(reporter, expression) \ 25 reporter->reportFailure(#expression, __FILE__, __LINE__); \ 29 static void drop_test0(ForthWord* word, ForthEngine* fe, Reporter* reporter) { 32 FORTH_ASSERT(reporter, 0 == fe->depth()); 35 static void drop_test1(ForthWord* word, ForthEngine* fe, Reporter* reporter) { 384 Reporter reporter; local [all...] |