Lines Matching defs:test

333     void test(std::array<GrColor, 4> expected, PreTestFn preTestCallback = nullptr) {
350 void test(GrColor expected, PreTestFn preTestCallback = nullptr) {
351 this->test({expected, expected, expected, expected}, preTestCallback);
383 void test(std::array<GrColor, 4> expected, PreTestFn preTestCallback = nullptr) {
400 void test(GrColor expected, PreTestFn preTestCallback = nullptr) {
401 this->test({expected, expected, expected, expected}, preTestCallback);
437 effect.test({0xFF000000, 0xFF0000FF, 0xFF00FF00, 0xFF00FFFF});
442 effect.test(0xFFBF4000);
444 effect.test(0x7F0000FF); // Tests that we don't clamp to valid premul
449 effect.test(0xFFBF4000);
451 effect.test(0x7F0000FF); // Tests that we don't clamp to valid premul
458 effect.test({0xFF000000, 0xFF00007F, 0xFF007F00, 0xFF007F7F},
463 effect.test({0xFF000000, 0xFF0000FF, 0xFF00FF00, 0xFF00FFFF});
467 effect.test({0xFF000000, 0xFF0000FF, 0xFF00FF00, 0xFF00FFFF});
469 effect.test({0xFF000000, 0xFF0000FF, 0xFF00FF00, 0xFF00FFFF});
473 effect.test({0xFF000000, 0xFF0000FF, 0xFF00FF00, 0xFF00FFFF});
476 effect.test({0xFF000000, 0xFF0000FF, 0xFF00FF00, 0xFF00FFFF});
486 effect.test(0xFF00FFFF,
495 effect.test({0xFF0000FF, 0xFF00FF00, 0xFFFF0000, 0xFFFFFFFF});
501 effect.test({0xFF0000FF, 0xFFFF0000, 0xFF00FF00, 0xFFFFFFFF});
508 effect.test(0xFF00FF00);
517 effect.test(0xFF00FFFF);
543 effect.test(0xFFBF4000);
545 effect.test(0x7F0000FF); // We don't clamp here either
551 effect.test(0xFFBF4000);
553 effect.test(0x7F0000FF); // We don't clamp here either
557 effect.test(0xFFFFFFFF);
562 effect.test(0xFF888888);
573 effect.test({0xFF0000FF, 0xFF00FF00, 0xFFFF0000, 0xFFFFFFFF});
576 // The expected outputs are the exact inverse of the previous test.
578 effect.test({0x00FFFF00, 0x00FF00FF, 0x0000FFFF, 0x00000000});
582 effect.test(0x00000000);
584 effect.test(0xFFFFFFFF);
594 effect.test(0xFF00FFFF,
600 effect.test(0xFF00FFFF,
608 effect.test({0xFF000080, 0xFF008000, 0xFF800000, 0xFF808080},
617 effect.test(0xFF0000FF);
620 effect.test(0xFF00FF00);
623 effect.test(0xFFFF0000);
626 effect.test(0xFFFFFFFF);
632 effect.test(0xFF452301);
639 effect.test({0xFF4523FF, 0xFF45FF01, 0xFFFF2301, 0xFFFFFFFF},
647 effect.test({0xFF4523FF, 0xFF45FF01, 0xFFFF2301, 0xFFFFFFFF},
790 effect.test(0xFF00407F, [](SkCanvas*, SkPaint* paint) {
822 // This test verifies that we detect calls to sample where the coords are the same as those
829 auto test = [&](const char* src, bool expectExplicit, bool expectReferencesSampleCoords) {
847 test("half4 main(float2 xy) { return child.eval(xy); }", false, false);
849 test("half4 main(float2 xy) { return child.eval(xy) + sin(xy.x); }", false, true);
854 test("half4 main(float2 xy) { return child.eval(float2(0, 0)); }", true, false);
856 test("half4 main(float2 xy) { return child.eval(xy * 0.5); }", true, true);
858 test("half4 main(float2 xy) { xy *= 2; return child.eval(xy); }", true, true);
860 test("void adjust(inout float2 xy) { xy *= 2; }"
867 test("half4 main(float2 xy) { half4 c = child.eval(xy); xy *= 2; return c; }", true, true);
869 test("half4 main(float2 xy) { float2 p = xy; return child.eval(p); }", true, true);
871 test("half4 helper(float2 xy) { return child.eval(xy); }"