diff options
| author | Martin Hořeňovský | 2021-06-20 16:25:57 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2021-06-20 19:15:02 +0200 |
| commit | bf61a418cbc4d3b430e3d258c5287780944ad505 (patch) | |
| tree | f93f4136d7b2a14cc4fdecc8a90ad9415ead4c17 /tests/SelfTest/UsageTests/Condition.tests.cpp | |
| parent | 849002aec0271b0a8356162134ea78731e84454a (diff) | |
| download | catch3-bf61a418cbc4d3b430e3d258c5287780944ad505.tar.gz | |
Remove the ill-conceived compilation perf tests using real tests
Diffstat (limited to 'tests/SelfTest/UsageTests/Condition.tests.cpp')
| -rw-r--r-- | tests/SelfTest/UsageTests/Condition.tests.cpp | 47 |
1 files changed, 21 insertions, 26 deletions
diff --git a/tests/SelfTest/UsageTests/Condition.tests.cpp b/tests/SelfTest/UsageTests/Condition.tests.cpp index 7c6a1d73..167752e1 100644 --- a/tests/SelfTest/UsageTests/Condition.tests.cpp +++ b/tests/SelfTest/UsageTests/Condition.tests.cpp @@ -20,31 +20,28 @@ using Catch::Approx; #include <limits> #include <cstdint> -namespace { namespace ConditionTests { - -#ifndef CONDITION_TEST_HELPERS_INCLUDED // Don't compile this more than once per TU -#define CONDITION_TEST_HELPERS_INCLUDED - -struct TestData { - int int_seven = 7; - std::string str_hello = "hello"; - float float_nine_point_one = 9.1f; - double double_pi = 3.1415926535; -}; - -struct TestDef { - TestDef& operator + ( const std::string& ) { - return *this; - } - TestDef& operator[]( const std::string& ) { - return *this; - } -}; - -inline const char* returnsConstNull(){ return nullptr; } -inline char* returnsNull(){ return nullptr; } +namespace { -#endif + struct TestData { + int int_seven = 7; + std::string str_hello = "hello"; + float float_nine_point_one = 9.1f; + double double_pi = 3.1415926535; + }; + + struct TestDef { + TestDef& operator + (const std::string&) { + return *this; + } + TestDef& operator[](const std::string&) { + return *this; + } + }; + + static const char* returnsConstNull() { return nullptr; } + static char* returnsNull() { return nullptr; } + +} // end unnamed namespace // The "failing" tests all use the CHECK macro, which continues if the specific test fails. // This allows us to see all results, even if an earlier check fails @@ -330,5 +327,3 @@ TEST_CASE( "'Not' checks that should fail", "[.][failing]" ) CHECK( !(1 == 1) ); CHECK_FALSE( 1 == 1 ); } - -}} // namespace ConditionTests |