]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/test/test/writing-test-ts/dont_print_log_value-test.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / test / test / writing-test-ts / dont_print_log_value-test.cpp
1 // (C) Copyright Marek Kurdej 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 //! @file
9 //! BOOST_TEST_DONT_PRINT_LOG_VALUE unit test
10 // *****************************************************************************
11
12 #define BOOST_TEST_MODULE BOOST_TEST_DONT_PRINT_LOG_VALUE unit test
13 #include <boost/test/unit_test.hpp>
14 #include <boost/test/data/test_case.hpp>
15 #include <boost/test/data/monomorphic.hpp>
16
17 #include <vector>
18
19 struct dummy_class {
20 operator bool() const { return true; }
21
22 bool operator==(dummy_class const&) const { return true; }
23 bool operator!=(dummy_class const&) const { return false; }
24 };
25
26 BOOST_TEST_DONT_PRINT_LOG_VALUE(dummy_class)
27
28 //____________________________________________________________________________//
29
30 BOOST_AUTO_TEST_CASE(single_object)
31 {
32 dummy_class actual, expected;
33 BOOST_TEST(actual == expected);
34 }
35
36 //____________________________________________________________________________//
37
38 // this one tests for contexts printing in dataset tests
39 std::vector<dummy_class> generate_vector()
40 {
41 std::vector<dummy_class> out;
42 out.push_back(dummy_class());
43 out.push_back(dummy_class());
44 out.push_back(dummy_class());
45 return out;
46 }
47
48 //____________________________________________________________________________//
49
50 BOOST_DATA_TEST_CASE( test_data_case, boost::unit_test::data::make(generate_vector()))
51 {
52 BOOST_TEST(sample);
53 }
54
55 // EOF