-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathunit.hpp
81 lines (69 loc) · 2.79 KB
/
unit.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/***************************************************************************
tag: The SourceWorks Tue Sep 7 00:54:57 CEST 2010 unit.hpp
unit.hpp - description
-------------------
begin : Tue September 07 2010
copyright : (C) 2010 The SourceWorks
email : [email protected]
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include <rtt-config.h>
#include <iostream>
#include <Logger.hpp>
#include <extras/SimulationActivity.hpp>
#include <extras/SimulationThread.hpp>
#include <RTT.hpp>
#define BOOST_TEST_DYN_LINK
#ifdef ORO_UNIT_TEST_SUITE_HACK
// Modified version that contains checkpointing
// We use this in the build farm to get more precise
// feedback for where the UT failed. To be removed
// when upstream supports this too.
#include "unit_test_suite.hpp"
#else
#include <boost/test/unit_test_suite.hpp>
#endif
#include <boost/test/unit_test.hpp>
#include <boost/test/floating_point_comparison.hpp>
using namespace RTT;
using namespace RTT::detail;
using namespace boost;
using namespace std;
#if defined(__GNUG__) && (defined(__unix__) || defined(__APPLE__))
# if defined(RTT_UNIT_DLL_EXPORT)
// Use RTT_UNIT_API for normal function exporting
# define RTT_UNIT_API __attribute__((visibility("default")))
// Use RTT_UNIT_EXPORT for static template class member variables
// They must always be 'globally' visible.
# define RTT_UNIT_EXPORT __attribute__((visibility("default")))
// Use RTT_UNIT_HIDE to explicitly hide a symbol
# define RTT_UNIT_HIDE __attribute__((visibility("hidden")))
# else
# define RTT_UNIT_API
# define RTT_UNIT_EXPORT __attribute__((visibility("default")))
# define RTT_UNIT_HIDE __attribute__((visibility("hidden")))
# endif
#else
// Win32 and NOT GNU
# if defined( WIN32 ) && !defined ( __MINGW32__ )
# if defined(RTT_UNIT_DLL_EXPORT)
# define RTT_UNIT_API __declspec(dllexport)
# define RTT_UNIT_EXPORT __declspec(dllexport)
# define RTT_UNIT_HIDE
# else
# define RTT_UNIT_API __declspec(dllimport)
# define RTT_UNIT_EXPORT __declspec(dllimport)
# define RTT_UNIT_HIDE
# endif
# else
# define RTT_UNIT_API
# define RTT_UNIT_EXPORT
# define RTT_UNIT_HIDE
# endif
#endif