/usr/include/boost/test
NameSizeModeActions
data/-0755rm
detail/-0755rm
impl/-0755rm
included/-0755rm
output/-0755rm
tools/-0755rm
tree/-0755rm
utils/-0755rm
auto_unit_test.hpp7350644editdlrm
debug.hpp71140644editdlrm
debug_config.hpp8720644editdlrm
execution_monitor.hpp257200644editdlrm
floating_point_comparison.hpp6630644editdlrm
framework.hpp138160644editdlrm
minimal.hpp49590644editdlrm
output_test_stream.hpp6400644editdlrm
parameterized_test.hpp72010644editdlrm
predicate_result.hpp6360644editdlrm
prg_exec_monitor.hpp35570644editdlrm
progress_monitor.hpp21100644editdlrm
results_collector.hpp65500644editdlrm
results_reporter.hpp51870644editdlrm
test_case_template.hpp5870644editdlrm
test_exec_monitor.hpp16780644editdlrm
test_framework_init_observer.hpp18790644editdlrm
test_tools.hpp22370644editdlrm
unit_test.hpp25350644editdlrm
unit_test_log.hpp117300644editdlrm
unit_test_log_formatter.hpp140020644editdlrm
unit_test_monitor.hpp22090644editdlrm
unit_test_parameters.hpp58470644editdlrm
unit_test_suite.hpp191990644editdlrm
Edit: /usr/include/boost/test/parameterized_test.hpp (7201B)
// (C) Copyright Gennadiy Rozental 2001. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. // //!@file //!@brief generators and helper macros for parameterized tests // *************************************************************************** #ifndef BOOST_TEST_PARAMETERIZED_TEST_HPP_021102GER #define BOOST_TEST_PARAMETERIZED_TEST_HPP_021102GER // Boost.Test #include #include // Boost #include #include #include #include #include //____________________________________________________________________________// #define BOOST_PARAM_TEST_CASE( function, begin, end ) \ boost::unit_test::make_test_case( function, \ BOOST_TEST_STRINGIZE( function ), \ __FILE__, __LINE__, \ (begin), (end) ) \ /**/ #define BOOST_PARAM_CLASS_TEST_CASE( function, tc_instance, begin, end ) \ boost::unit_test::make_test_case( function, \ BOOST_TEST_STRINGIZE( function ), \ __FILE__, __LINE__, \ (tc_instance), \ (begin), (end) ) \ /**/ namespace boost { namespace unit_test { namespace ut_detail { // ************************************************************************** // // ************** param_test_case_generator ************** // // ************************************************************************** // template class param_test_case_generator : public test_unit_generator { public: param_test_case_generator( boost::function const& test_func, const_string tc_name, const_string tc_file, std::size_t tc_line, ParamIter par_begin, ParamIter par_end ) : m_test_func( test_func ) , m_tc_name( ut_detail::normalize_test_case_name( tc_name ) ) , m_tc_file( tc_file ) , m_tc_line( tc_line ) , m_par_begin( par_begin ) , m_par_end( par_end ) , m_index( 0 ) {} virtual test_unit* next() const { if( m_par_begin == m_par_end ) return (test_unit*)0; test_unit* res = new test_case( m_tc_name + "_" + utils::string_cast(m_index), m_tc_file, m_tc_line, boost::bind( m_test_func, *m_par_begin ) ); ++m_par_begin; ++m_index; return res; } private: // Data members boost::function m_test_func; std::string m_tc_name; const_string m_tc_file; std::size_t m_tc_line; mutable ParamIter m_par_begin; ParamIter m_par_end; mutable std::size_t m_index; }; //____________________________________________________________________________// template struct user_param_tc_method_invoker { typedef void (UserTestCase::*test_method)( ParamType ); // Constructor user_param_tc_method_invoker( shared_ptr inst, test_method test_method ) : m_inst( inst ), m_test_method( test_method ) {} void operator()( ParamType p ) { ((*m_inst).*m_test_method)( p ); } // Data members shared_ptr m_inst; test_method m_test_method; }; //____________________________________________________________________________// } // namespace ut_detail template inline ut_detail::param_test_case_generator make_test_case( boost::function const& test_func, const_string tc_name, const_string tc_file, std::size_t tc_line, ParamIter par_begin, ParamIter par_end ) { return ut_detail::param_test_case_generator( test_func, tc_name, tc_file, tc_line, par_begin, par_end ); } //____________________________________________________________________________// template inline ut_detail::param_test_case_generator< BOOST_DEDUCED_TYPENAME remove_const::type>::type,ParamIter> make_test_case( void (*test_func)( ParamType ), const_string tc_name, const_string tc_file, std::size_t tc_line, ParamIter par_begin, ParamIter par_end ) { typedef BOOST_DEDUCED_TYPENAME remove_const::type>::type param_value_type; return ut_detail::param_test_case_generator( test_func, tc_name, tc_file, tc_line, par_begin, par_end ); } //____________________________________________________________________________// template inline ut_detail::param_test_case_generator< BOOST_DEDUCED_TYPENAME remove_const::type>::type,ParamIter> make_test_case( void (UserTestCase::*test_method )( ParamType ), const_string tc_name, const_string tc_file, std::size_t tc_line, boost::shared_ptr const& user_test_case, ParamIter par_begin, ParamIter par_end ) { typedef BOOST_DEDUCED_TYPENAME remove_const::type>::type param_value_type; return ut_detail::param_test_case_generator( ut_detail::user_param_tc_method_invoker( user_test_case, test_method ), tc_name, tc_file, tc_line, par_begin, par_end ); } //____________________________________________________________________________// } // unit_test } // namespace boost #include #endif // BOOST_TEST_PARAMETERIZED_TEST_HPP_021102GER