]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/test/include/boost/test/detail/global_typedef.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / test / include / boost / test / detail / global_typedef.hpp
1 // (C) Copyright Gennadiy Rozental 2001.
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 //!@brief some trivial global typedefs
10 // ***************************************************************************
11
12 #ifndef BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
13 #define BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
14
15 #include <boost/test/utils/basic_cstring/basic_cstring.hpp>
16 #include <boost/test/detail/workaround.hpp>
17
18 #define BOOST_TEST_L( s ) ::boost::unit_test::const_string( s, sizeof( s ) - 1 )
19 #define BOOST_TEST_STRINGIZE( s ) BOOST_TEST_L( BOOST_STRINGIZE( s ) )
20 #define BOOST_TEST_EMPTY_STRING BOOST_TEST_L( "" )
21
22 #include <boost/test/detail/suppress_warnings.hpp>
23
24 //____________________________________________________________________________//
25
26 namespace boost {
27 namespace unit_test {
28
29 typedef unsigned long counter_t;
30
31 //____________________________________________________________________________//
32
33 enum report_level { INV_REPORT_LEVEL, CONFIRMATION_REPORT, SHORT_REPORT, DETAILED_REPORT, NO_REPORT };
34
35 //____________________________________________________________________________//
36
37 //! Indicates the output format for the loggers or the test tree printing
38 enum output_format { OF_INVALID,
39 OF_CLF, ///< compiler log format
40 OF_XML, ///< XML format for report and log,
41 OF_JUNIT, ///< JUNIT format for report and log,
42 OF_CUSTOM_LOGGER, ///< User specified logger.
43 OF_DOT ///< dot format for output content
44 };
45
46 //____________________________________________________________________________//
47
48 enum test_unit_type { TUT_CASE = 0x01, TUT_SUITE = 0x10, TUT_ANY = 0x11 };
49
50 //____________________________________________________________________________//
51
52 enum assertion_result { AR_FAILED, AR_PASSED, AR_TRIGGERED };
53
54 //____________________________________________________________________________//
55
56 typedef unsigned long test_unit_id;
57
58 const test_unit_id INV_TEST_UNIT_ID = 0xFFFFFFFF;
59 const test_unit_id MAX_TEST_CASE_ID = 0xFFFFFFFE;
60 const test_unit_id MIN_TEST_CASE_ID = 0x00010000;
61 const test_unit_id MAX_TEST_SUITE_ID = 0x0000FF00;
62 const test_unit_id MIN_TEST_SUITE_ID = 0x00000001;
63
64 //____________________________________________________________________________//
65
66 namespace ut_detail {
67
68 inline test_unit_type
69 test_id_2_unit_type( test_unit_id id )
70 {
71 return (id & 0xFFFF0000) != 0 ? TUT_CASE : TUT_SUITE;
72 }
73
74 //____________________________________________________________________________//
75
76 } // namespace ut_detail
77
78 // helper templates to prevent ODR violations
79 template<class T>
80 struct static_constant {
81 static T value;
82 };
83
84 template<class T>
85 T static_constant<T>::value;
86
87 //____________________________________________________________________________//
88
89 } // namespace unit_test
90 } // namespace boost
91
92 //____________________________________________________________________________//
93
94 #include <boost/test/detail/enable_warnings.hpp>
95
96 #endif // BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER