Boost C++ Libraries: Ticket #12095: disabling test with precondition leads to error https://svn.boost.org/trac10/ticket/12095 <p> Minimal reproduction: </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#define BOOST_TEST_MODULE repro</span> <span class="cp">#include</span> <span class="cpf">&lt;boost/test/unit_test.hpp&gt;</span><span class="cp"></span> <span class="n">BOOST_AUTO_TEST_CASE</span><span class="p">(</span><span class="n">fail</span><span class="p">,</span> <span class="o">*</span><span class="n">boost</span><span class="o">::</span><span class="n">unit_test</span><span class="o">::</span><span class="n">precondition</span><span class="p">([](</span><span class="n">boost</span><span class="o">::</span><span class="n">unit_test</span><span class="o">::</span><span class="n">test_unit_id</span><span class="p">){</span> <span class="k">return</span> <span class="nb">false</span><span class="p">;</span> <span class="p">}))</span> <span class="p">{}</span> </pre></div></div><p> Output (1.60.0 from source): </p> <pre class="wiki">Running 1 test case... *** Errors were detected in the test module "repro"; see standard output for details </pre><p> Based on the documentation here: <a href="http://www.boost.org/doc/libs/1_60_0/libs/test/doc/html/boost_test/tests_organization/enabling.html">http://www.boost.org/doc/libs/1_60_0/libs/test/doc/html/boost_test/tests_organization/enabling.html</a> 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. </p> <ul><li>It doesn't require the predicate to be a lambda, that was just the shortest thing I could find for a small repro. </li><li>It doesn't depend on this being the only test case - adding another case doesn't change the behaviour </li></ul> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12095 Trac 1.4.3 Raffi Enficiaud Fri, 16 Dec 2016 20:06:33 GMT owner, status changed https://svn.boost.org/trac10/ticket/12095#comment:1 https://svn.boost.org/trac10/ticket/12095#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Gennadiy Rozental</span> to <span class="trac-author">Raffi Enficiaud</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket Raffi Enficiaud Tue, 02 Jan 2018 20:48:53 GMT milestone changed https://svn.boost.org/trac10/ticket/12095#comment:2 https://svn.boost.org/trac10/ticket/12095#comment:2 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.66.0</span> </li> </ul> <p> In branch <code>topic/12095-disabling-test-with-precondition-leads-to-error</code> </p> Ticket Raffi Enficiaud Thu, 18 Jan 2018 19:51:23 GMT milestone changed https://svn.boost.org/trac10/ticket/12095#comment:3 https://svn.boost.org/trac10/ticket/12095#comment:3 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.66.0</span> → <span class="trac-field-new">Boost 1.67.0</span> </li> </ul> Ticket Raffi Enficiaud Thu, 21 Jun 2018 05:12:51 GMT milestone changed https://svn.boost.org/trac10/ticket/12095#comment:4 https://svn.boost.org/trac10/ticket/12095#comment:4 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.67.0</span> → <span class="trac-field-new">Boost 1.68.0</span> </li> </ul> Ticket Raffi Enficiaud Thu, 21 Jun 2018 05:21:23 GMT <link>https://svn.boost.org/trac10/ticket/12095#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12095#comment:5</guid> <description> <p> Would you be able to test this branch? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Mon, 25 Jun 2018 20:58:06 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12095#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12095#comment:6</guid> <description> <p> In develop, rev <code>0b7d68b8ef014475148ab36e1123d0ba40e070b2</code> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Raffi Enficiaud</dc:creator> <pubDate>Wed, 01 Aug 2018 17:08:14 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/12095#comment:7 https://svn.boost.org/trac10/ticket/12095#comment:7 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket