-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Add unit tests for OptionButton
#93824
Conversation
0a74b3f
to
365aa47
Compare
553ee02
to
9917ee9
Compare
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.
Looks good to me, I leave it up to you whether you want to implement my suggestions. We can always extend the test cases later.
TEST_CASE("[SceneTree][OptionButton] Complex structure") { | ||
OptionButton *test_opt = memnew(OptionButton); | ||
|
||
SUBCASE("Creating a complex structure and checking getters") { |
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.
You should add some checks for the item text getters as well.
In addtion, it would be nice if you could also add some checks for item tooltips.
Hi @Geometror 👋 Thanks for the review. I request this is merged as is! 😅 My availability is going to be limited for a while. Anyone else - please feel free to tag in after 😄 |
9917ee9
to
59ef627
Compare
59ef627
to
f0b5abb
Compare
f0b5abb
to
80ba71c
Compare
OptionButton
Thanks! |
Further to #43440, this PR contains unit tests for
OptionButton
intests/scene/test_option_button.h
.false
)OptionButton
Additionally, an
#include
directive was added totests/test_main.cpp
, for this new file, to pick up the tests.