1 //  (C) Copyright Gennadiy Rozental 2015.
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 // ***************************************************************************
9 
10 // Boost.Test
11 #define BOOST_TEST_MODULE data driven test example
12 #include <boost/test/included/unit_test.hpp>
13 
14 #include <boost/test/data/test_case.hpp>
15 #include <boost/test/data/monomorphic.hpp>
16 namespace data=boost::unit_test::data;
17 namespace bt=boost::unit_test;
18 
19 //____________________________________________________________________________//
20 
21 double x_samples[] = {1.1,2.1,3.1,4.1};
22 double y_samples[] = {10.1,9.1,8.1};
23 
24 auto& D = * bt::tolerance(1e-1);
BOOST_DATA_TEST_CASE(data_driven_test,data::make (x_samples)* y_samples,x,y)25 BOOST_DATA_TEST_CASE( data_driven_test, data::make(x_samples) * y_samples, x, y )
26 {
27     BOOST_TEST( x*y < 32.4 );
28 }
29 
30 //____________________________________________________________________________//
31 
32 // EOF
33