File 0003-fix-tests.patch of Package rlottie
From aac4e224d7c9609e9eb86adcd2aa151f4c200635 Mon Sep 17 00:00:00 2001
From: Zephyr Lykos <git@mochaa.ws>
Date: Fri, 3 Nov 2023 11:46:04 +0800
Subject: [PATCH] tests: Fix frame counting
This change was introduced in 12facb81733fc9bc00c4a40704c32cc353b45e64
but didn't reflected in the unit tests.
---
test/test_lottieanimation.cpp | 2 +-
test/test_lottieanimation_capi.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/test/test_lottieanimation.cpp b/test/test_lottieanimation.cpp
index 6647946a..5f8d5b83 100644
--- a/test/test_lottieanimation.cpp
+++ b/test/test_lottieanimation.cpp
@@ -26,7 +26,7 @@ TEST_F(AnimationTest, loadFromFile_N) {
TEST_F(AnimationTest, loadFromFile) {
ASSERT_TRUE(animation != nullptr);
- ASSERT_EQ(animation->totalFrame(), 30);
+ ASSERT_EQ(animation->totalFrame(), 31);
size_t width, height;
animation->size(width, height);
ASSERT_EQ(width, 500);
diff --git a/test/test_lottieanimation_capi.cpp b/test/test_lottieanimation_capi.cpp
index a0d24ef1..78482266 100644
--- a/test/test_lottieanimation_capi.cpp
+++ b/test/test_lottieanimation_capi.cpp
@@ -26,7 +26,7 @@ TEST_F(AnimationCApiTest, loadFromFile_N) {
TEST_F(AnimationCApiTest, loadFromFile) {
ASSERT_TRUE(animation);
- ASSERT_EQ(lottie_animation_get_totalframe(animation), 30);
+ ASSERT_EQ(lottie_animation_get_totalframe(animation), 31);
size_t width, height;
lottie_animation_get_size(animation, &width, &height);
ASSERT_EQ(width, 500);