diff --git a/test/capi/capiLottie.cpp b/test/capi/capiLottie.cpp index fd99bb4e..3f8013d4 100644 --- a/test/capi/capiLottie.cpp +++ b/test/capi/capiLottie.cpp @@ -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 diff --git a/test/testLottie.cpp b/test/testLottie.cpp index f578475f..7e9d7404 100644 --- a/test/testLottie.cpp +++ b/test/testLottie.cpp @@ -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