1 // (C) Copyright Gennadiy Rozental 2001-2008.
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.
10 // Version : $Revision$
12 // Description : some trivial global typedefs
13 // ***************************************************************************
15 #ifndef BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
16 #define BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
18 #include <boost/test/utils/basic_cstring/basic_cstring.hpp>
19 #define BOOST_TEST_L( s ) boost::unit_test::const_string( s, sizeof( s ) - 1 )
20 #define BOOST_TEST_STRINGIZE( s ) BOOST_TEST_L( BOOST_STRINGIZE( s ) )
21 #define BOOST_TEST_EMPTY_STRING BOOST_TEST_L( "" )
23 #include <boost/test/detail/suppress_warnings.hpp>
25 //____________________________________________________________________________//
31 typedef unsigned long counter_t
;
33 //____________________________________________________________________________//
35 enum report_level
{ INV_REPORT_LEVEL
, CONFIRMATION_REPORT
, SHORT_REPORT
, DETAILED_REPORT
, NO_REPORT
};
37 //____________________________________________________________________________//
39 enum output_format
{ INV_OF
, CLF
/* compiler log format */, XML
/* XML */ };
41 //____________________________________________________________________________//
43 enum test_unit_type
{ tut_case
= 0x01, tut_suite
= 0x10, tut_any
= 0x11 };
45 //____________________________________________________________________________//
47 typedef unsigned long test_unit_id
;
49 const test_unit_id INV_TEST_UNIT_ID
= 0xFFFFFFFF;
50 const test_unit_id MAX_TEST_CASE_ID
= 0xFFFFFFFE;
51 const test_unit_id MIN_TEST_CASE_ID
= 0x00010000;
52 const test_unit_id MAX_TEST_SUITE_ID
= 0x0000FF00;
53 const test_unit_id MIN_TEST_SUITE_ID
= 0x00000001;
55 //____________________________________________________________________________//
60 test_id_2_unit_type( test_unit_id id
)
62 return (id
& 0xFFFF0000) != 0 ? tut_case
: tut_suite
;
65 //____________________________________________________________________________//
67 // helper templates to prevent ODR violations
69 struct static_constant
{
74 T static_constant
<T
>::value
;
76 //____________________________________________________________________________//
78 } // namespace ut_detail
80 } // namespace unit_test
84 //____________________________________________________________________________//
86 #include <boost/test/detail/enable_warnings.hpp>
88 #endif // BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER