Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

BOOST_TEST_CASE_TEMPLATE_FUNCTION

BOOST_TEST_CASE_TEMPLATE_FUNCTION(name, T) defines a test case function named name that is parameterized by a type parameter T. The defined functions are then available for registration as parameterized test cases with BOOST_TEST_CASE_TEMPLATE.

typedef boost::mpl::list<
    char, short,
    int,
    long, long long> signed_types;

BOOST_TEST_CASE_TEMPLATE_FUNCTION(is_signed_for_signed_types, T)
{
    BOOST_REQUIRE(std::numeric_limits<T>::is_signed);
}

Example Source Code

PrevUpHomeNext