Initial work for G-code sender and more intensive usage of Boost

This commit is contained in:
Alessandro Ranellucci 2014-11-26 22:30:25 +01:00
parent 43cbad8867
commit 11dd67ab34
1649 changed files with 1860 additions and 1642 deletions

View file

@ -0,0 +1,104 @@
// (C) Copyright Gennadiy Rozental 2001-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version : $Revision: 63441 $
//
// Description : as a central place for global configuration switches
// ***************************************************************************
#ifndef BOOST_TEST_CONFIG_HPP_071894GER
#define BOOST_TEST_CONFIG_HPP_071894GER
// Boost
#include <boost/config.hpp> // compilers workarounds
#include <boost/detail/workaround.hpp>
//____________________________________________________________________________//
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)) || \
BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) || \
(defined __sgi && BOOST_WORKAROUND(_COMPILER_VERSION, BOOST_TESTED_AT(730)))
# define BOOST_TEST_SHIFTED_LINE
#endif
//____________________________________________________________________________//
#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32))
# define BOOST_TEST_CALL_DECL __cdecl
#else
# define BOOST_TEST_CALL_DECL /**/
#endif
//____________________________________________________________________________//
#if !defined(BOOST_NO_STD_LOCALE) && \
!BOOST_WORKAROUND(BOOST_MSVC, < 1310) && \
!defined(__MWERKS__)
# define BOOST_TEST_USE_STD_LOCALE 1
#endif
//____________________________________________________________________________//
#if BOOST_WORKAROUND(__BORLANDC__, <= 0x570) || \
BOOST_WORKAROUND( __COMO__, <= 0x433 ) || \
BOOST_WORKAROUND( __INTEL_COMPILER, <= 800 ) || \
defined(__sgi) && _COMPILER_VERSION <= 730 || \
BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) || \
defined(__DECCXX) || \
defined(__DMC__)
# define BOOST_TEST_NO_PROTECTED_USING
#endif
//____________________________________________________________________________//
#if defined(__GNUC__) || BOOST_WORKAROUND(BOOST_MSVC, == 1400)
#define BOOST_TEST_PROTECTED_VIRTUAL virtual
#else
#define BOOST_TEST_PROTECTED_VIRTUAL
#endif
//____________________________________________________________________________//
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) && \
!BOOST_WORKAROUND(BOOST_MSVC, <1310) && \
!BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x530))
# define BOOST_TEST_SUPPORT_INTERACTION_TESTING 1
#endif
//____________________________________________________________________________//
#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_TEST_DYN_LINK)
# define BOOST_TEST_DYN_LINK
#endif
#if defined(BOOST_TEST_INCLUDED)
# undef BOOST_TEST_DYN_LINK
#endif
#if defined(BOOST_TEST_DYN_LINK)
# define BOOST_TEST_ALTERNATIVE_INIT_API
# ifdef BOOST_TEST_SOURCE
# define BOOST_TEST_DECL BOOST_SYMBOL_EXPORT
# else
# define BOOST_TEST_DECL BOOST_SYMBOL_IMPORT
# endif // BOOST_TEST_SOURCE
#else
# define BOOST_TEST_DECL
#endif
#if !defined(BOOST_TEST_MAIN) && defined(BOOST_AUTO_TEST_MAIN)
#define BOOST_TEST_MAIN BOOST_AUTO_TEST_MAIN
#endif
#if !defined(BOOST_TEST_MAIN) && defined(BOOST_TEST_MODULE)
#define BOOST_TEST_MAIN BOOST_TEST_MODULE
#endif
#endif // BOOST_TEST_CONFIG_HPP_071894GER

View file

@ -0,0 +1,30 @@
// (C) Copyright Gennadiy Rozental 2004-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version : $Revision: 54633 $
//
// Description : enable previosly suppressed warnings
// ***************************************************************************
#ifdef BOOST_MSVC
# pragma warning(default: 4511) // copy constructor can't not be generated
# pragma warning(default: 4512) // assignment operator can't not be generated
# pragma warning(default: 4100) // unreferenced formal parameter
# pragma warning(default: 4996) // <symbol> was declared deprecated
# pragma warning(default: 4355) // 'this' : used in base member initializer list
# pragma warning(default: 4706) // assignment within conditional expression
# pragma warning(default: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B'
# pragma warning(default: 4127) // conditional expression is constant
# pragma warning(default: 4290) // C++ exception specification ignored except to ...
# pragma warning(default: 4180) // qualifier applied to function type has no meaning; ignored
# pragma warning(default: 4275) // non dll-interface class ... used as base for dll-interface class ...
# pragma warning(default: 4267) // 'var' : conversion from 'size_t' to 'type', possible loss of data
# pragma warning(default: 4511) // 'class' : copy constructor could not be generated
# pragma warning(pop)
#endif

