Add compilation test for #1027

This commit is contained in:
Martin Hořeňovský 2017-11-13 10:07:06 +01:00
parent 8dbaac61ff
commit b74d4ca96d
6 changed files with 75 additions and 9 deletions

View File

@ -1003,6 +1003,6 @@ with expansion:
"{?}" == "1"
===============================================================================
test cases: 187 | 136 passed | 47 failed | 4 failed as expected
assertions: 937 | 820 passed | 96 failed | 21 failed as expected
test cases: 188 | 137 passed | 47 failed | 4 failed as expected
assertions: 939 | 822 passed | 96 failed | 21 failed as expected

View File

@ -33,6 +33,24 @@ PASSED:
with expansion:
0 == 0
-------------------------------------------------------------------------------
#1027
-------------------------------------------------------------------------------
CompilationTests.cpp:<line number>
...............................................................................
CompilationTests.cpp:<line number>:
PASSED:
REQUIRE( y.v == 0 )
with expansion:
0 == 0
CompilationTests.cpp:<line number>:
PASSED:
REQUIRE( 0 == y.v )
with expansion:
0 == 0
-------------------------------------------------------------------------------
#748 - captures with unexpected exceptions
outside assertions
@ -7872,6 +7890,6 @@ MiscTests.cpp:<line number>:
PASSED:
===============================================================================
test cases: 187 | 134 passed | 49 failed | 4 failed as expected
assertions: 936 | 816 passed | 99 failed | 21 failed as expected
test cases: 188 | 135 passed | 49 failed | 4 failed as expected
assertions: 938 | 818 passed | 99 failed | 21 failed as expected

View File

@ -33,6 +33,24 @@ PASSED:
with expansion:
0 == 0
-------------------------------------------------------------------------------
#1027
-------------------------------------------------------------------------------
CompilationTests.cpp:<line number>
...............................................................................
CompilationTests.cpp:<line number>:
PASSED:
REQUIRE( y.v == 0 )
with expansion:
0 == 0
CompilationTests.cpp:<line number>:
PASSED:
REQUIRE( 0 == y.v )
with expansion:
0 == 0
-------------------------------------------------------------------------------
#748 - captures with unexpected exceptions
outside assertions
@ -239,6 +257,6 @@ with expansion:
!true
===============================================================================
test cases: 9 | 6 passed | 1 failed | 2 failed as expected
assertions: 26 | 19 passed | 4 failed | 3 failed as expected
test cases: 10 | 7 passed | 1 failed | 2 failed as expected
assertions: 28 | 21 passed | 4 failed | 3 failed as expected

View File

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuitesloose text artifact
>
<testsuite name="<exe-name>" errors="15" failures="85" tests="937" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
<testsuite name="<exe-name>" errors="15" failures="85" tests="939" 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="#1027" time="{duration}"/>
<testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/outside assertions" time="{duration}">
<error type="TEST_CASE">
expected exception

View File

@ -23,6 +23,25 @@
</Expression>
<OverallResult success="true"/>
</TestCase>
<TestCase name="#1027" filename="projects/<exe-name>/CompilationTests.cpp" >
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/CompilationTests.cpp" >
<Original>
y.v == 0
</Original>
<Expanded>
0 == 0
</Expanded>
</Expression>
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/CompilationTests.cpp" >
<Original>
0 == y.v
</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>
@ -8734,7 +8753,7 @@ loose text artifact
</Section>
<OverallResult success="true"/>
</TestCase>
<OverallResults successes="816" failures="100" expectedFailures="21"/>
<OverallResults successes="818" failures="100" expectedFailures="21"/>
</Group>
<OverallResults successes="816" failures="99" expectedFailures="21"/>
<OverallResults successes="818" failures="99" expectedFailures="21"/>
</Catch>

View File

@ -85,3 +85,13 @@ TEST_CASE( "#872" ) {
B x;
REQUIRE (x == 4);
}
struct Y {
uint32_t v : 1;
};
TEST_CASE( "#1027" ) {
Y y{ 0 };
REQUIRE(y.v == 0);
REQUIRE(0 == y.v);
}