dataset_example65.run.cpp 865 B

1234567891011121314151617181920212223242526272829303132333435363738
  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_example65
  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(
  13. test1,
  14. bdata::make(2),
  15. singleton)
  16. {
  17. std::cout
  18. << "test 1: "
  19. << singleton << std::endl;
  20. BOOST_TEST(singleton == 2);
  21. }
  22. BOOST_DATA_TEST_CASE(
  23. test2,
  24. bdata::xrange(3) ^ bdata::make(2),
  25. xr, singleton)
  26. {
  27. std::cout
  28. << "test 2: "
  29. << xr << ", " << singleton << std::endl;
  30. BOOST_TEST(singleton == 2);
  31. }
  32. //]