View file

@ -0,0 +1,48 @@
// (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version : $Revision: 49312 $
//
// Description : contains forward eclarations for Boost.Test data types
// ***************************************************************************
#ifndef BOOST_TEST_FWD_DECL_HPP_011605GER
#define BOOST_TEST_FWD_DECL_HPP_011605GER
namespace boost {
class execution_monitor;
class execution_exception;
namespace unit_test {
class test_unit;
class test_case;
class test_suite;
class master_test_suite_t;
class test_tree_visitor;
class test_observer;
// singletons
class unit_test_monitor_t;
class unit_test_log_t;
class unit_test_log_formatter;
struct log_entry_data;
struct log_checkpoint_data;
class lazy_ostream;
} // namespace unit_test
} // namespace boost
#endif // BOOST_TEST_FWD_DECL_HPP_011605GER

View file

@ -0,0 +1,88 @@
// (C) Copyright Gennadiy Rozental 2001-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version : $Revision: 54633 $
//
// Description : some trivial global typedefs
// ***************************************************************************
#ifndef BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
#define BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
#include <boost/test/utils/basic_cstring/basic_cstring.hpp>
#define BOOST_TEST_L( s ) boost::unit_test::const_string( s, sizeof( s ) - 1 )
#define BOOST_TEST_STRINGIZE( s ) BOOST_TEST_L( BOOST_STRINGIZE( s ) )
#define BOOST_TEST_EMPTY_STRING BOOST_TEST_L( "" )
#include <boost/test/detail/suppress_warnings.hpp>
//____________________________________________________________________________//
namespace boost {
namespace unit_test {
typedef unsigned long counter_t;
//____________________________________________________________________________//
enum report_level { INV_REPORT_LEVEL, CONFIRMATION_REPORT, SHORT_REPORT, DETAILED_REPORT, NO_REPORT };
//____________________________________________________________________________//
enum output_format { INV_OF, CLF /* compiler log format */, XML /* XML */ };
//____________________________________________________________________________//
enum test_unit_type { tut_case = 0x01, tut_suite = 0x10, tut_any = 0x11 };
//____________________________________________________________________________//
typedef unsigned long test_unit_id;
const test_unit_id INV_TEST_UNIT_ID = 0xFFFFFFFF;
const test_unit_id MAX_TEST_CASE_ID = 0xFFFFFFFE;
const test_unit_id MIN_TEST_CASE_ID = 0x00010000;
const test_unit_id MAX_TEST_SUITE_ID = 0x0000FF00;
const test_unit_id MIN_TEST_SUITE_ID = 0x00000001;
//____________________________________________________________________________//
namespace ut_detail {
inline test_unit_type
test_id_2_unit_type( test_unit_id id )
{
return (id & 0xFFFF0000) != 0 ? tut_case : tut_suite;
}
//____________________________________________________________________________//
// helper templates to prevent ODR violations
template<class T>
struct static_constant {
static T value;
};
template<class T>
T static_constant<T>::value;
//____________________________________________________________________________//
} // namespace ut_detail
} // namespace unit_test
} // namespace boost
//____________________________________________________________________________//
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER

View file

@ -0,0 +1,43 @@
// (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version : $Revision: 49312 $
//
// Description : shared definition for unit test log levels
// ***************************************************************************
#ifndef BOOST_TEST_LOG_LEVEL_HPP_011605GER
#define BOOST_TEST_LOG_LEVEL_HPP_011605GER
namespace boost {
namespace unit_test {
// ************************************************************************** //
// ************** log levels ************** //
// ************************************************************************** //
// each log level includes all subsequent higher loging levels
enum log_level {
invalid_log_level = -1,
log_successful_tests = 0,
log_test_units = 1,
log_messages = 2,
log_warnings = 3,
log_all_errors = 4, // reported by unit test macros
log_cpp_exception_errors = 5, // uncaught C++ exceptions
log_system_errors = 6, // including timeouts, signals, traps
log_fatal_errors = 7, // including unit test macros or
// fatal system errors
log_nothing = 8
};
} // namespace unit_test
} // namespace boost
#endif // BOOST_TEST_LOG_LEVEL_HPP_011605GER

