Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/projects/SelfTest/ToStringTuple.cpp
diff options
context:
space:
mode:
authorPhil Nash2015-07-01 07:33:27 +0100
committerPhil Nash2015-07-01 07:33:27 +0100
commit805de43a3dfc14b03927afb66d3856e9a72eaa64 (patch)
tree8da45605387b80b4128cd1e3b465d7280f89ed90 /projects/SelfTest/ToStringTuple.cpp
parent3b18d9e962835100d7e12ac80d22882e408e40dc (diff)
downloadcatch3-805de43a3dfc14b03927afb66d3856e9a72eaa64.tar.gz
Use CATCH_NULL instead of NULL
- expands to nullptr if CATCH_CONFIG_CPP11_NULLPTR is defined (see #444)
Diffstat (limited to 'projects/SelfTest/ToStringTuple.cpp')
-rw-r--r--projects/SelfTest/ToStringTuple.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/projects/SelfTest/ToStringTuple.cpp b/projects/SelfTest/ToStringTuple.cpp
index d1ab02f2..80e54530 100644
--- a/projects/SelfTest/ToStringTuple.cpp
+++ b/projects/SelfTest/ToStringTuple.cpp
@@ -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