-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Updated test code for the lottie slot #2030
Conversation
43c3acb
to
d7ae7c3
Compare
|
||
auto picture = animation->picture(); | ||
REQUIRE(picture->identifier == Picture::identifier); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, you might wanna add a negative test at this point,
override() before load()
Tvg_Identifier id = TVG_IDENTIFIER_UNDEF; | ||
REQUIRE(tvg_paint_get_identifier(picture, &id) == TVG_RESULT_SUCCESS); | ||
REQUIRE(id == TVG_IDENTIFIER_PICTURE); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably, you might wanna add a negative test at this point,
override() before load()
REQUIRE(id == TVG_IDENTIFIER_PICTURE); | ||
|
||
REQUIRE(tvg_picture_load(picture, TEST_DIR"/lottieslot.json") == TVG_RESULT_SUCCESS); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, maybe a call override() here with an invalid slot data.
c33e9ab
to
49cd9af
Compare
49cd9af
to
1db241c
Compare
test/testLottie.cpp
Outdated
REQUIRE(animation->override(slotJson) == Result::Success); | ||
|
||
//Slot override with invalid JSON | ||
REQUIRE(animation->override("") == Result::InsufficientCondition); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be InvalidArgument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we can change it if you think it makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree, #2033
This patch adds the test case for the recently introduced lottie slot API. @Issues: thorvg#2029
1db241c
to
4608af8
Compare
This patch adds the test case for the recently introduced lottie slot API
Issue: #2029