Boost C++ Libraries: Ticket #10232: Accessing test units in test_suite by index https://svn.boost.org/trac10/ticket/10232 <p> We need a way to walk over all the test units in a <code>test_suite</code>, even if they are not <code>p_enabled</code>. </p> <p> Currently, Boost.Test lets you access elements in a test tree using either <code>traverse_test_tree</code> which skips disabled test suites, or by test unit name. </p> <p> <code>test_suite</code> already has a public method, that gives back the number of test units members (<code>test_suite::size()</code>). </p> <p> It would be nice, if we could access any element in the vector by index, like this: </p> <pre class="wiki">// access methods ... test_unit_id get( std::size_t idx ) const { return m_members[idx]; } ... </pre><p> I need this, because our test program selects and runs tests multiple times (through an interactive console), and we filter them every time, so I want to reset the <code>p_enabled</code> flag to <code>false</code> before filtering them again. </p> <p> Now I think the only way to do this is by modifying boost itself. Either adding a new friend traverse function, that <strong>doesn't skip disabled members</strong>, or by adding the aforementioned <code>get</code> function. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/10232 Trac 1.4.3 Gennadiy Rozental Sun, 05 Jul 2015 22:35:44 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/10232#comment:1 https://svn.boost.org/trac10/ticket/10232#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> This part of the framework is completely rewritten in new release. You now have an ability to visit all test units ignoring the status </p> Ticket