Added test comparing non-copyable values

This commit is contained in:
Phil Nash 2017-08-17 16:48:46 +01:00
parent aaedae60b4
commit b8f482b9aa
6 changed files with 8330 additions and 7 deletions

View File

@ -1020,6 +1020,6 @@ with expansion:
"{?}" == "1"
===============================================================================
test cases: 182 | 131 passed | 47 failed | 4 failed as expected
assertions: 881 | 764 passed | 96 failed | 21 failed as expected
test cases: 183 | 132 passed | 47 failed | 4 failed as expected
assertions: 882 | 765 passed | 96 failed | 21 failed as expected

View File

@ -6672,6 +6672,18 @@ PASSED:
with expansion:
"7" == "7"
-------------------------------------------------------------------------------
non-copyable objects
-------------------------------------------------------------------------------
TrickyTests.cpp:<line number>
...............................................................................
TrickyTests.cpp:<line number>:
PASSED:
CHECK( ti == typeid(int) )
with expansion:
{?} == {?}
-------------------------------------------------------------------------------
not allowed
-------------------------------------------------------------------------------
@ -7523,6 +7535,6 @@ MiscTests.cpp:<line number>:
PASSED:
===============================================================================
test cases: 182 | 128 passed | 50 failed | 4 failed as expected
assertions: 883 | 760 passed | 102 failed | 21 failed as expected
test cases: 183 | 129 passed | 50 failed | 4 failed as expected
assertions: 884 | 761 passed | 102 failed | 21 failed as expected

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuitesloose text artifact
>
<testsuite name="<exe-name>" errors="15" failures="88" tests="884" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
<testsuite name="<exe-name>" errors="15" failures="88" tests="885" 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="#748 - captures with unexpected exceptions/outside assertions" time="{duration}">
<error type="TEST_CASE">
@ -725,6 +725,7 @@ MiscTests.cpp:<line number>
<testcase classname="<exe-name>.global" name="nested SECTION tests/s1" time="{duration}"/>
<testcase classname="<exe-name>.global" name="nested SECTION tests/s1/s2" time="{duration}"/>
<testcase classname="<exe-name>.global" name="non streamable - with conv. op" time="{duration}"/>
<testcase classname="<exe-name>.global" name="non-copyable objects" time="{duration}"/>
<testcase classname="<exe-name>.global" name="not allowed" time="{duration}"/>
<testcase classname="<exe-name>.global" name="null strings" time="{duration}"/>
<testcase classname="<exe-name>.global" name="null_ptr" time="{duration}"/>

View File

@ -7433,6 +7433,17 @@ loose text artifact
</Expression>
<OverallResult success="true"/>
</TestCase>
<TestCase name="non-copyable objects" filename="projects/<exe-name>/TrickyTests.cpp" >
<Expression success="true" type="CHECK" filename="projects/<exe-name>/TrickyTests.cpp" >
<Original>
ti == typeid(int)
</Original>
<Expanded>
{?} == {?}
</Expanded>
</Expression>
<OverallResult success="true"/>
</TestCase>
<TestCase name="not allowed" tags="[!throws]" filename="projects/<exe-name>/MiscTests.cpp" >
<OverallResult success="true"/>
</TestCase>
@ -8276,7 +8287,7 @@ loose text artifact
</Section>
<OverallResult success="true"/>
</TestCase>
<OverallResults successes="760" failures="103" expectedFailures="21"/>
<OverallResults successes="761" failures="103" expectedFailures="21"/>
</Group>
<OverallResults successes="760" failures="102" expectedFailures="21"/>
<OverallResults successes="761" failures="102" expectedFailures="21"/>
</Catch>

File diff suppressed because it is too large Load Diff

View File

@ -435,3 +435,9 @@ TEST_CASE( "null deref", "[.][failing][!nonportable]" ) {
int *x = NULL;
*x = 1;
}
TEST_CASE( "non-copyable objects", "[.]" ) {
// Thanks to Agustin Bergé (@k-ballo on the cpplang Slack) for raising this
std::type_info const& ti = typeid(int);
CHECK( ti == typeid(int) );
}