Mark !mayfail tests as skipped in the JUnit reporter

Should fix #2116
This commit is contained in:
Martin Hořeňovský
2021-06-07 19:53:34 +02:00
parent 7727c15290
commit eea3e9a5b5
9 changed files with 218 additions and 19 deletions

View File

@@ -11,7 +11,7 @@
// Wdouble-promotion is not supported until 3.8
# if (__clang_major__ > 3) || (__clang_major__ == 3 && __clang_minor__ > 7)
# pragma clang diagnostic ignored "-Wdouble-promotion"
# endif
# endif
#endif
#include "catch.hpp"
@@ -89,6 +89,19 @@ TEST_CASE( "Equality checks that should fail", "[.][failing][!mayfail]" )
CHECK( x == Approx( 1.301 ) );
}
// Needed to test junit reporter's handling of mayfail test cases and sections
TEST_CASE("Mayfail test case with nested sections", "[!mayfail]") {
SECTION("A") {
SECTION("1") { FAIL(); }
SECTION("2") { FAIL(); }
}
SECTION("B") {
SECTION("1") { FAIL(); }
SECTION("2") { FAIL(); }
}
}
TEST_CASE( "Inequality checks that should succeed" )
{
TestData data;