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/Approx.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/Approx.tests.cpp')
| -rw-r--r-- | tests/SelfTest/UsageTests/Approx.tests.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/tests/SelfTest/UsageTests/Approx.tests.cpp b/tests/SelfTest/UsageTests/Approx.tests.cpp index f0d8919c..96f9706d 100644 --- a/tests/SelfTest/UsageTests/Approx.tests.cpp +++ b/tests/SelfTest/UsageTests/Approx.tests.cpp @@ -13,13 +13,9 @@ using Catch::Approx; -namespace { namespace ApproxTests { - -#ifndef APPROX_TEST_HELPERS_INCLUDED // Don't compile this more than once per TU -#define APPROX_TEST_HELPERS_INCLUDED - - inline double divide( double a, double b ) { - return a/b; +namespace { + static double divide(double a, double b) { + return a / b; } class StrongDoubleTypedef { @@ -30,11 +26,10 @@ namespace { namespace ApproxTests { explicit operator double() const { return d_; } }; - inline std::ostream& operator<<( std::ostream& os, StrongDoubleTypedef td ) { + static std::ostream& operator<<(std::ostream& os, StrongDoubleTypedef td) { return os << "StrongDoubleTypedef(" << static_cast<double>(td) << ")"; } - -#endif +} // end unnamed namespace using namespace Catch::literals; @@ -214,5 +209,3 @@ TEST_CASE( "Comparison with explicitly convertible types", "[Approx]" ) REQUIRE(Approx(11.0) >= td); } - -}} // namespace ApproxTests |