diff options
| author | Martin Hořeňovský | 2017-08-30 11:40:29 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2017-08-30 12:11:41 +0200 |
| commit | 61d2c375ddf765ee2f88f8a3b92f517ea380abb8 (patch) | |
| tree | 8e7755eba4c14729c8247d81f41295a34c46bfef /projects | |
| parent | 07211cea9c5d916f590a3791e845b1c83c8db81e (diff) | |
| download | catch3-61d2c375ddf765ee2f88f8a3b92f517ea380abb8.tar.gz | |
Add evaluation specialization for T* and long
Fixes #1005
Diffstat (limited to 'projects')
| -rw-r--r-- | projects/SelfTest/Baselines/console.std.approved.txt | 4 | ||||
| -rw-r--r-- | projects/SelfTest/Baselines/console.sw.approved.txt | 23 | ||||
| -rw-r--r-- | projects/SelfTest/Baselines/console.swa4.approved.txt | 23 | ||||
| -rw-r--r-- | projects/SelfTest/Baselines/junit.sw.approved.txt | 3 | ||||
| -rw-r--r-- | projects/SelfTest/Baselines/xml.sw.approved.txt | 23 | ||||
| -rw-r--r-- | projects/SelfTest/DecompositionTests.cpp | 7 |
6 files changed, 74 insertions, 9 deletions
diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt index 50991312..11df0389 100644 --- a/projects/SelfTest/Baselines/console.std.approved.txt +++ b/projects/SelfTest/Baselines/console.std.approved.txt @@ -1020,6 +1020,6 @@ with expansion: "{?}" == "1" =============================================================================== -test cases: 183 | 132 passed | 47 failed | 4 failed as expected -assertions: 882 | 765 passed | 96 failed | 21 failed as expected +test cases: 184 | 133 passed | 47 failed | 4 failed as expected +assertions: 884 | 767 passed | 96 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt index ae2f6928..14fdcd9d 100644 --- a/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/projects/SelfTest/Baselines/console.sw.approved.txt @@ -15,6 +15,25 @@ with message: yay ------------------------------------------------------------------------------- +#1005: Comparing pointer to int and long (NULL can be either on various + systems) +------------------------------------------------------------------------------- +DecompositionTests.cpp:<line number> +............................................................................... + +DecompositionTests.cpp:<line number>: +PASSED: + REQUIRE( fptr == 0 ) +with expansion: + 0 == 0 + +DecompositionTests.cpp:<line number>: +PASSED: + REQUIRE( fptr == 0l ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- #748 - captures with unexpected exceptions outside assertions ------------------------------------------------------------------------------- @@ -7535,6 +7554,6 @@ MiscTests.cpp:<line number>: PASSED: =============================================================================== -test cases: 183 | 129 passed | 50 failed | 4 failed as expected -assertions: 884 | 761 passed | 102 failed | 21 failed as expected +test cases: 184 | 130 passed | 50 failed | 4 failed as expected +assertions: 886 | 763 passed | 102 failed | 21 failed as expected diff --git a/projects/SelfTest/Baselines/console.swa4.approved.txt b/projects/SelfTest/Baselines/console.swa4.approved.txt index bdacd9cb..06c24e86 100644 --- a/projects/SelfTest/Baselines/console.swa4.approved.txt +++ b/projects/SelfTest/Baselines/console.swa4.approved.txt @@ -15,6 +15,25 @@ with message: yay ------------------------------------------------------------------------------- +#1005: Comparing pointer to int and long (NULL can be either on various + systems) +------------------------------------------------------------------------------- +DecompositionTests.cpp:<line number> +............................................................................... + +DecompositionTests.cpp:<line number>: +PASSED: + REQUIRE( fptr == 0 ) +with expansion: + 0 == 0 + +DecompositionTests.cpp:<line number>: +PASSED: + REQUIRE( fptr == 0l ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- #748 - captures with unexpected exceptions outside assertions ------------------------------------------------------------------------------- @@ -218,6 +237,6 @@ ConditionTests.cpp:<line number>: FAILED: CHECK_FALSE( true ) =============================================================================== -test cases: 8 | 5 passed | 1 failed | 2 failed as expected -assertions: 24 | 17 passed | 4 failed | 3 failed as expected +test cases: 9 | 6 passed | 1 failed | 2 failed as expected +assertions: 26 | 19 passed | 4 failed | 3 failed as expected diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt index e49e19e4..15fa38f0 100644 --- a/projects/SelfTest/Baselines/junit.sw.approved.txt +++ b/projects/SelfTest/Baselines/junit.sw.approved.txt @@ -1,8 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <testsuitesloose text artifact > - <testsuite name="<exe-name>" errors="15" failures="88" tests="885" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> + <testsuite name="<exe-name>" errors="15" failures="88" tests="887" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}"> <testcase classname="<exe-name>.global" name="# A test name that starts with a #" time="{duration}"/> + <testcase classname="<exe-name>.global" name="#1005: Comparing pointer to int and long (NULL can be either on various systems)" time="{duration}"/> <testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/outside assertions" time="{duration}"> <error type="TEST_CASE"> expected exception diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt index 68607f0b..7f2b4b03 100644 --- a/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -4,6 +4,25 @@ <TestCase name="# A test name that starts with a #" filename="projects/<exe-name>/MiscTests.cpp" > <OverallResult success="true"/> </TestCase> + <TestCase name="#1005: Comparing pointer to int and long (NULL can be either on various systems)" tags="[Decomposition]" filename="projects/<exe-name>/DecompositionTests.cpp" > + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/DecompositionTests.cpp" > + <Original> + fptr == 0 + </Original> + <Expanded> + 0 == 0 + </Expanded> + </Expression> + <Expression success="true" type="REQUIRE" filename="projects/<exe-name>/DecompositionTests.cpp" > + <Original> + fptr == 0l + </Original> + <Expanded> + 0 == 0 + </Expanded> + </Expression> + <OverallResult success="true"/> + </TestCase> <TestCase name="#748 - captures with unexpected exceptions" tags="[!shouldfail][!throws][.][failing]" filename="projects/<exe-name>/ExceptionTests.cpp" > <Section name="outside assertions" filename="projects/<exe-name>/ExceptionTests.cpp" > <Info> @@ -8287,7 +8306,7 @@ loose text artifact </Section> <OverallResult success="true"/> </TestCase> - <OverallResults successes="761" failures="103" expectedFailures="21"/> + <OverallResults successes="763" failures="103" expectedFailures="21"/> </Group> - <OverallResults successes="761" failures="102" expectedFailures="21"/> + <OverallResults successes="763" failures="102" expectedFailures="21"/> </Catch> diff --git a/projects/SelfTest/DecompositionTests.cpp b/projects/SelfTest/DecompositionTests.cpp index f2e04260..1b44b602 100644 --- a/projects/SelfTest/DecompositionTests.cpp +++ b/projects/SelfTest/DecompositionTests.cpp @@ -7,6 +7,7 @@ */ #include <iostream> +#include <cstdio> struct truthy { truthy(bool b):m_value(b){} @@ -26,3 +27,9 @@ std::ostream& operator<<(std::ostream& o, truthy) { TEST_CASE( "Reconstruction should be based on stringification: #914" , "[Decomposition][failing][.]") { CHECK(truthy(false)); } + +TEST_CASE("#1005: Comparing pointer to int and long (NULL can be either on various systems)", "[Decomposition]") { + FILE* fptr = nullptr; + REQUIRE(fptr == 0); + REQUIRE(fptr == 0l); +} |