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)
6 // See http://www.boost.org/libs/test for the library home page.
9 //!@brief some trivial global typedefs
10 // ***************************************************************************
12 #ifndef BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
13 #define BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
15 #include <boost/test/utils/basic_cstring/basic_cstring.hpp>
16 #include <boost/test/detail/workaround.hpp>
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( "" )
22 #include <boost/test/detail/suppress_warnings.hpp>
24 //____________________________________________________________________________//
29 typedef unsigned long counter_t;
31 //____________________________________________________________________________//
33 enum report_level { INV_REPORT_LEVEL, CONFIRMATION_REPORT, SHORT_REPORT, DETAILED_REPORT, NO_REPORT };
35 //____________________________________________________________________________//
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
46 //____________________________________________________________________________//
48 enum test_unit_type { TUT_CASE = 0x01, TUT_SUITE = 0x10, TUT_ANY = 0x11 };
50 //____________________________________________________________________________//
52 enum assertion_result { AR_FAILED, AR_PASSED, AR_TRIGGERED };
54 //____________________________________________________________________________//
56 typedef unsigned long test_unit_id;
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;
64 //____________________________________________________________________________//
69 test_id_2_unit_type( test_unit_id id )
71 return (id & 0xFFFF0000) != 0 ? TUT_CASE : TUT_SUITE;
74 //____________________________________________________________________________//
76 } // namespace ut_detail
78 // helper templates to prevent ODR violations
80 struct static_constant {
85 T static_constant<T>::value;
87 //____________________________________________________________________________//
89 } // namespace unit_test
92 //____________________________________________________________________________//
94 #include <boost/test/detail/enable_warnings.hpp>
96 #endif // BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER