]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | // (C) Copyright Raffi Enficiaud 2014. |
2 | // Distributed under the Boost Software License, Version 1.0. | |
3 | // (See accompanying file LICENSE_1_0.txt or copy at | |
4 | // http://www.boost.org/LICENSE_1_0.txt) | |
5 | ||
6 | // See http://www.boost.org/libs/test for the library home page. | |
7 | ||
8 | //[example_code | |
9 | #define BOOST_TEST_MODULE dataset_example59 | |
10 | #include <boost/test/included/unit_test.hpp> | |
11 | #include <boost/test/data/test_case.hpp> | |
12 | #include <boost/test/data/monomorphic.hpp> | |
13 | ||
14 | namespace bdata = boost::unit_test::data; | |
15 | ||
16 | BOOST_DATA_TEST_CASE( test1, bdata::xrange(5) ) | |
17 | { | |
18 | std::cout << "test 1: " << sample << std::endl; | |
19 | BOOST_TEST((sample <= 4 && sample >= 0)); | |
20 | } | |
21 | ||
22 | BOOST_DATA_TEST_CASE( | |
23 | test2, | |
24 | bdata::xrange<int>( (bdata::begin=1, bdata::end=10, bdata::step=3)) ) | |
25 | { | |
26 | std::cout << "test 2: " << sample << std::endl; | |
27 | BOOST_TEST((sample <= 4 && sample >= 0)); | |
28 | } | |
29 | //] |