mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00
test: corrected wrong implementation.
identifier should have been methods.
This commit is contained in:
parent
364a51d0eb
commit
374e4ab82f
2 changed files with 13 additions and 13 deletions
|
@ -36,7 +36,7 @@ TEST_CASE("Animation Basic", "[tvgAnimation]")
|
|||
REQUIRE(animation);
|
||||
|
||||
auto picture = animation->picture();
|
||||
REQUIRE(picture->identifier == Picture::identifier);
|
||||
REQUIRE(picture->identifier() == Picture::identifier());
|
||||
|
||||
//Negative cases
|
||||
REQUIRE(animation->frame(0.0f) == Result::InsufficientCondition);
|
||||
|
@ -55,7 +55,7 @@ TEST_CASE("Animation Lottie", "[tvgAnimation]")
|
|||
REQUIRE(animation);
|
||||
|
||||
auto picture = animation->picture();
|
||||
REQUIRE(picture->identifier == Picture::identifier);
|
||||
REQUIRE(picture->identifier() == Picture::identifier());
|
||||
|
||||
REQUIRE(picture->load(TEST_DIR"/invalid.json") == Result::InvalidArguments);
|
||||
REQUIRE(picture->load(TEST_DIR"/test.json") == Result::Success);
|
||||
|
@ -76,7 +76,7 @@ TEST_CASE("Animation Lottie2", "[tvgAnimation]")
|
|||
REQUIRE(animation);
|
||||
|
||||
auto picture = animation->picture();
|
||||
REQUIRE(picture->identifier == Picture::identifier);
|
||||
REQUIRE(picture->identifier() == Picture::identifier());
|
||||
|
||||
REQUIRE(picture->load(TEST_DIR"/test2.json") == Result::Success);
|
||||
|
||||
|
@ -93,7 +93,7 @@ TEST_CASE("Animation Lottie3", "[tvgAnimation]")
|
|||
REQUIRE(animation);
|
||||
|
||||
auto picture = animation->picture();
|
||||
REQUIRE(picture->identifier == Picture::identifier);
|
||||
REQUIRE(picture->identifier() == Picture::identifier());
|
||||
|
||||
REQUIRE(picture->load(TEST_DIR"/test3.json") == Result::Success);
|
||||
|
||||
|
@ -108,7 +108,7 @@ TEST_CASE("Animation Lottie4", "[tvgAnimation]")
|
|||
REQUIRE(animation);
|
||||
|
||||
auto picture = animation->picture();
|
||||
REQUIRE(picture->identifier == Picture::identifier);
|
||||
REQUIRE(picture->identifier() == Picture::identifier());
|
||||
|
||||
REQUIRE(picture->load(TEST_DIR"/test4.json") == Result::Success);
|
||||
|
||||
|
@ -123,7 +123,7 @@ TEST_CASE("Animation Lottie5", "[tvgAnimation]")
|
|||
REQUIRE(animation);
|
||||
|
||||
auto picture = animation->picture();
|
||||
REQUIRE(picture->identifier == Picture::identifier);
|
||||
REQUIRE(picture->identifier() == Picture::identifier());
|
||||
|
||||
REQUIRE(picture->load(TEST_DIR"/test5.json") == Result::Success);
|
||||
|
||||
|
@ -138,7 +138,7 @@ TEST_CASE("Animation Lottie6", "[tvgAnimation]")
|
|||
REQUIRE(animation);
|
||||
|
||||
auto picture = animation->picture();
|
||||
REQUIRE(picture->identifier == Picture::identifier);
|
||||
REQUIRE(picture->identifier() == Picture::identifier());
|
||||
|
||||
REQUIRE(picture->load(TEST_DIR"/test6.json") == Result::Success);
|
||||
|
||||
|
@ -153,7 +153,7 @@ TEST_CASE("Animation Lottie7", "[tvgAnimation]")
|
|||
REQUIRE(animation);
|
||||
|
||||
auto picture = animation->picture();
|
||||
REQUIRE(picture->identifier == Picture::identifier);
|
||||
REQUIRE(picture->identifier() == Picture::identifier());
|
||||
|
||||
REQUIRE(picture->load(TEST_DIR"/test7.json") == Result::Success);
|
||||
|
||||
|
@ -168,7 +168,7 @@ TEST_CASE("Animation Lottie8", "[tvgAnimation]")
|
|||
REQUIRE(animation);
|
||||
|
||||
auto picture = animation->picture();
|
||||
REQUIRE(picture->identifier == Picture::identifier);
|
||||
REQUIRE(picture->identifier() == Picture::identifier());
|
||||
|
||||
REQUIRE(picture->load(TEST_DIR"/test8.json") == Result::Success);
|
||||
|
||||
|
@ -183,7 +183,7 @@ TEST_CASE("Animation Lottie9", "[tvgAnimation]")
|
|||
REQUIRE(animation);
|
||||
|
||||
auto picture = animation->picture();
|
||||
REQUIRE(picture->identifier == Picture::identifier);
|
||||
REQUIRE(picture->identifier() == Picture::identifier());
|
||||
|
||||
REQUIRE(picture->load(TEST_DIR"/test9.json") == Result::Success);
|
||||
|
||||
|
@ -198,7 +198,7 @@ TEST_CASE("Animation Segment", "[tvgAnimation]")
|
|||
REQUIRE(animation);
|
||||
|
||||
auto picture = animation->picture();
|
||||
REQUIRE(picture->identifier == Picture::identifier);
|
||||
REQUIRE(picture->identifier() == Picture::identifier());
|
||||
|
||||
float begin, end;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ TEST_CASE("Lottie Slot", "[tvgLottie]")
|
|||
REQUIRE(animation);
|
||||
|
||||
auto picture = animation->picture();
|
||||
REQUIRE(picture->identifier == Picture::identifier);
|
||||
REQUIRE(picture->identifier() == Picture::identifier());
|
||||
|
||||
const char* slotJson = R"({"gradient_fill":{"p":{"a":0,"k":[0,0.1,0.1,0.2,1,1,0.1,0.2,0.1,1]}}})";
|
||||
|
||||
|
@ -78,7 +78,7 @@ TEST_CASE("Lottie Marker", "[tvgLottie]")
|
|||
REQUIRE(animation);
|
||||
|
||||
auto picture = animation->picture();
|
||||
REQUIRE(picture->identifier == Picture::identifier);
|
||||
REQUIRE(picture->identifier() == Picture::identifier());
|
||||
|
||||
//Set marker name before loaded
|
||||
REQUIRE(animation->segment("sectionC") == Result::InsufficientCondition);
|
||||
|
|
Loading…
Add table
Reference in a new issue