dataset_example59.run-fail.cpp 854 B

1234567891011121314151617181920212223242526272829
  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. // See http://www.boost.org/libs/test for the library home page.
  6. //[example_code
  7. #define BOOST_TEST_MODULE dataset_example59
  8. #include <boost/test/included/unit_test.hpp>
  9. #include <boost/test/data/test_case.hpp>
  10. #include <boost/test/data/monomorphic.hpp>
  11. namespace bdata = boost::unit_test::data;
  12. BOOST_DATA_TEST_CASE( test1, bdata::xrange(5) )
  13. {
  14. std::cout << "test 1: " << sample << std::endl;
  15. BOOST_TEST((sample <= 4 && sample >= 0));
  16. }
  17. BOOST_DATA_TEST_CASE(
  18. test2,
  19. bdata::xrange<int>( (bdata::begin=1, bdata::end=10, bdata::step=3)) )
  20. {
  21. std::cout << "test 2: " << sample << std::endl;
  22. BOOST_TEST((sample <= 4 && sample >= 0));
  23. }
  24. //]