/external/chromium_org/third_party/skia/tests/ |
TileGridTest.cpp | 34 static void verifyTileHits(skiatest::Reporter* reporter, SkRect rect, 42 REPORTER_ASSERT(reporter, grid.tileCount(0, 0) == 44 REPORTER_ASSERT(reporter, grid.tileCount(1, 0) == 46 REPORTER_ASSERT(reporter, grid.tileCount(0, 1) == 48 REPORTER_ASSERT(reporter, grid.tileCount(1, 1) == 52 DEF_TEST(TileGrid_UnalignedQuery, reporter) { 77 REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count()); 78 REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]); 84 REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count()) [all...] |
ShaderOpacityTest.cpp | 13 static void test_bitmap(skiatest::Reporter* reporter) { 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()) [all...] |
DocumentTest.cpp | 8 static void test_empty(skiatest::Reporter* reporter) { 15 REPORTER_ASSERT(reporter, stream.bytesWritten() == 0); 18 static void test_abort(skiatest::Reporter* reporter) { 28 REPORTER_ASSERT(reporter, stream.bytesWritten() == 0); 31 static void test_abortWithFile(skiatest::Reporter* reporter) { 56 REPORTER_ASSERT(reporter, fread(buffer, 1, 1, file) == 0); 60 static void test_file(skiatest::Reporter* reporter) [all...] |
DeferredCanvasTest.cpp | 88 static void TestDeferredCanvasWritePixelsToSurface(skiatest::Reporter* reporter) { 100 REPORTER_ASSERT(reporter, 0 == surface->fDiscardCount); 101 REPORTER_ASSERT(reporter, 0 == surface->fRetainCount); 105 REPORTER_ASSERT(reporter, 0 == surface->fDiscardCount); 106 REPORTER_ASSERT(reporter, 0 == surface->fRetainCount); 112 REPORTER_ASSERT(reporter, 0 == surface->fDiscardCount); 113 REPORTER_ASSERT(reporter, 0 == surface->fRetainCount); 117 REPORTER_ASSERT(reporter, 0 == surface->fDiscardCount); 118 REPORTER_ASSERT(reporter, 0 == surface->fRetainCount) [all...] |
FontMgrTest.cpp | 15 static void test_font(skiatest::Reporter* reporter) { 19 REPORTER_ASSERT(reporter, font->getTypeface()); 20 REPORTER_ASSERT(reporter, 24 == font->getSize()); 21 REPORTER_ASSERT(reporter, 1 == font->getScaleX()); 22 REPORTER_ASSERT(reporter, 0 == font->getSkewX()); 23 REPORTER_ASSERT(reporter, SkFont::kA8_MaskType == font->getMaskType()); 30 REPORTER_ASSERT(reporter, 5 == count); 32 REPORTER_ASSERT(reporter, 0 != glyphs[i]); 34 REPORTER_ASSERT(reporter, glyphs[0] != glyphs[1]); // 'h' != 'e [all...] |
MathTest.cpp | 17 static void test_clz(skiatest::Reporter* reporter) { 18 REPORTER_ASSERT(reporter, 32 == SkCLZ(0)); 19 REPORTER_ASSERT(reporter, 31 == SkCLZ(1)); 20 REPORTER_ASSERT(reporter, 1 == SkCLZ(1 << 30)); 21 REPORTER_ASSERT(reporter, 0 == SkCLZ(~0U)); 31 REPORTER_ASSERT(reporter, intri == porta); 51 static void test_floor_value(skiatest::Reporter* reporter, float value) { 54 REPORTER_ASSERT(reporter, std == fast) [all...] |
MemsetTest.cpp | 12 static void test_chunkalloc(skiatest::Reporter* reporter) { 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()) [all...] |
PathOpsDRectTest.cpp | 41 DEF_TEST(PathOpsDRect, reporter) { 48 REPORTER_ASSERT(reporter, rect.fLeft == SkTMin(line[0].fX, line[1].fX)); 49 REPORTER_ASSERT(reporter, rect.fTop == SkTMin(line[0].fY, line[1].fY)); 50 REPORTER_ASSERT(reporter, rect.fRight == SkTMax(line[0].fX, line[1].fX)); 51 REPORTER_ASSERT(reporter, rect.fBottom == SkTMax(line[0].fY, line[1].fY)); 54 REPORTER_ASSERT(reporter, rect2.fLeft == SkTMin(line[0].fX, line[1].fX)); 55 REPORTER_ASSERT(reporter, rect2.fTop == SkTMin(line[0].fY, line[1].fY)); 56 REPORTER_ASSERT(reporter, rect2.fRight == SkTMax(line[0].fX, line[1].fX)); 57 REPORTER_ASSERT(reporter, rect2.fBottom == SkTMax(line[0].fY, line[1].fY)); 58 REPORTER_ASSERT(reporter, rect.contains(line[0])) [all...] |
StreamTest.cpp | 21 static void test_loop_stream(skiatest::Reporter* reporter, SkStream* stream, 28 REPORTER_ASSERT(reporter, bytes == len); 29 REPORTER_ASSERT(reporter, !memcmp(tmp, src, len)); 34 REPORTER_ASSERT(reporter, 0 == bytes); 36 REPORTER_ASSERT(reporter, stream->isAtEnd()); 39 static void test_filestreams(skiatest::Reporter* reporter, const char* tmpDir) { 47 ERRORF(reporter, "Failed to create tmp file %s\n", path.c_str()); 58 REPORTER_ASSERT(reporter, stream.isValid()) [all...] |
FlateTest.cpp | 38 static void TestFlate(skiatest::Reporter* reporter, SkMemoryStream* testStream, 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() [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); 44 REPORTER_ASSERT(reporter, basename.equals(filename)); 55 REPORTER_ASSERT(reporter, dirname.equals(strippedDir)); 58 REPORTER_ASSERT(reporter, !basename.contains(SkPATH_SEPARATOR)); 62 REPORTER_ASSERT(reporter, basename.equals(filename)); 65 DEF_TEST(OSPath, reporter) { [all...] |
/external/skia/tests/ |
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(GrSurfaceTest, 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...] |
TileGridTest.cpp | 35 static void verifyTileHits(skiatest::Reporter* reporter, SkIRect rect, 43 REPORTER_ASSERT(reporter, grid.tileCount(0, 0) == 45 REPORTER_ASSERT(reporter, grid.tileCount(1, 0) == 47 REPORTER_ASSERT(reporter, grid.tileCount(0, 1) == 49 REPORTER_ASSERT(reporter, grid.tileCount(1, 1) == 53 DEF_TEST(TileGrid_UnalignedQuery, reporter) { 78 REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count()); 79 REPORTER_ASSERT(reporter, rect1 == mockCanvas.fRects[0]); 85 REPORTER_ASSERT(reporter, 1 == mockCanvas.fRects.count()) [all...] |
ShaderOpacityTest.cpp | 13 static void test_bitmap(skiatest::Reporter* reporter) { 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()) [all...] |
DocumentTest.cpp | 8 static void test_empty(skiatest::Reporter* reporter) { 15 REPORTER_ASSERT(reporter, stream.bytesWritten() == 0); 18 static void test_abort(skiatest::Reporter* reporter) { 28 REPORTER_ASSERT(reporter, stream.bytesWritten() == 0); 31 static void test_abortWithFile(skiatest::Reporter* reporter) { 56 REPORTER_ASSERT(reporter, fread(buffer, 1, 1, file) == 0); 60 static void test_file(skiatest::Reporter* reporter) [all...] |
FlateTest.cpp | 31 static void TestFlate(skiatest::Reporter* reporter, SkMemoryStream* testStream, 45 REPORTER_ASSERT(reporter, status); 51 REPORTER_ASSERT(reporter, testData.getLength() == inputSize); 52 REPORTER_ASSERT(reporter, memcmp(testData.getMemoryBase(), 58 REPORTER_ASSERT(reporter, compressed.getOffset() < 1024); 60 REPORTER_ASSERT(reporter, compressed.getOffset() > 1024); 67 REPORTER_ASSERT(reporter, status); 73 REPORTER_ASSERT(reporter, data1->size() == inputSize); 74 REPORTER_ASSERT(reporter, memcmp(testStream->getMemoryBase() [all...] |
CachedDecodingPixelRefTest.cpp | 53 static void compare_bitmaps(skiatest::Reporter* reporter, 56 REPORTER_ASSERT(reporter, b1.empty() == b2.empty()); 57 REPORTER_ASSERT(reporter, b1.width() == b2.width()); 58 REPORTER_ASSERT(reporter, b1.height() == b2.height()); 59 REPORTER_ASSERT(reporter, b1.isNull() == b2.isNull()); 62 REPORTER_ASSERT(reporter, b1.isNull() == b2.isNull()); 66 REPORTER_ASSERT(reporter, NULL != b1.getPixels()); 67 REPORTER_ASSERT(reporter, NULL != b2.getPixels()); 87 REPORTER_ASSERT(reporter, 0 == pixelErrors) [all...] |
MathTest.cpp | 17 static void test_clz(skiatest::Reporter* reporter) { 18 REPORTER_ASSERT(reporter, 32 == SkCLZ(0)); 19 REPORTER_ASSERT(reporter, 31 == SkCLZ(1)); 20 REPORTER_ASSERT(reporter, 1 == SkCLZ(1 << 30)); 21 REPORTER_ASSERT(reporter, 0 == SkCLZ(~0U)); 31 REPORTER_ASSERT(reporter, intri == porta); 51 static void test_floor_value(skiatest::Reporter* reporter, float value) { 54 REPORTER_ASSERT(reporter, std == fast) [all...] |
FontMgrTest.cpp | 15 static void test_font(skiatest::Reporter* reporter) { 19 REPORTER_ASSERT(reporter, NULL != font->getTypeface()); 20 REPORTER_ASSERT(reporter, 24 == font->getSize()); 21 REPORTER_ASSERT(reporter, 1 == font->getScaleX()); 22 REPORTER_ASSERT(reporter, 0 == font->getSkewX()); 23 REPORTER_ASSERT(reporter, SkFont::kA8_MaskType == font->getMaskType()); 30 REPORTER_ASSERT(reporter, 5 == count); 32 REPORTER_ASSERT(reporter, 0 != glyphs[i]); 34 REPORTER_ASSERT(reporter, glyphs[0] != glyphs[1]); // 'h' != 'e [all...] |
MemsetTest.cpp | 12 static void test_chunkalloc(skiatest::Reporter* reporter) { 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()) [all...] |
PathOpsDRectTest.cpp | 41 DEF_TEST(PathOpsDRect, reporter) { 48 REPORTER_ASSERT(reporter, rect.fLeft == SkTMin(line[0].fX, line[1].fX)); 49 REPORTER_ASSERT(reporter, rect.fTop == SkTMin(line[0].fY, line[1].fY)); 50 REPORTER_ASSERT(reporter, rect.fRight == SkTMax(line[0].fX, line[1].fX)); 51 REPORTER_ASSERT(reporter, rect.fBottom == SkTMax(line[0].fY, line[1].fY)); 54 REPORTER_ASSERT(reporter, rect2.fLeft == SkTMin(line[0].fX, line[1].fX)); 55 REPORTER_ASSERT(reporter, rect2.fTop == SkTMin(line[0].fY, line[1].fY)); 56 REPORTER_ASSERT(reporter, rect2.fRight == SkTMax(line[0].fX, line[1].fX)); 57 REPORTER_ASSERT(reporter, rect2.fBottom == SkTMax(line[0].fY, line[1].fY)); 58 REPORTER_ASSERT(reporter, rect.contains(line[0])) [all...] |
StreamTest.cpp | 21 static void test_loop_stream(skiatest::Reporter* reporter, SkStream* stream, 28 REPORTER_ASSERT(reporter, bytes == len); 29 REPORTER_ASSERT(reporter, !memcmp(tmp, src, len)); 34 REPORTER_ASSERT(reporter, 0 == bytes); 36 REPORTER_ASSERT(reporter, stream->isAtEnd()); 39 static void test_filestreams(skiatest::Reporter* reporter, const char* tmpDir) { 47 ERRORF(reporter, "Failed to create tmp file %s\n", path.c_str()); 58 REPORTER_ASSERT(reporter, stream.isValid()) [all...] |
DeferredCanvasTest.cpp | 52 static void TestDeferredCanvasBitmapAccess(skiatest::Reporter* reporter) { 61 REPORTER_ASSERT(reporter, 0xFFFFFFFF == read_pixel(surface, 0, 0)); 66 REPORTER_ASSERT(reporter, 0 == read_pixel(surface, 0, 0)); 105 static void TestDeferredCanvasWritePixelsToSurface(skiatest::Reporter* reporter) { 117 REPORTER_ASSERT(reporter, 0 == surface->fDiscardCount); 118 REPORTER_ASSERT(reporter, 0 == surface->fRetainCount); 122 REPORTER_ASSERT(reporter, 0 == surface->fDiscardCount); 123 REPORTER_ASSERT(reporter, 0 == surface->fRetainCount) [all...] |
PDFPrimitivesTest.cpp | 71 static void CheckObjectOutput(skiatest::Reporter* reporter, SkPDFObject* obj, 80 REPORTER_ASSERT(reporter, directSize == expectedSize); 84 REPORTER_ASSERT(reporter, directSize == buffer.getOffset()); 85 REPORTER_ASSERT(reporter, stream_equals(buffer, 0, expectedData, 98 REPORTER_ASSERT(reporter, 103 REPORTER_ASSERT(reporter, indirectSize == buffer.getOffset()); 104 REPORTER_ASSERT(reporter, stream_equals(buffer, 0, header, headerLen)); 105 REPORTER_ASSERT(reporter, stream_equals(buffer, headerLen, expectedData, 107 REPORTER_ASSERT(reporter, stream_equals(buffer, headerLen + directSize [all...] |