-
Notifications
You must be signed in to change notification settings - Fork 371
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
maint: Use Catch2 instead of doctest #3618
Merged
Merged
Changes from 23 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
c08aaee
maint: Use Catch2 instead of doctest
mathbunnyru 1666415
Use REQUIRE_THROWS_AS
mathbunnyru 41c0003
Do not use tags
mathbunnyru bb7f592
Merge branch 'main' into catch2_ext
mathbunnyru a6d9613
WIP
mathbunnyru 983f0a4
More WIP
mathbunnyru 21a772d
More WIP
mathbunnyru 87ad29d
More WIP
mathbunnyru 5f69b0d
Fix wrongdoing of regexp
mathbunnyru a3e196a
More fixes
mathbunnyru 5f61e06
Remove doctest array printer
mathbunnyru b2c117a
More fixes
mathbunnyru 26b4d3e
More fixes
mathbunnyru 1ab211d
Fixes
mathbunnyru f1d10ac
Better section name
mathbunnyru ed34065
Fix regex wrongdoing
mathbunnyru 8950c37
Delete doctest-printer
mathbunnyru 49e456f
Replace some REQUIREs with CHECKs
mathbunnyru 1bf9ce0
Revert
mathbunnyru f392b7a
Add catch-printer/conda_url.hpp back
mathbunnyru bad03cd
Remove doctest completely
mathbunnyru f75b6e4
Add implementation for std::byte Catch output
mathbunnyru c37538f
Better catch-utils
mathbunnyru e6fb1a7
Merge branch 'main' into catch2_ext
mathbunnyru a4160d0
Merge branch 'main' into catch2_ext
mathbunnyru File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN | ||
#define CATCH_CONFIG_MAIN | ||
|
||
#include <doctest/doctest.h> | ||
#include <catch2/catch_all.hpp> |
22 changes: 22 additions & 0 deletions
22
libmamba/ext/solv-cpp/tests/src/msvc_catch_string_view.cpp
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifdef _WIN32 | ||
|
||
// Catch compiled on `conda-forge` for MSVC doesn't support outputting `string_view`. | ||
// So we have to define StringMaker for it ourselves. | ||
// The declaration is present though, so this only causes link errors. | ||
|
||
#include <string> | ||
#include <string_view> | ||
|
||
#include <catch2/catch_tostring.hpp> | ||
|
||
namespace Catch | ||
{ | ||
|
||
std::string StringMaker<std::string_view>::convert(std::string_view str) | ||
{ | ||
return std::string(str); | ||
} | ||
|
||
} | ||
|
||
#endif |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
This allows us to enable nice output for many std types without having to write implementations ourselves (this is from Catch's source code):