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

summaryrefslogtreecommitdiffhomepage
path: root/projects
diff options
context:
space:
mode:
authorMartin Hořeňovský2019-10-05 13:23:14 +0200
committerMartin Hořeňovský2019-10-05 13:38:22 +0200
commitc38a5caa2ebf0738e468f419c4d3ed857001cfb0 (patch)
treefef36a4eae6c503c1f07cd4c37b58c52fc6ee507 /projects
parentebc5609484b357c3a047aa8418ef5dd320209239 (diff)
downloadcatch3-c38a5caa2ebf0738e468f419c4d3ed857001cfb0.tar.gz
Allow full range of target ULP values for the ULPMatcher
Previously it was limited to roughly 2 billion ULPs, rather than the roughly 2^64 possible ones.
Diffstat (limited to 'projects')
-rw-r--r--projects/SelfTest/Baselines/compact.sw.approved.txt3
-rw-r--r--projects/SelfTest/Baselines/console.std.approved.txt2
-rw-r--r--projects/SelfTest/Baselines/console.sw.approved.txt7
-rw-r--r--projects/SelfTest/Baselines/junit.sw.approved.txt2
-rw-r--r--projects/SelfTest/Baselines/xml.sw.approved.txt18
-rw-r--r--projects/SelfTest/UsageTests/Matchers.tests.cpp3
6 files changed, 11 insertions, 24 deletions
diff --git a/projects/SelfTest/Baselines/compact.sw.approved.txt b/projects/SelfTest/Baselines/compact.sw.approved.txt
index 7c93c160..e7919287 100644
--- a/projects/SelfTest/Baselines/compact.sw.approved.txt
+++ b/projects/SelfTest/Baselines/compact.sw.approved.txt
@@ -408,7 +408,6 @@ Matchers.tests.cpp:<line number>: passed: 1., WithinAbs(2., 0.5) || WithinULP(1.
Matchers.tests.cpp:<line number>: passed: WithinAbs(1., 0.)
Matchers.tests.cpp:<line number>: passed: WithinAbs(1., -1.), std::domain_error
Matchers.tests.cpp:<line number>: passed: WithinULP(1., 0)
-Matchers.tests.cpp:<line number>: passed: WithinULP(1., -1), std::domain_error
Matchers.tests.cpp:<line number>: passed: 1.f, WithinAbs(1.f, 0) for: 1.0f is within 0.0 of 1.0
Matchers.tests.cpp:<line number>: passed: 0.f, WithinAbs(1.f, 1) for: 0.0f is within 1.0 of 1.0
Matchers.tests.cpp:<line number>: passed: 0.f, !WithinAbs(1.f, 0.99f) for: 0.0f not is within 0.9900000095 of 1.0
@@ -429,7 +428,7 @@ Matchers.tests.cpp:<line number>: passed: 1.f, WithinAbs(2.f, 0.5) || WithinULP(
Matchers.tests.cpp:<line number>: passed: WithinAbs(1.f, 0.f)
Matchers.tests.cpp:<line number>: passed: WithinAbs(1.f, -1.f), std::domain_error
Matchers.tests.cpp:<line number>: passed: WithinULP(1.f, 0)
-Matchers.tests.cpp:<line number>: passed: WithinULP(1.f, -1), std::domain_error
+Matchers.tests.cpp:<line number>: passed: WithinULP(1.f, static_cast<uint64_t>(-1)), std::domain_error
Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
Generators.tests.cpp:<line number>: passed: i % 2 == 0 for: 0 == 0
diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt
index a729420d..7eaae82c 100644
--- a/projects/SelfTest/Baselines/console.std.approved.txt
+++ b/projects/SelfTest/Baselines/console.std.approved.txt
@@ -1381,5 +1381,5 @@ due to unexpected exception with message:
===============================================================================
test cases: 300 | 226 passed | 70 failed | 4 failed as expected
-assertions: 1565 | 1413 passed | 131 failed | 21 failed as expected
+assertions: 1564 | 1412 passed | 131 failed | 21 failed as expected
diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt
index 83ca294e..4415fe06 100644
--- a/projects/SelfTest/Baselines/console.sw.approved.txt
+++ b/projects/SelfTest/Baselines/console.sw.approved.txt
@@ -3020,9 +3020,6 @@ Matchers.tests.cpp:<line number>: PASSED:
Matchers.tests.cpp:<line number>: PASSED:
REQUIRE_NOTHROW( WithinULP(1., 0) )
-Matchers.tests.cpp:<line number>: PASSED:
- REQUIRE_THROWS_AS( WithinULP(1., -1), std::domain_error )
-
-------------------------------------------------------------------------------
Floating point matchers: float
Margin
@@ -3149,7 +3146,7 @@ Matchers.tests.cpp:<line number>: PASSED:
REQUIRE_NOTHROW( WithinULP(1.f, 0) )
Matchers.tests.cpp:<line number>: PASSED:
- REQUIRE_THROWS_AS( WithinULP(1.f, -1), std::domain_error )
+ REQUIRE_THROWS_AS( WithinULP(1.f, static_cast<uint64_t>(-1)), std::domain_error )
-------------------------------------------------------------------------------
Generators -- adapters
@@ -12503,5 +12500,5 @@ Misc.tests.cpp:<line number>: PASSED:
===============================================================================
test cases: 300 | 210 passed | 86 failed | 4 failed as expected
-assertions: 1582 | 1413 passed | 148 failed | 21 failed as expected
+assertions: 1581 | 1412 passed | 148 failed | 21 failed as expected
diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt
index ae12fb07..b16b6638 100644
--- a/projects/SelfTest/Baselines/junit.sw.approved.txt
+++ b/projects/SelfTest/Baselines/junit.sw.approved.txt
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuitesloose text artifact
>
- <testsuite name="<exe-name>" errors="17" failures="132" tests="1583" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
+ <testsuite name="<exe-name>" errors="17" failures="132" tests="1582" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
<properties>
<property name="filters" value="~[!nonportable]~[!benchmark]~[approvals]"/>
<property name="random-seed" value="1"/>
diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt
index 06d15a4e..65e5f4bd 100644
--- a/projects/SelfTest/Baselines/xml.sw.approved.txt
+++ b/projects/SelfTest/Baselines/xml.sw.approved.txt
@@ -3630,15 +3630,7 @@ Nor would this
WithinULP(1., 0)
</Expanded>
</Expression>
- <Expression success="true" type="REQUIRE_THROWS_AS" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
- <Original>
- WithinULP(1., -1), std::domain_error
- </Original>
- <Expanded>
- WithinULP(1., -1), std::domain_error
- </Expanded>
- </Expression>
- <OverallResults successes="4" failures="0" expectedFailures="0"/>
+ <OverallResults successes="3" failures="0" expectedFailures="0"/>
</Section>
<OverallResult success="true"/>
</TestCase>
@@ -3815,10 +3807,10 @@ Nor would this
</Expression>
<Expression success="true" type="REQUIRE_THROWS_AS" filename="projects/<exe-name>/UsageTests/Matchers.tests.cpp" >
<Original>
- WithinULP(1.f, -1), std::domain_error
+ WithinULP(1.f, static_cast&lt;uint64_t>(-1)), std::domain_error
</Original>
<Expanded>
- WithinULP(1.f, -1), std::domain_error
+ WithinULP(1.f, static_cast&lt;uint64_t>(-1)), std::domain_error
</Expanded>
</Expression>
<OverallResults successes="4" failures="0" expectedFailures="0"/>
@@ -14880,7 +14872,7 @@ loose text artifact
</Section>
<OverallResult success="true"/>
</TestCase>
- <OverallResults successes="1413" failures="149" expectedFailures="21"/>
+ <OverallResults successes="1412" failures="149" expectedFailures="21"/>
</Group>
- <OverallResults successes="1413" failures="148" expectedFailures="21"/>
+ <OverallResults successes="1412" failures="148" expectedFailures="21"/>
</Catch>
diff --git a/projects/SelfTest/UsageTests/Matchers.tests.cpp b/projects/SelfTest/UsageTests/Matchers.tests.cpp
index 6f9c3cb4..8e9148b3 100644
--- a/projects/SelfTest/UsageTests/Matchers.tests.cpp
+++ b/projects/SelfTest/UsageTests/Matchers.tests.cpp
@@ -372,7 +372,7 @@ namespace { namespace MatchersTests {
REQUIRE_THROWS_AS(WithinAbs(1.f, -1.f), std::domain_error);
REQUIRE_NOTHROW(WithinULP(1.f, 0));
- REQUIRE_THROWS_AS(WithinULP(1.f, -1), std::domain_error);
+ REQUIRE_THROWS_AS(WithinULP(1.f, static_cast<uint64_t>(-1)), std::domain_error);
}
}
@@ -408,7 +408,6 @@ namespace { namespace MatchersTests {
REQUIRE_THROWS_AS(WithinAbs(1., -1.), std::domain_error);
REQUIRE_NOTHROW(WithinULP(1., 0));
- REQUIRE_THROWS_AS(WithinULP(1., -1), std::domain_error);
}
}