mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-23 13:09:28 +00:00
Use CATCH_NULL instead of NULL
- expands to nullptr if CATCH_CONFIG_CPP11_NULLPTR is defined (see #444)
This commit is contained in:
parent
3b18d9e962
commit
805de43a3d
25 changed files with 112 additions and 101 deletions
|
@ -42,12 +42,14 @@ TEST_CASE( "tuple<tuple<int>,tuple<>,float>", "[toString][tuple]" )
|
|||
CHECK( "{ { 42 }, { }, 1.2f }" == Catch::toString(value) );
|
||||
}
|
||||
|
||||
#ifdef CATCH_CONFIG_CPP11_NULLPTR
|
||||
TEST_CASE( "tuple<nullptr,int,const char *>", "[toString][tuple]" )
|
||||
{
|
||||
typedef std::tuple<std::nullptr_t,int,const char *> type;
|
||||
type value { nullptr, 42, "Catch me" };
|
||||
CHECK( "{ nullptr, 42, \"Catch me\" }" == Catch::toString(value) );
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue