• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_example66
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 const char* arr[] = {"cat", "dog"};
17 
18 BOOST_DATA_TEST_CASE(
19   test1,
20   bdata::xrange(2) ^ bdata::make(arr),
21   xr, array_element)
22 {
23   std::cout << "test 1: "
24     << xr << ", "
25     << array_element
26     << std::endl;
27   BOOST_TEST(array_element != "mammoth");
28 }
29 //]
30