-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Upgrade client active object mgr tests to Catch2 #14565
Merged
appgurueu
merged 12 commits into
minetest:master
from
JosiahWI:feat/catch2-client-active-object-mgr-tests
May 22, 2024
Merged
Upgrade client active object mgr tests to Catch2 #14565
appgurueu
merged 12 commits into
minetest:master
from
JosiahWI:feat/catch2-client-active-object-mgr-tests
May 22, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In addition to invoking Catch2's test runner after Minetest's homemade runner, this refactors the tests to follow the DRY principle, and gives them expressive names and clear assertions. Catch2 is already bundled with Minetest, so there are no added dependencies.
This switches infostream to rawstream so that test runner output is displayed, and returns the correct boolean depending on the results. The tests are now found by setting the configuration instead of invoking the command line parser.
Co-Authored-By: Lars Müller <appgurulars@gmx.de>
JosiahWI
force-pushed
the
feat/catch2-client-active-object-mgr-tests
branch
from
May 14, 2024 16:21
45860f7
to
c2bd250
Compare
appgurueu
approved these changes
May 14, 2024
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.
appgurueu
added
One approval ✅ ◻️
Roadmap
The change matches an item on the current roadmap.
Feature ✨
PRs that add or enhance a feature
Code quality
labels
May 14, 2024
sfan5
reviewed
May 15, 2024
sfan5
changed the title
Upgrade client active object mgr tests to Catch2 (reviving #13609)
Upgrade client active object mgr tests to Catch2
May 15, 2024
sfan5
reviewed
May 16, 2024
sfan5
reviewed
May 16, 2024
It's necessary to flush stderr before printing to stdout in adition to flushing stdout before printing to stderr, to make sure all output is ordered correctly.
sfan5
approved these changes
May 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Code quality
Feature ✨
PRs that add or enhance a feature
Roadmap
The change matches an item on the current roadmap.
>= Two approvals ✅ ✅
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In addition to invoking Catch2's test runner after Minetest's homemade runner, this refactors the tests to have expressive names and removes some redundant or useless checks.
The Catch2 runner is invoked after Minetest's runner is finished, and "Catch2 test results:" will be printed out directly before invoking the Catch2 runner.
Part of #13610
To do
Ready for Review.
How to test
Confirm that the results of
minetest --run-unittests
look correct.