mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
test: fix memory leak.
these duplicates are not unique_ptr, should be taken care. @Issue: https://github.com/Samsung/thorvg/issues/995
This commit is contained in:
parent
b956b0a7e0
commit
fd74e0fae8
2 changed files with 3 additions and 3 deletions
|
@ -24,7 +24,7 @@
|
||||||
#include "catch.hpp"
|
#include "catch.hpp"
|
||||||
|
|
||||||
using namespace tvg;
|
using namespace tvg;
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
TEST_CASE("Custom Transformation", "[tvgPaint]")
|
TEST_CASE("Custom Transformation", "[tvgPaint]")
|
||||||
{
|
{
|
||||||
|
@ -158,7 +158,7 @@ TEST_CASE("Duplication", "[tvgPaint]")
|
||||||
REQUIRE(shape->composite(move(comp), CompositeMethod::ClipPath) == Result::Success);
|
REQUIRE(shape->composite(move(comp), CompositeMethod::ClipPath) == Result::Success);
|
||||||
|
|
||||||
//Duplication
|
//Duplication
|
||||||
auto dup = shape->duplicate();
|
auto dup = unique_ptr<Shape>((Shape*)shape->duplicate());
|
||||||
REQUIRE(dup);
|
REQUIRE(dup);
|
||||||
|
|
||||||
//Compare properties
|
//Compare properties
|
||||||
|
|
|
@ -264,7 +264,7 @@ TEST_CASE("Picture Duplication", "[tvgPicture]")
|
||||||
REQUIRE(picture->load(TEST_DIR"/logo.svg") == Result::Success);
|
REQUIRE(picture->load(TEST_DIR"/logo.svg") == Result::Success);
|
||||||
REQUIRE(picture->size(100, 100) == Result::Success);
|
REQUIRE(picture->size(100, 100) == Result::Success);
|
||||||
|
|
||||||
auto dup = picture->duplicate();
|
auto dup = unique_ptr<Picture>((Picture*)picture->duplicate());
|
||||||
REQUIRE(dup);
|
REQUIRE(dup);
|
||||||
|
|
||||||
float w, h;
|
float w, h;
|
||||||
|
|
Loading…
Add table
Reference in a new issue