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

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest/UsageTests/Approx.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/Approx.tests.cpp
parent849002aec0271b0a8356162134ea78731e84454a (diff)
downloadcatch3-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.cpp17
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