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

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest/UsageTests/Condition.tests.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-06-20 16:25:57 +0200
committerMartin Hořeňovský2021-06-20 19:15:02 +0200
commitbf61a418cbc4d3b430e3d258c5287780944ad505 (patch)
treef93f4136d7b2a14cc4fdecc8a90ad9415ead4c17 /tests/SelfTest/UsageTests/Condition.tests.cpp
parent849002aec0271b0a8356162134ea78731e84454a (diff)
downloadcatch3-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.cpp47
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