$search
00001 /*************************************************************************** 00002 tag: The SourceWorks Tue Sep 7 00:54:57 CEST 2010 unit.hpp 00003 00004 unit.hpp - description 00005 ------------------- 00006 begin : Tue September 07 2010 00007 copyright : (C) 2010 The SourceWorks 00008 email : peter@thesourceworks.com 00009 00010 *************************************************************************** 00011 * * 00012 * This program is free software; you can redistribute it and/or modify * 00013 * it under the terms of the GNU General Public License as published by * 00014 * the Free Software Foundation; either version 2 of the License, or * 00015 * (at your option) any later version. * 00016 * * 00017 ***************************************************************************/ 00018 00019 00020 00021 #include <rtt-config.h> 00022 #include <iostream> 00023 #include <Logger.hpp> 00024 #include <extras/SimulationActivity.hpp> 00025 #include <extras/SimulationThread.hpp> 00026 #include <RTT.hpp> 00027 00028 #ifdef ORO_UNIT_TEST_SUITE_HACK 00029 // Modified version that contains checkpointing 00030 // We use this in the build farm to get more precise 00031 // feedback for where the UT failed. To be removed 00032 // when upstream supports this too. 00033 #include "unit_test_suite.hpp" 00034 #else 00035 #include <boost/test/unit_test_suite.hpp> 00036 #endif 00037 #include <boost/test/unit_test.hpp> 00038 #include <boost/test/floating_point_comparison.hpp> 00039 00040 using namespace RTT; 00041 using namespace RTT::detail; 00042 using namespace boost; 00043 using namespace std; 00044 00045 #if defined(__GNUG__) && (defined(__unix__) || defined(__APPLE__)) 00046 00047 # if defined(RTT_UNIT_DLL_EXPORT) 00048 // Use RTT_UNIT_API for normal function exporting 00049 # define RTT_UNIT_API __attribute__((visibility("default"))) 00050 00051 // Use RTT_UNIT_EXPORT for static template class member variables 00052 // They must always be 'globally' visible. 00053 # define RTT_UNIT_EXPORT __attribute__((visibility("default"))) 00054 00055 // Use RTT_UNIT_HIDE to explicitly hide a symbol 00056 # define RTT_UNIT_HIDE __attribute__((visibility("hidden"))) 00057 00058 # else 00059 # define RTT_UNIT_API 00060 # define RTT_UNIT_EXPORT __attribute__((visibility("default"))) 00061 # define RTT_UNIT_HIDE __attribute__((visibility("hidden"))) 00062 # endif 00063 #else 00064 // Win32 and NOT GNU 00065 # if defined( WIN32 ) && !defined ( __MINGW32__ ) 00066 # if defined(RTT_UNIT_DLL_EXPORT) 00067 # define RTT_UNIT_API __declspec(dllexport) 00068 # define RTT_UNIT_EXPORT __declspec(dllexport) 00069 # define RTT_UNIT_HIDE 00070 # else 00071 # define RTT_UNIT_API __declspec(dllimport) 00072 # define RTT_UNIT_EXPORT __declspec(dllimport) 00073 # define RTT_UNIT_HIDE 00074 # endif 00075 # else 00076 # define RTT_UNIT_API 00077 # define RTT_UNIT_EXPORT 00078 # define RTT_UNIT_HIDE 00079 # endif 00080 #endif