mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
test/lottie: added the slot resetting use case
This commit is contained in:
parent
3cb8c4311d
commit
62e7f0a7c6
2 changed files with 24 additions and 2 deletions
|
@ -46,8 +46,19 @@ TEST_CASE("Lottie Slot", "[capiLottie]")
|
|||
//Slot override before loaded
|
||||
REQUIRE(tvg_lottie_animation_override(animation, slotJson) == TVG_RESULT_INSUFFICIENT_CONDITION);
|
||||
|
||||
//Slot override
|
||||
//Animation load
|
||||
REQUIRE(tvg_picture_load(picture, TEST_DIR"/lottieslot.json") == TVG_RESULT_SUCCESS);
|
||||
|
||||
//Slot revert before overriding
|
||||
REQUIRE(tvg_lottie_animation_override(animation, nullptr) == TVG_RESULT_SUCCESS);
|
||||
|
||||
//Slot override
|
||||
REQUIRE(tvg_lottie_animation_override(animation, slotJson) == TVG_RESULT_SUCCESS);
|
||||
|
||||
//Slot revert
|
||||
REQUIRE(tvg_lottie_animation_override(animation, nullptr) == TVG_RESULT_SUCCESS);
|
||||
|
||||
//Slot override after reverting
|
||||
REQUIRE(tvg_lottie_animation_override(animation, slotJson) == TVG_RESULT_SUCCESS);
|
||||
|
||||
//Slot override with invalid JSON
|
||||
|
|
|
@ -47,8 +47,19 @@ TEST_CASE("Lottie Slot", "[tvgLottie]")
|
|||
//Slot override before loaded
|
||||
REQUIRE(animation->override(slotJson) == Result::InsufficientCondition);
|
||||
|
||||
//Slot override
|
||||
//Animation load
|
||||
REQUIRE(picture->load(TEST_DIR"/lottieslot.json") == Result::Success);
|
||||
|
||||
//Slot revert before overriding
|
||||
REQUIRE(animation->override(nullptr) == Result::Success);
|
||||
|
||||
//Slot override
|
||||
REQUIRE(animation->override(slotJson) == Result::Success);
|
||||
|
||||
//Slot revert
|
||||
REQUIRE(animation->override(nullptr) == Result::Success);
|
||||
|
||||
//Slot override after reverting
|
||||
REQUIRE(animation->override(slotJson) == Result::Success);
|
||||
|
||||
//Slot override with invalid JSON
|
||||
|
|
Loading…
Add table
Reference in a new issue