mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
test/capi: fixed a memory leak
This commit is contained in:
parent
4423fcf58a
commit
687db16646
1 changed files with 3 additions and 6 deletions
|
@ -242,14 +242,11 @@ TEST_CASE("Paint Clipping", "[capiPaint]")
|
||||||
Tvg_Paint* paint = tvg_shape_new();
|
Tvg_Paint* paint = tvg_shape_new();
|
||||||
REQUIRE(paint);
|
REQUIRE(paint);
|
||||||
|
|
||||||
Tvg_Paint* target = tvg_shape_new();
|
|
||||||
REQUIRE(target);
|
|
||||||
|
|
||||||
REQUIRE(tvg_paint_set_clip(paint, NULL) == TVG_RESULT_SUCCESS);
|
REQUIRE(tvg_paint_set_clip(paint, NULL) == TVG_RESULT_SUCCESS);
|
||||||
|
|
||||||
Tvg_Paint* target2 = tvg_shape_new();
|
Tvg_Paint* target = tvg_shape_new();
|
||||||
REQUIRE(target2);
|
REQUIRE(target);
|
||||||
REQUIRE(tvg_paint_set_clip(paint, target2) == TVG_RESULT_SUCCESS);
|
REQUIRE(tvg_paint_set_clip(paint, target) == TVG_RESULT_SUCCESS);
|
||||||
|
|
||||||
REQUIRE(tvg_paint_set_clip(paint, NULL) == TVG_RESULT_SUCCESS);
|
REQUIRE(tvg_paint_set_clip(paint, NULL) == TVG_RESULT_SUCCESS);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue