/third_party/skia/tests/ |
H A D | Test.h | 54 #define REPORT_FAILURE(reporter, cond, message) \ 55 reporter->reportFailedWithContext(skiatest::Failure(__FILE__, __LINE__, cond, message)) 59 ReporterContext(Reporter* reporter, const SkString& message) : fReporter(reporter) { in ReporterContext() argument 109 DEF_TEST(TestName, reporter) { 111 REPORTER_ASSERT(reporter, x == 15); 113 REPORTER_ASSERT(reporter, x == 15, "x should be 15"); 116 ERRORF(reporter, "x should be 15, but is %d", x); 195 #define DEF_TEST(name, reporter) \ 199 void test_##name(skiatest::Reporter* reporter, cons [all...] |
H A D | TDPQueueTest.cpp | 14 static void simple_test(skiatest::Reporter* reporter) { in simple_test() argument 16 REPORTER_ASSERT(reporter, 0 == heap.count()); in simple_test() 19 REPORTER_ASSERT(reporter, 1 == heap.count()); in simple_test() 20 REPORTER_ASSERT(reporter, 0 == heap.peek()); in simple_test() 22 REPORTER_ASSERT(reporter, 0 == heap.count()); in simple_test() 26 REPORTER_ASSERT(reporter, 2 == heap.count()); in simple_test() 27 REPORTER_ASSERT(reporter, 0 == heap.peek()); in simple_test() 29 REPORTER_ASSERT(reporter, 1 == heap.count()); in simple_test() 30 REPORTER_ASSERT(reporter, 1 == heap.peek()); in simple_test() 32 REPORTER_ASSERT(reporter, in simple_test() 81 random_test(skiatest::Reporter* reporter) random_test() argument 153 sort_test(skiatest::Reporter* reporter) sort_test() argument [all...] |
H A D | MipMapTest.cpp | 19 DEF_TEST(MipMap, reporter) { in DEF_TEST() 29 REPORTER_ASSERT(reporter, mm->countLevels() == SkMipmap::ComputeLevelCount(width, height)); in DEF_TEST() 30 REPORTER_ASSERT(reporter, !mm->extractLevel(SkSize::Make(SK_Scalar1, SK_Scalar1), in DEF_TEST() 32 REPORTER_ASSERT(reporter, !mm->extractLevel(SkSize::Make(SK_Scalar1 * 2, SK_Scalar1 * 2), in DEF_TEST() 44 REPORTER_ASSERT(reporter, level.fPixmap.addr()); in DEF_TEST() 45 REPORTER_ASSERT(reporter, level.fPixmap.width() > 0); in DEF_TEST() 46 REPORTER_ASSERT(reporter, level.fPixmap.height() > 0); in DEF_TEST() 47 REPORTER_ASSERT(reporter, (int)level.fPixmap.rowBytes() >= level.fPixmap.width() * 4); in DEF_TEST() 50 REPORTER_ASSERT(reporter, level.fPixmap.width() <= prevLevel.fPixmap.width()); in DEF_TEST() 51 REPORTER_ASSERT(reporter, leve in DEF_TEST() 59 test_mipmap_generation(int width, int height, int expectedMipLevelCount, skiatest::Reporter* reporter) test_mipmap_generation() argument [all...] |
H A D | DrawOpAtlasTest.cpp | 133 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(BasicDrawOpAtlas, reporter, ctxInfo) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 161 check(reporter, atlas.get(), 0, 4, 0); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 168 REPORTER_ASSERT(reporter, result); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 169 check(reporter, atlas.get(), 1, 4, 1); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 173 check(reporter, atlas.get(), 1, 4, 1); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 178 REPORTER_ASSERT(reporter, result); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 179 check(reporter, atlas.get(), 2, 4, 2); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 189 check(reporter, atlas.get(), 1, 4, 1); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 197 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(GrAtlasTextOpPreparation, reporter, ctxInfo) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 253 void test_atlas_config(skiatest::Reporter* reporter, in argument [all...] |
H A D | ProxyConversionTest.cpp | 25 skiatest::Reporter* reporter, in make_wrapped_rt() 58 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(PreinstantiatedProxyConversionTest, reporter, ctxInfo) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 69 make_wrapped_rt(proxyProvider, gpu, reporter, kSize, kColorType)); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 73 REPORTER_ASSERT(reporter, rtProxy); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 74 REPORTER_ASSERT(reporter, !rtProxy->asTextureProxy()); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 75 REPORTER_ASSERT(reporter, rtProxy->asRenderTargetProxy() == rtProxy); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 86 REPORTER_ASSERT(reporter, rtProxy); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 88 REPORTER_ASSERT(reporter, tProxy); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 89 REPORTER_ASSERT(reporter, tProxy->asRenderTargetProxy() == rtProxy); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 90 REPORTER_ASSERT(reporter, rtProx in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 23 make_wrapped_rt(GrProxyProvider* provider, GrGpu* gpu, skiatest::Reporter* reporter, const SkISize& size, GrColorType colorType) make_wrapped_rt() argument [all...] |
H A D | WindowRectanglesTest.cpp | 19 DEF_TEST(WindowRectangles, reporter) { in DEF_TEST() 29 REPORTER_ASSERT(reporter, wr.count() == i); in DEF_TEST() 30 REPORTER_ASSERT(reporter, !memcmp(wr.data(), windowData, i * sizeof(SkIRect))); in DEF_TEST() 33 REPORTER_ASSERT(reporter, wr2 == wr); in DEF_TEST() 34 REPORTER_ASSERT(reporter, wr2.count() == wr.count()); in DEF_TEST() 35 REPORTER_ASSERT(reporter, !memcmp(wr2.data(), wr.data(), i * sizeof(SkIRect))); in DEF_TEST() 43 REPORTER_ASSERT(reporter, B == A); in DEF_TEST() 44 REPORTER_ASSERT(reporter, B.data() == A.data()); // Should use copy-on-write. in DEF_TEST() 47 REPORTER_ASSERT(reporter, B.data() != A.data()); in DEF_TEST() 48 REPORTER_ASSERT(reporter, in DEF_TEST() [all...] |
H A D | GrStyledShapeTest.cpp | 548 void testExpectations(skiatest::Reporter* reporter, SelfExpectations expectations) const; 704 void TestCase::testExpectations(skiatest::Reporter* reporter, SelfExpectations expectations) const { in testExpectations() argument 706 REPORTER_ASSERT(reporter, fBaseKey.count()); in testExpectations() 708 REPORTER_ASSERT(reporter, fBaseKey != fAppliedPEKey); in testExpectations() 709 REPORTER_ASSERT(reporter, expectations.fPEHasValidKey == SkToBool(fAppliedPEKey.count())); in testExpectations() 710 REPORTER_ASSERT(reporter, fBaseKey != fAppliedFullKey); in testExpectations() 711 REPORTER_ASSERT(reporter, expectations.fPEHasValidKey == SkToBool(fAppliedFullKey.count())); in testExpectations() 713 REPORTER_ASSERT(reporter, fAppliedPEKey != fAppliedFullKey); in testExpectations() 714 REPORTER_ASSERT(reporter, SkToBool(fAppliedFullKey.count())); in testExpectations() 717 REPORTER_ASSERT(reporter, fBaseKe in testExpectations() 777 test_basic(skiatest::Reporter* reporter, const Geo& geo) test_basic() argument 874 test_scale(skiatest::Reporter* reporter, const Geo& geo) test_scale() argument 945 test_stroke_param_impl(skiatest::Reporter* reporter, const Geo& geo, std::function<void(SkPaint*, T)> setter, T a, T b, bool paramAffectsStroke, bool paramAffectsDashAndStroke) test_stroke_param_impl() argument 1021 test_stroke_param(skiatest::Reporter* reporter, const Geo& geo, std::function<void(SkPaint*, T)> setter, T a, T b) test_stroke_param() argument 1026 test_stroke_cap(skiatest::Reporter* reporter, const Geo& geo) test_stroke_cap() argument 1048 test_stroke_join(skiatest::Reporter* reporter, const Geo& geo) test_stroke_join() argument 1066 test_miter_limit(skiatest::Reporter* reporter, const Geo& geo) test_miter_limit() argument 1104 test_dash_fill(skiatest::Reporter* reporter, const Geo& geo) test_dash_fill() argument 1117 test_null_dash(skiatest::Reporter* reporter, const Geo& geo) test_null_dash() argument 1153 test_path_effect_makes_rrect(skiatest::Reporter* reporter, const Geo& geo) test_path_effect_makes_rrect() argument 1244 test_unknown_path_effect(skiatest::Reporter* reporter, const Geo& geo) test_unknown_path_effect() argument 1290 test_make_hairline_path_effect(skiatest::Reporter* reporter, const Geo& geo) test_make_hairline_path_effect() argument 1350 test_volatile_path(skiatest::Reporter* reporter, const Geo& geo) test_volatile_path() argument 1375 test_path_effect_makes_empty_shape(skiatest::Reporter* reporter, const Geo& geo) test_path_effect_makes_empty_shape() argument 1466 test_path_effect_fails(skiatest::Reporter* reporter, const Geo& geo) test_path_effect_fails() argument 2314 TestCase arc1CW(GrStyledShape::MakeArc(kOval1, 0, 90.f, false, style), reporter); DEF_TEST() local 2315 TestCase arc1CCW(GrStyledShape::MakeArc(kOval1, 90.f, -90.f, false, style), reporter); DEF_TEST() local 2317 TestCase arc1CWWithCenter(GrStyledShape::MakeArc(kOval1, 0, 90.f, true, style), reporter); DEF_TEST() local 2319 reporter); DEF_TEST() local 2321 TestCase arc2CW(GrStyledShape::MakeArc(kOval2, 0, 90.f, false, style), reporter); DEF_TEST() local 2322 TestCase arc2CWWithCenter(GrStyledShape::MakeArc(kOval2, 0, 90.f, true, style), reporter); DEF_TEST() local 2335 TestCase arc3A(GrStyledShape::MakeArc(kOval1, 224.f, 73.f, false, style), reporter); DEF_TEST() local 2336 TestCase arc3B(GrStyledShape::MakeArc(kOval1, 224.f - 360.f, 73.f, false, style), reporter); DEF_TEST() local 2341 TestCase ovalArc(GrStyledShape::MakeArc(kOval1, 150.f, -790.f, false, style), reporter); DEF_TEST() local 2353 reporter); DEF_TEST() local [all...] |
H A D | MaskCacheTest.cpp | 23 static void check_data(skiatest::Reporter* reporter, SkCachedData* data, in check_data() argument 25 REPORTER_ASSERT(reporter, data->testing_only_getRefCnt() == refcnt); in check_data() 26 REPORTER_ASSERT(reporter, data->testing_only_isInCache() == (kInCache == cacheState)); in check_data() 28 REPORTER_ASSERT(reporter, isLocked == (lockedState == kLocked)); in check_data() 31 DEF_TEST(RRectMaskCache, reporter) { in DEF_TEST() 42 REPORTER_ASSERT(reporter, nullptr == data); in DEF_TEST() 51 check_data(reporter, data, 2, kInCache, kLocked); in DEF_TEST() 54 check_data(reporter, data, 1, kInCache, kUnlocked); in DEF_TEST() 58 REPORTER_ASSERT(reporter, data); in DEF_TEST() 59 REPORTER_ASSERT(reporter, dat in DEF_TEST() [all...] |
H A D | GrSubmittedFlushTest.cpp | 29 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(FlushSubmittedProcTest, reporter, ctxInfo) { in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 47 REPORTER_ASSERT(reporter, submittedCount == 0); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 50 REPORTER_ASSERT(reporter, submittedCount == 1); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 51 REPORTER_ASSERT(reporter, submittedSuccess); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 55 REPORTER_ASSERT(reporter, submittedCount == 2); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 56 REPORTER_ASSERT(reporter, submittedSuccess); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 61 REPORTER_ASSERT(reporter, submittedCount == 2); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 64 REPORTER_ASSERT(reporter, submittedCount == 3); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 65 REPORTER_ASSERT(reporter, submittedSuccess); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() 70 REPORTER_ASSERT(reporter, submittedCoun in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() [all...] |
H A D | ShadowTest.cpp | 22 void check_result(skiatest::Reporter* reporter, sk_sp<SkVertices> verts, in check_result() argument 25 ERRORF(reporter, "Expected shadow tessellation to %s but it did not.", in check_result() 30 ERRORF(reporter, "Expected shadow tessellation to generate no vertices but it did."); in check_result() 32 ERRORF(reporter, "Expected shadow tessellation to generate vertices but it didn't."); in check_result() 37 void tessellate_shadow(skiatest::Reporter* reporter, const SkPath& path, const SkMatrix& ctm, in tessellate_shadow() argument 41 check_result(reporter, verts, expectVerts, expectSuccess); in tessellate_shadow() 44 check_result(reporter, verts, expectVerts, expectSuccess); in tessellate_shadow() 47 check_result(reporter, verts, expectVerts, expectSuccess); in tessellate_shadow() 51 check_result(reporter, verts, expectVerts, expectSuccess); in tessellate_shadow() 54 check_result(reporter, vert in tessellate_shadow() 125 check_xformed_bounds(skiatest::Reporter* reporter, const SkPath& path, const SkMatrix& ctm) check_xformed_bounds() argument 172 check_bounds(skiatest::Reporter* reporter, const SkPath& path) check_bounds() argument [all...] |
H A D | PathBuilderTest.cpp | 13 static void is_empty(skiatest::Reporter* reporter, const SkPath& p) { in is_empty() argument 14 REPORTER_ASSERT(reporter, p.getBounds().isEmpty()); in is_empty() 15 REPORTER_ASSERT(reporter, p.countPoints() == 0); in is_empty() 18 DEF_TEST(pathbuilder, reporter) { in DEF_TEST() 21 is_empty(reporter, b.snapshot()); in DEF_TEST() 22 is_empty(reporter, b.detach()); in DEF_TEST() 31 REPORTER_ASSERT(reporter, SkPathPriv::HasComputedBounds(p0)); in DEF_TEST() 32 REPORTER_ASSERT(reporter, SkPathPriv::HasComputedBounds(p1)); in DEF_TEST() 33 REPORTER_ASSERT(reporter, SkPathPriv::HasComputedBounds(p2)); in DEF_TEST() 35 REPORTER_ASSERT(reporter, p in DEF_TEST() [all...] |
H A D | StringTest.cpp | 17 DEF_TEST(String, reporter) { in DEF_TEST() 23 REPORTER_ASSERT(reporter, a.isEmpty()); in DEF_TEST() 24 REPORTER_ASSERT(reporter, a == b && a == c && a == d); in DEF_TEST() 32 REPORTER_ASSERT(reporter, !a.isEmpty()); in DEF_TEST() 33 REPORTER_ASSERT(reporter, a.size() == 5); in DEF_TEST() 34 REPORTER_ASSERT(reporter, a == b && a == c && a == d); in DEF_TEST() 35 REPORTER_ASSERT(reporter, a.equals("hello", 5)); in DEF_TEST() 36 REPORTER_ASSERT(reporter, a.equals("hello")); in DEF_TEST() 37 REPORTER_ASSERT(reporter, !a.equals("help")); in DEF_TEST() 39 REPORTER_ASSERT(reporter, in DEF_TEST() 172 assert_2000_spaces(skiatest::Reporter* reporter, const SkString& str) assert_2000_spaces() argument [all...] |
H A D | RandomTest.cpp | 59 static void test_random_byte(skiatest::Reporter* reporter, int shift) { in test_random_byte() argument 68 REPORTER_ASSERT(reporter, chi_square_test(bins, 10000)); in test_random_byte() 71 static void test_random_float(skiatest::Reporter* reporter) { in test_random_float() argument 78 REPORTER_ASSERT(reporter, 0.0f <= f && f < 1.0f); in test_random_float() 81 REPORTER_ASSERT(reporter, chi_square_test(bins, 10000)); in test_random_float() 86 REPORTER_ASSERT(reporter, 0.0f <= f && f < 1.0f); in test_random_float() 89 REPORTER_ASSERT(reporter, anderson_darling_test(p)); in test_random_float() 102 static double test_single_gorilla(skiatest::Reporter* reporter, int shift) { in test_single_gorilla() argument 148 REPORTER_ASSERT(reporter, 0.01 < p && p < 0.99); in test_single_gorilla() 152 static void test_gorilla(skiatest::Reporter* reporter) { in test_gorilla() argument 162 test_range(skiatest::Reporter* reporter) test_range() argument [all...] |
H A D | ScalarTest.cpp | 15 static void test_roundtoint(skiatest::Reporter* reporter) { in test_roundtoint() argument 20 REPORTER_ASSERT(reporter, 1 == ix); in test_roundtoint() 25 REPORTER_ASSERT(reporter, 0 == ix); in test_roundtoint() 34 static void test_isRectFinite(skiatest::Reporter* reporter) { in test_isRectFinite() argument 73 REPORTER_ASSERT(reporter, gSets[i].fIsFinite == rectIsFinite); in test_isRectFinite() 112 static void test_floatclass(skiatest::Reporter* reporter, float value, FloatClass fc) { in test_floatclass() argument 115 REPORTER_ASSERT(reporter, !!sk_float_isfinite(value) == (fc == kFinite)); in test_floatclass() 116 REPORTER_ASSERT(reporter, !!sk_float_isinf(value) == (fc == kInfinite)); in test_floatclass() 117 REPORTER_ASSERT(reporter, !!sk_float_isnan(value) == (fc == kNaN)); in test_floatclass() 127 static void test_isfinite(skiatest::Reporter* reporter) { in test_isfinite() argument [all...] |
H A D | AAClipTest.cpp | 165 static void test_rgn(skiatest::Reporter* reporter) { in test_rgn() argument 170 REPORTER_ASSERT(reporter, equalsAAClip(rgn)); in test_rgn() 178 REPORTER_ASSERT(reporter, equalsAAClip(rgn)); in test_rgn() 186 REPORTER_ASSERT(reporter, equalsAAClip(rgn)); in test_rgn() 200 static void test_path_bounds(skiatest::Reporter* reporter) { in test_path_bounds() argument 207 REPORTER_ASSERT(reporter, sheight == path.getBounds().height()); in test_path_bounds() 209 REPORTER_ASSERT(reporter, height == clip.getBounds().height()); in test_path_bounds() 221 REPORTER_ASSERT(reporter, sheight == path.getBounds().height()); in test_path_bounds() 223 REPORTER_ASSERT(reporter, teardrop_height == clip.getBounds().height()); in test_path_bounds() 226 static void test_empty(skiatest::Reporter* reporter) { in test_empty() argument 260 test_irect(skiatest::Reporter* reporter) test_irect() argument 303 test_path_with_hole(skiatest::Reporter* reporter) test_path_with_hole() argument 336 test_really_a_rect(skiatest::Reporter* reporter) test_really_a_rect() argument 360 did_dx_affect(skiatest::Reporter* reporter, const SkScalar dx[], size_t count, bool changed) did_dx_affect() argument 383 test_nearly_integral(skiatest::Reporter* reporter) test_nearly_integral() argument 418 test_crbug_422693(skiatest::Reporter* reporter) test_crbug_422693() argument 425 test_huge(skiatest::Reporter* reporter) test_huge() argument [all...] |
H A D | BitmapTest.cpp | 24 static void test_peekpixels(skiatest::Reporter* reporter) { in test_peekpixels() argument 31 REPORTER_ASSERT(reporter, !bm.peekPixels(nullptr)); in test_peekpixels() 32 REPORTER_ASSERT(reporter, !bm.peekPixels(&pmap)); in test_peekpixels() 36 REPORTER_ASSERT(reporter, !bm.peekPixels(nullptr)); in test_peekpixels() 37 REPORTER_ASSERT(reporter, !bm.peekPixels(&pmap)); in test_peekpixels() 41 REPORTER_ASSERT(reporter, bm.peekPixels(nullptr)); in test_peekpixels() 42 REPORTER_ASSERT(reporter, bm.peekPixels(&pmap)); in test_peekpixels() 43 REPORTER_ASSERT(reporter, pmap.info() == bm.info()); in test_peekpixels() 44 REPORTER_ASSERT(reporter, pmap.addr() == bm.getPixels()); in test_peekpixels() 45 REPORTER_ASSERT(reporter, pma in test_peekpixels() 49 test_bigalloc(skiatest::Reporter* reporter) test_bigalloc() argument 61 test_allocpixels(skiatest::Reporter* reporter) test_allocpixels() argument 133 test_bigwidth(skiatest::Reporter* reporter) test_bigwidth() argument 191 test_erasecolor_premul(skiatest::Reporter* reporter, SkColorType ct, SkColor input, SkColor expected) test_erasecolor_premul() argument 307 check_alphas(skiatest::Reporter* reporter, const SkBitmap& bm, bool (*pred)(float expected, float actual), SkColorType ct) check_alphas() argument [all...] |
H A D | M44Test.cpp | 25 DEF_TEST(M44, reporter) { in DEF_TEST() 28 REPORTER_ASSERT(reporter, SkM44(1, 0, 0, 0, in DEF_TEST() 32 REPORTER_ASSERT(reporter, SkM44() == m); in DEF_TEST() 33 REPORTER_ASSERT(reporter, m.invert(&im)); in DEF_TEST() 34 REPORTER_ASSERT(reporter, SkM44() == im); in DEF_TEST() 37 REPORTER_ASSERT(reporter, SkM44(1, 0, 0, 3, in DEF_TEST() 44 REPORTER_ASSERT(reporter, SkM44(f[0], f[4], f[ 8], f[12], in DEF_TEST() 51 REPORTER_ASSERT(reporter, t != m); in DEF_TEST() 52 REPORTER_ASSERT(reporter, t.rc(1,0) == m.rc(0,1)); in DEF_TEST() 54 REPORTER_ASSERT(reporter, t in DEF_TEST() [all...] |
H A D | VkWrapTests.cpp | 34 void wrap_tex_test(skiatest::Reporter* reporter, GrDirectContext* dContext) { in wrap_tex_test() argument 40 ERRORF(reporter, "Could not create backend texture."); in wrap_tex_test() 52 REPORTER_ASSERT(reporter, tex); in wrap_tex_test() 62 REPORTER_ASSERT(reporter, !tex); in wrap_tex_test() 65 REPORTER_ASSERT(reporter, !tex); in wrap_tex_test() 75 REPORTER_ASSERT(reporter, tex); in wrap_tex_test() 78 REPORTER_ASSERT(reporter, !tex); in wrap_tex_test() 88 REPORTER_ASSERT(reporter, tex); in wrap_tex_test() 95 void wrap_rt_test(skiatest::Reporter* reporter, GrDirectContext* dContext) { in wrap_rt_test() argument 108 ERRORF(reporter, "Coul in wrap_rt_test() 140 wrap_trt_test(skiatest::Reporter* reporter, GrDirectContext* dContext) wrap_trt_test() argument [all...] |
H A D | ProxyTest.cpp | 33 static void check_surface(skiatest::Reporter* reporter, in check_surface() argument 37 REPORTER_ASSERT(reporter, proxy->width() == width); in check_surface() 38 REPORTER_ASSERT(reporter, proxy->height() == height); in check_surface() 39 REPORTER_ASSERT(reporter, !proxy->uniqueID().isInvalid()); in check_surface() 40 REPORTER_ASSERT(reporter, proxy->isBudgeted() == budgeted); in check_surface() 43 static void check_rendertarget(skiatest::Reporter* reporter, in check_rendertarget() argument 50 REPORTER_ASSERT(reporter, rtProxy->maxWindowRectangles(caps) == expectedMaxWindowRects); in check_rendertarget() 51 REPORTER_ASSERT(reporter, rtProxy->numSamples() == numSamples); in check_rendertarget() 55 REPORTER_ASSERT(reporter, rtProxy->instantiate(provider)); in check_rendertarget() 58 REPORTER_ASSERT(reporter, rtProx in check_rendertarget() 78 check_texture(skiatest::Reporter* reporter, GrResourceProvider* provider, GrTextureProxy* texProxy, SkBackingFit fit) check_texture() argument [all...] |
H A D | PathOpsAsWindingTest.cpp | 53 DEF_TEST(PathOpsAsWinding, reporter) { in DEF_TEST() 57 REPORTER_ASSERT(reporter, AsWinding(test, &result)); in DEF_TEST() 58 REPORTER_ASSERT(reporter, test == result); in DEF_TEST() 62 REPORTER_ASSERT(reporter, AsWinding(test, &result)); in DEF_TEST() 63 REPORTER_ASSERT(reporter, result.isEmpty()); in DEF_TEST() 64 REPORTER_ASSERT(reporter, result.getFillType() == SkPathFillType::kWinding); in DEF_TEST() 67 REPORTER_ASSERT(reporter, AsWinding(test, &result)); in DEF_TEST() 68 REPORTER_ASSERT(reporter, result.isConvex()); in DEF_TEST() 70 REPORTER_ASSERT(reporter, test == result); in DEF_TEST() 75 REPORTER_ASSERT(reporter, !AsWindin in DEF_TEST() [all...] |
H A D | SerializationTest.cpp | 40 static void TestAlignment(T* testObj, skiatest::Reporter* reporter) { in TestAlignment() argument 44 REPORTER_ASSERT(reporter, SkAlign4(bytesWrittenToMemory) == bytesWrittenToMemory); in TestAlignment() 46 REPORTER_ASSERT(reporter, SkAlign4(bytesReadFromMemory) == bytesReadFromMemory); in TestAlignment() 170 static void TestObjectSerializationNoAlign(T* testObj, skiatest::Reporter* reporter) { in TestObjectSerializationNoAlign() argument 174 REPORTER_ASSERT(reporter, SkAlign4(bytesWritten) == bytesWritten); in TestObjectSerializationNoAlign() 185 REPORTER_ASSERT(reporter, !buffer.isValid()); in TestObjectSerializationNoAlign() 194 REPORTER_ASSERT(reporter, buffer2.isValid() == !testInvalid); in TestObjectSerializationNoAlign() 197 REPORTER_ASSERT(reporter, offsetAfter - offsetBefore == bytesWritten); in TestObjectSerializationNoAlign() 201 static void TestObjectSerialization(T* testObj, skiatest::Reporter* reporter) { in TestObjectSerialization() argument 202 TestObjectSerializationNoAlign<T, false>(testObj, reporter); in TestObjectSerialization() 207 TestFlattenableSerialization(T* testObj, bool shouldSucceed, skiatest::Reporter* reporter) TestFlattenableSerialization() argument 246 TestArraySerialization(T* data, skiatest::Reporter* reporter) TestArraySerialization() argument 270 TestBitmapSerialization(const SkBitmap& validBitmap, const SkBitmap& invalidBitmap, bool shouldSucceed, skiatest::Reporter* reporter) TestBitmapSerialization() argument 301 TestColorFilterSerialization(skiatest::Reporter* reporter) TestColorFilterSerialization() argument 320 compare_bitmaps(skiatest::Reporter* reporter, const SkBitmap& b1, const SkBitmap& b2) compare_bitmaps() argument 366 serialize_and_compare_typeface(sk_sp<SkTypeface> typeface, const char* text, const SkSerialProcs* serial_procs, const SkDeserialProcs* deserial_procs, skiatest::Reporter* reporter) serialize_and_compare_typeface() argument 397 makeDistortableWithNonDefaultAxes(skiatest::Reporter* reporter) makeDistortableWithNonDefaultAxes() argument 425 TestPictureTypefaceSerialization(const SkSerialProcs* serial_procs, const SkDeserialProcs* deserial_procs, skiatest::Reporter* reporter) TestPictureTypefaceSerialization() argument 436 reporter); TestPictureTypefaceSerialization() local 447 deserial_procs, reporter); TestPictureTypefaceSerialization() local 453 TestTypefaceSerialization(skiatest::Reporter* reporter, sk_sp<SkTypeface> typeface) TestTypefaceSerialization() argument 756 TestAnnotationCanvas(skiatest::Reporter* reporter, const AnnotationRec rec[], int count) TestAnnotationCanvas() argument [all...] |
H A D | PathOpsCubicIntersectionTest.cpp | 21 static void standardTestCases(skiatest::Reporter* reporter) { in standardTestCases() argument 68 REPORTER_ASSERT(reporter, xy1.approximatelyEqual(xy2)); in standardTestCases() 70 reporter->bumpTestCount(); in standardTestCases() 390 static void oneOff(skiatest::Reporter* reporter, const CubicPts& cubic1, const CubicPts& cubic2, in oneOff() argument 416 REPORTER_ASSERT(reporter, !coin || intersections.used() >= 2); in oneOff() 430 REPORTER_ASSERT(reporter, xy1.approximatelyEqual(iPt)); in oneOff() 431 REPORTER_ASSERT(reporter, xy2.approximatelyEqual(iPt)); in oneOff() 432 REPORTER_ASSERT(reporter, xy1.approximatelyEqual(xy2)); in oneOff() 434 reporter->bumpTestCount(); in oneOff() 437 static void oneOff(skiatest::Reporter* reporter, in argument 443 newOneOff(skiatest::Reporter* reporter, int outer, int inner) newOneOff() argument 449 testsOneOff(skiatest::Reporter* reporter, int index) testsOneOff() argument 455 oneOffTests(skiatest::Reporter* reporter) oneOffTests() argument 470 CubicIntersection_RandTest(skiatest::Reporter* reporter) CubicIntersection_RandTest() argument 642 selfOneOff(skiatest::Reporter* reporter, int setIdx) selfOneOff() argument [all...] |
/third_party/skia/experimental/skrive/tests/ |
H A D | JsonReader.cpp | 13 DEF_TEST(SkRive_JsonReader, reporter) { in DEF_TEST() 32 REPORTER_ASSERT(reporter, sr); in DEF_TEST() 33 REPORTER_ASSERT(reporter, sr->readUInt32("version") == 24); in DEF_TEST() 36 REPORTER_ASSERT(reporter, ab.type() == StreamReader::BlockType::kArtboards); in DEF_TEST() 37 REPORTER_ASSERT(reporter, sr->readLength16() == 1); in DEF_TEST() 41 REPORTER_ASSERT(reporter, ab.type() == StreamReader::BlockType::kActorArtboard); in DEF_TEST() 42 REPORTER_ASSERT(reporter, sr->readString("name").equals("artboard 1")); in DEF_TEST() 43 REPORTER_ASSERT(reporter, sr->readV2("translation") == (SkV2{24,42})); in DEF_TEST() 44 REPORTER_ASSERT(reporter, sr->readFloat("width" ) == 500); in DEF_TEST() 45 REPORTER_ASSERT(reporter, s in DEF_TEST() [all...] |
/third_party/skia/experimental/sktext/tests/ |
H A D | SelectableText.cpp | 94 UNIX_ONLY_TEST(SkText_SelectableText_Bounds, reporter) { in UNIX_ONLY_TEST() 111 REPORTER_ASSERT(reporter, selectableText->countLines() == 5); in UNIX_ONLY_TEST() 117 REPORTER_ASSERT(reporter, boxLine.fBounds.contains(box) || box.isEmpty()); in UNIX_ONLY_TEST() 118 REPORTER_ASSERT(reporter, left <= box.fLeft); in UNIX_ONLY_TEST() 133 REPORTER_ASSERT(reporter, boxLine.fTrailingSpacesEnd == testLine.trailingSpaces.fEnd); in UNIX_ONLY_TEST() 134 REPORTER_ASSERT(reporter, boxLine.fTextEnd == trailingSpaces); in UNIX_ONLY_TEST() 135 REPORTER_ASSERT(reporter, boxLine.fTextRange == testLine.lineText); in UNIX_ONLY_TEST() 136 REPORTER_ASSERT(reporter, boxLine.fIndex == lineIndex); in UNIX_ONLY_TEST() 137 REPORTER_ASSERT(reporter, boxLine.fIsHardBreak == testLine.hardBreak); in UNIX_ONLY_TEST() 138 REPORTER_ASSERT(reporter, boxLin in UNIX_ONLY_TEST() [all...] |
/third_party/skia/modules/sksg/tests/ |
H A D | SGTest.cpp | 27 static void check_inval(skiatest::Reporter* reporter, const sk_sp<sksg::Node>& root, in check_inval() argument 40 REPORTER_ASSERT(reporter, bbox == expected_bounds); in check_inval() 41 REPORTER_ASSERT(reporter, ic.bounds() == expected_inval_bounds); in check_inval() 45 REPORTER_ASSERT(reporter, expected_damage->size() == damage_count); in check_inval() 54 REPORTER_ASSERT(reporter, r1 == r2); in check_inval() 64 static void check_hittest(skiatest::Reporter* reporter, const sk_sp<sksg::RenderNode>& root, in check_hittest() argument 72 REPORTER_ASSERT(reporter, tst.node.get() == node); in check_hittest() 76 static void inval_test1(skiatest::Reporter* reporter) { in inval_test1() argument 91 check_inval(reporter, root, in inval_test1() 96 check_hittest(reporter, roo in inval_test1() 221 inval_test2(skiatest::Reporter* reporter) inval_test2() argument 288 inval_test3(skiatest::Reporter* reporter) inval_test3() argument 340 inval_group_remove(skiatest::Reporter* reporter) inval_group_remove() argument [all...] |