Opened 7 years ago

Closed 7 years ago

#11417 closed Bugs (duplicate)

BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES should result in a fail verdict if the expectation is not fullfilled

Reported by: peters@… Owned by: Gennadiy Rozental
Milestone: To Be Determined Component: test
Version: Boost 1.57.0 Severity: Problem
Keywords: Cc:

Description

Given this test:

BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(fail_test, 1)
BOOST_AUTO_TEST_CASE( fail_test ) {
    BOOST_CHECK(1 == 1);
}

I would assume that this test results in a overall failed test, but the macro only prints a message on the console: "Test case fail_test has fewer failures than expected" and does not touch the verdict of the test. This is IMHO useless, because its easy to miss (Especially if CI is used)

I introduced that test case into our test suite to ensure that the tests are working correctly (before we had tests that did nothing and resulted in PASS, because NDEBUG was defined)

Change History (2)

comment:1 by peters@…, 7 years ago

sorry for this double post. please remove this ticket in favour to #11416

comment:2 by Raffi Enficiaud, 7 years ago

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.