mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00

committed by
Martin Hořeňovský

parent
1eb42eed97
commit
a575536abe
@@ -116,6 +116,18 @@ TEST_CASE("Static arrays are convertible to string", "[toString]") {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CATCH_CONFIG_CPP17_STRING_VIEW
|
||||
|
||||
TEST_CASE("String views are stringified like other strings", "[toString][approvals]") {
|
||||
std::string_view view{"abc"};
|
||||
CHECK(Catch::Detail::stringify(view) == R"("abc")");
|
||||
|
||||
std::string_view arr[] { view };
|
||||
CHECK(Catch::Detail::stringify(arr) == R"({ "abc" })");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
|
||||
struct WhatException : std::exception {
|
||||
|
Reference in New Issue
Block a user