[Boost-bugs] [Boost C++ Libraries] #10232: Accessing test units in test_suite by index

Subject: [Boost-bugs] [Boost C++ Libraries] #10232: Accessing test units in test_suite by index
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-07-23 12:30:48

#10232: Accessing test units in test_suite by index
 Reporter: ch0kee@… | Owner: rogeeff
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: test
  Version: Boost 1.55.0 | Severity: Problem
 Keywords: boost test test_suite |
 We need a way to walk over all the test units
 in a {{{test_suite}}}, even if they are not {{{p_enabled}}}.

 Currently, Boost.Test lets you access elements in
 a test tree using either {{{traverse_test_tree}}} which
 skips disabled test suites, or by test unit name.

 {{{test_suite}}} already has a public method, that gives back
 the number of test units members ({{{test_suite::size()}}}).

 It would be nice, if we could access any element in
 the vector by index, like this:
 // access methods
     test_unit_id get( std::size_t idx ) const { return m_members[idx];

 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 {{{p_enabled}}} flag to {{{false}}} before filtering them again.

 Now I think the only way to do this is by modifying boost itself.
 Either adding a new friend traverse function, that '''doesn't skip
 disabled members''', or by adding the aforementioned {{{get}}} function.

Ticket URL: <https://svn.boost.org/trac/boost/ticket/10232>
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:16 UTC