mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-07 21:23:32 +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"
|
||||
|
||||
using namespace tvg;
|
||||
|
||||
using namespace std;
|
||||
|
||||
TEST_CASE("Custom Transformation", "[tvgPaint]")
|
||||
{
|
||||
|
@ -158,7 +158,7 @@ TEST_CASE("Duplication", "[tvgPaint]")
|
|||
REQUIRE(shape->composite(move(comp), CompositeMethod::ClipPath) == Result::Success);
|
||||
|
||||
//Duplication
|
||||
auto dup = shape->duplicate();
|
||||
auto dup = unique_ptr<Shape>((Shape*)shape->duplicate());
|
||||
REQUIRE(dup);
|
||||
|
||||
//Compare properties
|
||||
|
|
|
@ -264,7 +264,7 @@ TEST_CASE("Picture Duplication", "[tvgPicture]")
|
|||
REQUIRE(picture->load(TEST_DIR"/logo.svg") == Result::Success);
|
||||
REQUIRE(picture->size(100, 100) == Result::Success);
|
||||
|
||||
auto dup = picture->duplicate();
|
||||
auto dup = unique_ptr<Picture>((Picture*)picture->duplicate());
|
||||
REQUIRE(dup);
|
||||
|
||||
float w, h;
|
||||
|
|
Loading…
Add table
Reference in a new issue