mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 03:43:28 +01:00
Removed more C++98/03 compatibility
This commit is contained in:
parent
5c8ea03cc8
commit
79650e44f4
@ -19,8 +19,6 @@
|
||||
#ifdef __clang__
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wpadded"
|
||||
# pragma clang diagnostic ignored "-Wc++98-compat"
|
||||
# pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
|
||||
#endif
|
||||
|
||||
namespace Catch {
|
||||
|
@ -7,7 +7,6 @@
|
||||
*/
|
||||
#ifdef __clang__
|
||||
# pragma clang diagnostic ignored "-Wpadded"
|
||||
# pragma clang diagnostic ignored "-Wc++98-compat"
|
||||
#endif
|
||||
|
||||
#include "catch.hpp"
|
||||
|
@ -29,12 +29,6 @@ TEST_CASE( "toString(enum w/operator<<)", "[toString][enum]" ) {
|
||||
CHECK( Catch::toString(e1) == "E2{1}" );
|
||||
}
|
||||
|
||||
#if defined(CATCH_CPP11_OR_GREATER)
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wc++98-compat"
|
||||
#endif
|
||||
|
||||
// Enum class without user-provided stream operator
|
||||
enum class EnumClass1 { EnumClass1Value0, EnumClass1Value1 };
|
||||
|
||||
@ -69,8 +63,3 @@ TEST_CASE( "toString(enum class w/operator<<)", "[toString][enum][enumClass][c++
|
||||
CHECK( Catch::toString(e3) == "Unknown enum value 10" );
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#endif // CATCH_CPP11_OR_GREATER
|
||||
|
||||
|
@ -1,11 +1,6 @@
|
||||
#include "catch.hpp"
|
||||
|
||||
#ifdef CATCH_CPP11_OR_GREATER
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wc++98-compat"
|
||||
#endif
|
||||
#include <tuple>
|
||||
|
||||
TEST_CASE( "tuple<>", "[toString][tuple][c++11][.]" )
|
||||
{
|
||||
@ -42,18 +37,10 @@ TEST_CASE( "tuple<tuple<int>,tuple<>,float>", "[toString][tuple][c++11][.]" )
|
||||
CHECK( "{ { 42 }, { }, 1.2f }" == Catch::toString(value) );
|
||||
}
|
||||
|
||||
#ifdef CATCH_CONFIG_CPP11_NULLPTR
|
||||
TEST_CASE( "tuple<nullptr,int,const char *>", "[toString][tuple][c++11][.]" )
|
||||
{
|
||||
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
|
||||
#endif
|
||||
|
||||
#endif /* #ifdef CATCH_CPP11_OR_GREATER */
|
||||
|
||||
|
@ -23,16 +23,6 @@ TEST_CASE( "vector<string> -> toString", "[toString][vector]" )
|
||||
REQUIRE( Catch::toString(vv) == "{ \"hello\", \"world\" }" );
|
||||
}
|
||||
|
||||
#if defined(CATCH_CPP11_OR_GREATER)
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wc++98-compat"
|
||||
#endif
|
||||
|
||||
/*
|
||||
Note: These tests *can* be made to work with C++ < 11, but the
|
||||
allocator is a lot more work...
|
||||
*/
|
||||
namespace {
|
||||
/* Minimal Allocator */
|
||||
template<typename T>
|
||||
@ -70,8 +60,3 @@ TEST_CASE( "vec<vec<string,alloc>> -> toString", "[toString][vector,allocator][c
|
||||
v.push_back( inner { "world" } );
|
||||
REQUIRE( Catch::toString(v) == "{ { \"hello\" }, { \"world\" } }" );
|
||||
}
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
#endif // CATCH_CPP11_OR_GREATER
|
||||
|
@ -14,11 +14,6 @@
|
||||
|
||||
#include "catch.hpp"
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic ignored "-Wc++98-compat"
|
||||
#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
|
||||
#endif
|
||||
|
||||
namespace Catch
|
||||
{
|
||||
template<>
|
||||
@ -385,8 +380,6 @@ TEST_CASE( "pointer to class", "[Tricky]" )
|
||||
REQUIRE( p == 0 );
|
||||
}
|
||||
|
||||
#ifdef CATCH_CONFIG_CPP11_NULLPTR
|
||||
|
||||
#include <memory>
|
||||
|
||||
TEST_CASE( "null_ptr", "[Tricky][c++11][.]" )
|
||||
@ -395,8 +388,6 @@ TEST_CASE( "null_ptr", "[Tricky][c++11][.]" )
|
||||
REQUIRE(ptr.get() == nullptr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
TEST_CASE( "X/level/0/a", "[Tricky]" ) { SUCCEED(""); }
|
||||
TEST_CASE( "X/level/0/b", "[Tricky][fizz]" ){ SUCCEED(""); }
|
||||
TEST_CASE( "X/level/1/a", "[Tricky]" ) { SUCCEED(""); }
|
||||
|
Loading…
Reference in New Issue
Block a user