Opened 7 years ago
Closed 4 years ago
#12095 closed Bugs (fixed)
disabling test with precondition leads to error
Reported by: | Owned by: | Raffi Enficiaud | |
---|---|---|---|
Milestone: | Boost 1.68.0 | Component: | test |
Version: | Boost 1.60.0 | Severity: | Problem |
Keywords: | test precondition failure | Cc: |
Description
Minimal reproduction:
#define BOOST_TEST_MODULE repro #include <boost/test/unit_test.hpp> BOOST_AUTO_TEST_CASE(fail, *boost::unit_test::precondition([](boost::unit_test::test_unit_id){ return false; })) {}
Output (1.60.0 from source):
Running 1 test case... *** Errors were detected in the test module "repro"; see standard output for details
Based on the documentation here: http://www.boost.org/doc/libs/1_60_0/libs/test/doc/html/boost_test/tests_organization/enabling.html I assumed that disabling a test with a precondition was not supposed to be erroneous (the example had two tests fail, and one that did not run because of a failed precondition. Alltogether, two (not three) errors were reported. Also, the message indicates that we should look at stdout, but stdout has nothing.
- It doesn't require the predicate to be a lambda, that was just the shortest thing I could find for a small repro.
- It doesn't depend on this being the only test case - adding another case doesn't change the behaviour
Change History (7)
comment:1 by , 6 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 5 years ago
Milestone: | To Be Determined → Boost 1.66.0 |
---|
comment:3 by , 5 years ago
Milestone: | Boost 1.66.0 → Boost 1.67.0 |
---|
comment:4 by , 4 years ago
Milestone: | Boost 1.67.0 → Boost 1.68.0 |
---|
comment:7 by , 4 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
In branch
topic/12095-disabling-test-with-precondition-leads-to-error