[Boost-bugs] [Boost C++ Libraries] #11418: tests which do nothing should not return 0 as return value

Subject: [Boost-bugs] [Boost C++ Libraries] #11418: tests which do nothing should not return 0 as return value
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-06-24 14:35:18


#11418: tests which do nothing should not return 0 as return value
------------------------------+---------------------
 Reporter: peters@… | Owner: rogeeff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: test
  Version: Boost 1.57.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------
 Given:

 {{{
 #define BOOST_TEST_MODULE This is my test

 #define NDEBUG
 #include <boost/test/unit_test.hpp>

 BOOST_AUTO_TEST_CASE( only_and_useless_testcase_in_file ) {
     BOOST_ASSERT(1 == 0);
 }
 }}}

 running this test does nothing because BOOST_ASSERT evaluates to nothing.
 Which is ok, but the overall test should not return 0 in this case. We had
 several tests in our test suite that were effectively disabled by the
 NDEBUG but nobody detected it, because the the tests returned everything
 is ok (and nobody looked at the output, because everything was fine)

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11418>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:18 UTC