mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-23 11:43:29 +01:00
Add compilation test for #1027
This commit is contained in:
parent
8dbaac61ff
commit
b74d4ca96d
@ -1003,6 +1003,6 @@ with expansion:
|
|||||||
"{?}" == "1"
|
"{?}" == "1"
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
test cases: 187 | 136 passed | 47 failed | 4 failed as expected
|
test cases: 188 | 137 passed | 47 failed | 4 failed as expected
|
||||||
assertions: 937 | 820 passed | 96 failed | 21 failed as expected
|
assertions: 939 | 822 passed | 96 failed | 21 failed as expected
|
||||||
|
|
||||||
|
@ -33,6 +33,24 @@ PASSED:
|
|||||||
with expansion:
|
with expansion:
|
||||||
0 == 0
|
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
|
#748 - captures with unexpected exceptions
|
||||||
outside assertions
|
outside assertions
|
||||||
@ -7872,6 +7890,6 @@ MiscTests.cpp:<line number>:
|
|||||||
PASSED:
|
PASSED:
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
test cases: 187 | 134 passed | 49 failed | 4 failed as expected
|
test cases: 188 | 135 passed | 49 failed | 4 failed as expected
|
||||||
assertions: 936 | 816 passed | 99 failed | 21 failed as expected
|
assertions: 938 | 818 passed | 99 failed | 21 failed as expected
|
||||||
|
|
||||||
|
@ -33,6 +33,24 @@ PASSED:
|
|||||||
with expansion:
|
with expansion:
|
||||||
0 == 0
|
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
|
#748 - captures with unexpected exceptions
|
||||||
outside assertions
|
outside assertions
|
||||||
@ -239,6 +257,6 @@ with expansion:
|
|||||||
!true
|
!true
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
test cases: 9 | 6 passed | 1 failed | 2 failed as expected
|
test cases: 10 | 7 passed | 1 failed | 2 failed as expected
|
||||||
assertions: 26 | 19 passed | 4 failed | 3 failed as expected
|
assertions: 28 | 21 passed | 4 failed | 3 failed as expected
|
||||||
|
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<testsuitesloose text artifact
|
<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="# 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="#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}">
|
<testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/outside assertions" time="{duration}">
|
||||||
<error type="TEST_CASE">
|
<error type="TEST_CASE">
|
||||||
expected exception
|
expected exception
|
||||||
|
@ -23,6 +23,25 @@
|
|||||||
</Expression>
|
</Expression>
|
||||||
<OverallResult success="true"/>
|
<OverallResult success="true"/>
|
||||||
</TestCase>
|
</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" >
|
<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" >
|
<Section name="outside assertions" filename="projects/<exe-name>/ExceptionTests.cpp" >
|
||||||
<Info>
|
<Info>
|
||||||
@ -8734,7 +8753,7 @@ loose text artifact
|
|||||||
</Section>
|
</Section>
|
||||||
<OverallResult success="true"/>
|
<OverallResult success="true"/>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
<OverallResults successes="816" failures="100" expectedFailures="21"/>
|
<OverallResults successes="818" failures="100" expectedFailures="21"/>
|
||||||
</Group>
|
</Group>
|
||||||
<OverallResults successes="816" failures="99" expectedFailures="21"/>
|
<OverallResults successes="818" failures="99" expectedFailures="21"/>
|
||||||
</Catch>
|
</Catch>
|
||||||
|
@ -85,3 +85,13 @@ TEST_CASE( "#872" ) {
|
|||||||
B x;
|
B x;
|
||||||
REQUIRE (x == 4);
|
REQUIRE (x == 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct Y {
|
||||||
|
uint32_t v : 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_CASE( "#1027" ) {
|
||||||
|
Y y{ 0 };
|
||||||
|
REQUIRE(y.v == 0);
|
||||||
|
REQUIRE(0 == y.v);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user