Namespaces | Defines

tests/utils/auto_parameterized.hpp File Reference

#include <boost/test/unit_test_suite.hpp>
#include <boost/test/parameterized_test.hpp>
Include dependency graph for auto_parameterized.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  test_utils

Defines

#define BOOST_AUTO_TU_REGISTRAR   BOOST_AUTO_TC_REGISTRAR
#define WESNOTH_PARAMETERIZED_TEST_CASE(test_name, type_name, values, param_name)

Define Documentation

#define BOOST_AUTO_TU_REGISTRAR   BOOST_AUTO_TC_REGISTRAR

Definition at line 25 of file auto_parameterized.hpp.

#define WESNOTH_PARAMETERIZED_TEST_CASE (   test_name,
  type_name,
  values,
  param_name 
)
Value:
struct test_name : public BOOST_AUTO_TEST_CASE_FIXTURE                  \
{ void test_method(const type_name&); };                                \
\
type_name* BOOST_JOIN(test_name, _begin) = &values[0];    \
type_name* BOOST_JOIN(test_name, _end) = BOOST_JOIN(test_name, _begin) + (sizeof(values)/sizeof(values[0])); \
static void BOOST_AUTO_TC_INVOKER( test_name )(const type_name& param_name ) \
{ \
    test_name t;                                                        \
    t.test_method(param_name);       \
}                                                                       \
                                                                        \
struct BOOST_AUTO_TC_UNIQUE_ID( test_name ) {};                         \
                                                                        \
BOOST_AUTO_TU_REGISTRAR( test_name )( \
        boost::unit_test::make_test_case(&BOOST_AUTO_TC_INVOKER( test_name ),      \
            BOOST_TEST_STRINGIZE( test_name ),\
            BOOST_JOIN(test_name, _begin), BOOST_JOIN(test_name, _end)));       \
                                                                       \
void test_name::test_method(const type_name& param_name)                \

Definition at line 28 of file auto_parameterized.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Wed May 23 2012 01:11:38 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs