test: dashed stroke with offset added

This commit is contained in:
Mira Grudzinska 2023-08-18 23:54:02 +02:00 committed by Hermet Park
parent 8c0fc2b25a
commit cb36c25aff

View file

@ -169,13 +169,17 @@ TEST_CASE("Stroking", "[tvgShape]")
float dashPattern2[3] = {1.0f, 1.5f, 2.22f};
REQUIRE(shape->stroke(dashPattern2, 3) == Result::Success);
REQUIRE(shape->stroke(dashPattern2, 3, 4.5) == Result::Success);
const float* dashPattern3;
float offset;
REQUIRE(shape->strokeDash(nullptr) == 3);
REQUIRE(shape->strokeDash(&dashPattern3) == 3);
REQUIRE(shape->strokeDash(&dashPattern3, &offset) == 3);
REQUIRE(dashPattern3[0] == 1.0f);
REQUIRE(dashPattern3[1] == 1.5f);
REQUIRE(dashPattern3[2] == 2.22f);
REQUIRE(offset == 4.5f);
REQUIRE(shape->stroke(nullptr, 0) == Result::Success);