Remove the ill-conceived compilation perf tests using real tests

This commit is contained in:
Martin Hořeňovský
2021-06-20 16:25:57 +02:00
parent 849002aec0
commit bf61a418cb
19 changed files with 2228 additions and 2276 deletions

View File

@@ -20,31 +20,28 @@ using Catch::Approx;
#include <limits>
#include <cstdint>
namespace { namespace ConditionTests {
namespace {
#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 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;
}
};
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; }
inline const char* returnsConstNull(){ return nullptr; }
inline char* returnsNull(){ return nullptr; }
#endif
} // 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