parent
1eb42eed97
commit
a575536abe
5 changed files with 68 additions and 13 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue