summaryrefslogtreecommitdiff
path: root/boost/test/tree/test_unit.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/test/tree/test_unit.hpp')
-rw-r--r--boost/test/tree/test_unit.hpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/boost/test/tree/test_unit.hpp b/boost/test/tree/test_unit.hpp
index 273fa14ff3..1441bdc7dd 100644
--- a/boost/test/tree/test_unit.hpp
+++ b/boost/test/tree/test_unit.hpp
@@ -43,6 +43,7 @@ namespace unit_test {
namespace framework {
class state;
+BOOST_TEST_DECL master_test_suite_t& master_test_suite();
}
// ************************************************************************** //
@@ -176,9 +177,15 @@ public:
/// @overload
void add( test_unit_generator const& gen, decorator::collector& decorators );
+
+ /// @overload
+ void add( boost::shared_ptr<test_unit_generator> gen_ptr, decorator::collector& decorators );
//! Removes a test from the test suite.
void remove( test_unit_id id );
+
+ //! Generates all the delayed test_units from the generators
+ void generate( );
// access methods
@@ -199,6 +206,8 @@ protected:
test_unit_id_list m_children;
children_per_rank m_ranked_children; ///< maps child sibling rank to list of children with that rank
+
+ std::vector< std::pair<boost::shared_ptr<test_unit_generator>, std::vector<decorator::base_ptr> > > m_generators; /// lazy evaluation
};
// ************************************************************************** //
@@ -206,12 +215,17 @@ protected:
// ************************************************************************** //
class BOOST_TEST_DECL master_test_suite_t : public test_suite {
-public:
+private:
master_test_suite_t();
-
+ master_test_suite_t(const master_test_suite_t&); // undefined
+ master_test_suite_t& operator=(master_test_suite_t const &); // undefined
+
+public:
// Data members
int argc;
char** argv;
+
+ friend master_test_suite_t& boost::unit_test::framework::master_test_suite();
};
// ************************************************************************** //