mirror of
https://git.suyu.dev/suyu/dynarmic.git
synced 2026-02-18 22:42:58 +00:00
externals: Update catch2 to v3.5.0
Merge commit 'ba06a404d1437c73ed3ba100d04a217fa69545b8'
This commit is contained in:
@@ -255,10 +255,24 @@ std::ostream& operator<<(std::ostream& out, helper_1436<T1, T2> const& helper) {
|
||||
#pragma clang diagnostic ignored "-Wunused-value"
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
template <typename T>
|
||||
struct custom_index_op {
|
||||
constexpr custom_index_op( std::initializer_list<T> ) {}
|
||||
constexpr T operator[]( size_t ) { return T{}; }
|
||||
#if defined( __cpp_multidimensional_subscript ) && \
|
||||
__cpp_multidimensional_subscript >= 202110L
|
||||
constexpr T operator[]( size_t, size_t, size_t ) const noexcept {
|
||||
return T{};
|
||||
}
|
||||
#endif
|
||||
};
|
||||
}
|
||||
|
||||
TEST_CASE("CAPTURE can deal with complex expressions involving commas", "[messages][capture]") {
|
||||
CAPTURE(std::vector<int>{1, 2, 3}[0, 1, 2],
|
||||
std::vector<int>{1, 2, 3}[(0, 1)],
|
||||
std::vector<int>{1, 2, 3}[0]);
|
||||
CAPTURE(custom_index_op<int>{1, 2, 3}[0, 1, 2],
|
||||
custom_index_op<int>{1, 2, 3}[(0, 1)],
|
||||
custom_index_op<int>{1, 2, 3}[0]);
|
||||
CAPTURE((helper_1436<int, int>{12, -12}),
|
||||
(helper_1436<int, int>(-12, 12)));
|
||||
CAPTURE( (1, 2), (2, 3) );
|
||||
@@ -285,3 +299,14 @@ TEST_CASE("CAPTURE parses string and character constants", "[messages][capture]"
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
TEST_CASE( "INFO and UNSCOPED_INFO can stream multiple arguments",
|
||||
"[messages][info][.failing]" ) {
|
||||
INFO( "This info"
|
||||
<< " has multiple"
|
||||
<< " parts." );
|
||||
UNSCOPED_INFO( "This unscoped info"
|
||||
<< " has multiple"
|
||||
<< " parts." );
|
||||
FAIL( "Show infos!" );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user