source: NonGTP/Boost/boost/test/detail/global_typedef.hpp @ 857

Revision 857, 2.9 KB checked in by igarcia, 18 years ago (diff)
Line 
1//  (C) Copyright Gennadiy Rozental 2001-2005.
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        : $RCSfile: global_typedef.hpp,v $
9//
10//  Version     : $Revision: 1.1 $
11//
12//  Description : some trivial global typedefs
13// ***************************************************************************
14
15#ifndef BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
16#define BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
17
18#include <boost/test/utils/basic_cstring/basic_cstring.hpp>
19#define BOOST_TEST_L( s )         boost::unit_test::literal_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( "" )
22
23#include <boost/test/detail/suppress_warnings.hpp>
24
25//____________________________________________________________________________//
26
27namespace boost {
28
29namespace unit_test {
30
31typedef unsigned long   counter_t;
32
33//____________________________________________________________________________//
34
35enum report_level  { CONFIRMATION_REPORT, SHORT_REPORT, DETAILED_REPORT, NO_REPORT, INV_REPORT_LEVEL };
36
37//____________________________________________________________________________//
38
39enum output_format { CLF /* compiler log format */, XML /* XML */ };
40
41//____________________________________________________________________________//
42
43enum test_unit_type { tut_case = 0x01, tut_suite = 0x10, tut_any = 0x11 };
44
45//____________________________________________________________________________//
46
47typedef unsigned long   test_unit_id;
48const test_unit_id INV_TEST_UNIT_ID  = 0xFFFFFFFF;
49const test_unit_id MAX_TEST_CASE_ID  = 0xFFFFFFFE;
50const test_unit_id MIN_TEST_CASE_ID  = 0x00010000;
51const test_unit_id MAX_TEST_SUITE_ID = 0x0000FF00;
52const test_unit_id MIN_TEST_SUITE_ID = 0x00000001;
53
54//____________________________________________________________________________//
55
56inline test_unit_type
57test_id_2_unit_type( test_unit_id id )
58{
59    return (id & 0xFFFF0000) != 0 ? tut_case : tut_suite;
60}
61
62//____________________________________________________________________________//
63
64} // namespace unit_test
65
66} // namespace boost
67
68//____________________________________________________________________________//
69
70#include <boost/test/detail/enable_warnings.hpp>
71
72// ***************************************************************************
73//  Revision History :
74// 
75//  $Log: global_typedef.hpp,v $
76//  Revision 1.1  2005/02/20 08:27:06  rogeeff
77//  This a major update for Boost.Test framework. See release docs for complete list of fixes/updates
78//
79// ***************************************************************************
80
81#endif // BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
Note: See TracBrowser for help on using the repository browser.