View file

@ -0,0 +1,31 @@
// (C) Copyright Gennadiy Rozental 2004-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version : $Revision: 54633 $
//
// Description : suppress some warnings
// ***************************************************************************
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable: 4511) // copy constructor can't not be generated
# pragma warning(disable: 4512) // assignment operator can't not be generated
# pragma warning(disable: 4100) // unreferenced formal parameter
# pragma warning(disable: 4996) // <symbol> was declared deprecated
# pragma warning(disable: 4355) // 'this' : used in base member initializer list
# pragma warning(disable: 4706) // assignment within conditional expression
# pragma warning(disable: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B'
# pragma warning(disable: 4127) // conditional expression is constant
# pragma warning(disable: 4290) // C++ exception specification ignored except to ...
# pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored
# pragma warning(disable: 4275) // non dll-interface class ... used as base for dll-interface class ...
# pragma warning(disable: 4267) // 'var' : conversion from 'size_t' to 'type', possible loss of data
# pragma warning(disable: 4511) // 'class' : copy constructor could not be generated
#endif

View file

@ -0,0 +1,69 @@
// (C) Copyright Gennadiy Rozental 2001-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version : $Revision: 57992 $
//
// Description : storage for unit test framework parameters information
// ***************************************************************************
#ifndef BOOST_TEST_UNIT_TEST_PARAMETERS_HPP_071894GER
#define BOOST_TEST_UNIT_TEST_PARAMETERS_HPP_071894GER
#include <boost/test/detail/global_typedef.hpp>
#include <boost/test/detail/log_level.hpp>
#include <boost/test/detail/suppress_warnings.hpp>
// STL
#include <iosfwd>
//____________________________________________________________________________//
namespace boost {
namespace unit_test {
// ************************************************************************** //
// ************** runtime_config ************** //
// ************************************************************************** //
namespace runtime_config {
BOOST_TEST_DECL void init( int& argc, char** argv );
BOOST_TEST_DECL unit_test::log_level log_level();
BOOST_TEST_DECL bool no_result_code();
BOOST_TEST_DECL unit_test::report_level report_level();
BOOST_TEST_DECL const_string test_to_run();
BOOST_TEST_DECL const_string break_exec_path();
BOOST_TEST_DECL bool save_pattern();
BOOST_TEST_DECL bool show_build_info();
BOOST_TEST_DECL bool show_progress();
BOOST_TEST_DECL bool catch_sys_errors();
BOOST_TEST_DECL bool auto_start_dbg();
BOOST_TEST_DECL bool use_alt_stack();
BOOST_TEST_DECL bool detect_fp_exceptions();
BOOST_TEST_DECL output_format report_format();
BOOST_TEST_DECL output_format log_format();
BOOST_TEST_DECL std::ostream* report_sink();
BOOST_TEST_DECL std::ostream* log_sink();
BOOST_TEST_DECL long detect_memory_leaks();
BOOST_TEST_DECL int random_seed();
} // namespace runtime_config
} // namespace unit_test
} // namespace boost
//____________________________________________________________________________//
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_UNIT_TEST_PARAMETERS_HPP_071894GER

View file

@ -0,0 +1,65 @@
// (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org/libs/test for the library home page.
//
// File : $RCSfile$
//
// Version : $Revision: 54633 $
//
// Description : contains mics. workarounds
// ***************************************************************************
#ifndef BOOST_TEST_WORKAROUND_HPP_021005GER
#define BOOST_TEST_WORKAROUND_HPP_021005GER
// Boost
#include <boost/config.hpp> // compilers workarounds and std::ptrdiff_t
// STL
#include <iterator> // for std::distance
#include <boost/test/detail/suppress_warnings.hpp>
//____________________________________________________________________________//
namespace boost {
namespace unit_test {
namespace ut_detail {
#ifdef BOOST_NO_STD_DISTANCE
template <class T>
std::ptrdiff_t distance( T const& x_, T const& y_ )
{
std::ptrdiff_t res = 0;
std::distance( x_, y_, res );
return res;
}
//____________________________________________________________________________//
#else
using std::distance;
#endif
template <class T> inline void ignore_unused_variable_warning(const T&) {}
} // namespace ut_detail
} // namespace unit_test
namespace unit_test_framework = unit_test;
} // namespace boost
//____________________________________________________________________________//
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_WORKAROUND_HPP_021005GER