mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
test: resolve compiler warnings on msvc.
warning C4305: 'argument': truncation from 'double' to 'float'
This commit is contained in:
parent
2abfa98bae
commit
0cd256f99c
2 changed files with 3 additions and 3 deletions
|
@ -260,8 +260,8 @@ TEST_CASE("Stroke trim", "[capiStrokeTrim]")
|
||||||
REQUIRE(tvg_shape_get_stroke_trim(NULL, &begin, &end, &simultaneous) == TVG_RESULT_INVALID_ARGUMENT);
|
REQUIRE(tvg_shape_get_stroke_trim(NULL, &begin, &end, &simultaneous) == TVG_RESULT_INVALID_ARGUMENT);
|
||||||
REQUIRE(tvg_shape_get_stroke_trim(paint, &begin, &end, &simultaneous) == TVG_RESULT_SUCCESS);
|
REQUIRE(tvg_shape_get_stroke_trim(paint, &begin, &end, &simultaneous) == TVG_RESULT_SUCCESS);
|
||||||
|
|
||||||
REQUIRE(tvg_shape_set_stroke_trim(NULL, 0.33, 0.66, false) == TVG_RESULT_INVALID_ARGUMENT);
|
REQUIRE(tvg_shape_set_stroke_trim(NULL, 0.33f, 0.66f, false) == TVG_RESULT_INVALID_ARGUMENT);
|
||||||
REQUIRE(tvg_shape_set_stroke_trim(paint, 0.33, 0.66, false) == TVG_RESULT_SUCCESS);
|
REQUIRE(tvg_shape_set_stroke_trim(paint, 0.33f, 0.66f, false) == TVG_RESULT_SUCCESS);
|
||||||
REQUIRE(tvg_shape_get_stroke_trim(paint, &begin, &end, &simultaneous) == TVG_RESULT_SUCCESS);
|
REQUIRE(tvg_shape_get_stroke_trim(paint, &begin, &end, &simultaneous) == TVG_RESULT_SUCCESS);
|
||||||
REQUIRE(begin == Approx(0.33).margin(0.000001));
|
REQUIRE(begin == Approx(0.33).margin(0.000001));
|
||||||
REQUIRE(end == Approx(0.66).margin(0.000001));
|
REQUIRE(end == Approx(0.66).margin(0.000001));
|
||||||
|
|
|
@ -209,7 +209,7 @@ TEST_CASE("Stroking", "[tvgShape]")
|
||||||
REQUIRE(begin == Approx(0.0).margin(0.000001));
|
REQUIRE(begin == Approx(0.0).margin(0.000001));
|
||||||
REQUIRE(end == Approx(1.0).margin(0.000001));
|
REQUIRE(end == Approx(1.0).margin(0.000001));
|
||||||
|
|
||||||
REQUIRE(shape->strokeTrim(0.3, 0.88, false) == Result::Success);
|
REQUIRE(shape->strokeTrim(0.3f, 0.88f, false) == Result::Success);
|
||||||
REQUIRE(shape->strokeTrim(&begin, &end) == false);
|
REQUIRE(shape->strokeTrim(&begin, &end) == false);
|
||||||
REQUIRE(begin == Approx(0.3).margin(0.000001));
|
REQUIRE(begin == Approx(0.3).margin(0.000001));
|
||||||
REQUIRE(end == Approx(0.88).margin(0.000001));
|
REQUIRE(end == Approx(0.88).margin(0.000001));
|
||||||
|
|
Loading…
Add table
Reference in a new issue