early-access version 3088

This commit is contained in:
pineappleEA
2022-11-05 15:35:56 +01:00
parent 4e4fc25ce3
commit b601909c6d
35519 changed files with 5996896 additions and 860 deletions

View File

@@ -0,0 +1,170 @@
// (C) Copyright Gennadiy Rozental 2001.
// 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
//!@brief 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 defined(_WIN32) && !defined(BOOST_DISABLE_WIN32) && \
(!defined(__COMO__) && !defined(__MWERKS__) && \
!defined(__GNUC__) && !defined(BOOST_EMBTC) || \
BOOST_WORKAROUND(__MWERKS__, >= 0x3000))
# define BOOST_SEH_BASED_SIGNAL_HANDLING
#endif
#if defined(__COMO__) && defined(_MSC_VER)
// eh.h uses type_info without declaring it.
class type_info;
# define BOOST_SEH_BASED_SIGNAL_HANDLING
#endif
//____________________________________________________________________________//
#if BOOST_WORKAROUND(BOOST_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) && !defined(__MWERKS__)
# define BOOST_TEST_USE_STD_LOCALE 1
#endif
//____________________________________________________________________________//
#if BOOST_WORKAROUND(BOOST_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 BOOST_WORKAROUND(BOOST_MSVC, < 1400)
#define BOOST_TEST_PROTECTED_VIRTUAL
#else
#define BOOST_TEST_PROTECTED_VIRTUAL virtual
#endif
//____________________________________________________________________________//
#if !defined(BOOST_BORLANDC) && !BOOST_WORKAROUND( __SUNPRO_CC, < 0x5100 )
#define BOOST_TEST_SUPPORT_TOKEN_ITERATOR 1
#endif
//____________________________________________________________________________//
// Sun compiler does not support visibility on enums
#if defined(__SUNPRO_CC)
#define BOOST_TEST_ENUM_SYMBOL_VISIBLE
#else
#define BOOST_TEST_ENUM_SYMBOL_VISIBLE BOOST_SYMBOL_VISIBLE
#endif
//____________________________________________________________________________//
#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_TEST_DYN_LINK)
# define BOOST_TEST_DYN_LINK
#endif
// in case any of the define from cmake/b2 is set
#if !defined(BOOST_TEST_DYN_LINK) \
&& (defined(BOOST_UNIT_TEST_FRAMEWORK_DYN_LINK) \
|| defined(BOOST_TEST_EXEC_MONITOR_DYN_LINK) \
|| defined(BOOST_PRG_EXEC_MONITOR_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 BOOST_SYMBOL_VISIBLE
# else
# define BOOST_TEST_DECL BOOST_SYMBOL_IMPORT BOOST_SYMBOL_VISIBLE
# endif // BOOST_TEST_SOURCE
#else
# if defined(BOOST_TEST_INCLUDED)
# define BOOST_TEST_DECL
# else
# define BOOST_TEST_DECL BOOST_SYMBOL_VISIBLE
# endif
#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
#ifndef BOOST_PP_VARIADICS /* we can change this only if not already defined */
#ifdef __PGI
#define BOOST_PP_VARIADICS 1
#endif
#if BOOST_CLANG
#define BOOST_PP_VARIADICS 1
#endif
#if defined(BOOST_GCC) && (BOOST_GCC >= 4 * 10000 + 8 * 100)
#define BOOST_PP_VARIADICS 1
#endif
#if defined(__NVCC__)
#define BOOST_PP_VARIADICS 1
#endif
#endif /* ifndef BOOST_PP_VARIADICS */
// some versions of VC exibit a manifest error with this BOOST_UNREACHABLE_RETURN
#if BOOST_WORKAROUND(BOOST_MSVC, < 1910)
# define BOOST_TEST_UNREACHABLE_RETURN(x) return x
#else
# define BOOST_TEST_UNREACHABLE_RETURN(x) BOOST_UNREACHABLE_RETURN(x)
#endif
//____________________________________________________________________________//
// string_view support
//____________________________________________________________________________//
// note the code should always be compatible with compiled version of boost.test
// using a pre-c++17 compiler
#ifndef BOOST_NO_CXX17_HDR_STRING_VIEW
#define BOOST_TEST_STRING_VIEW
#endif
#endif // BOOST_TEST_CONFIG_HPP_071894GER

View File

@@ -0,0 +1,36 @@
// (C) Copyright Gennadiy Rozental 2001.
// 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
//!@brief enable previously 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
#if defined(BOOST_CLANG) && (BOOST_CLANG == 1)
#pragma clang diagnostic pop
#endif
#if defined(BOOST_GCC) && (BOOST_GCC >= 4 * 10000 + 6 * 100)
# pragma GCC diagnostic pop
#endif

View File

@@ -0,0 +1,47 @@
// (C) Copyright Gennadiy Rozental 2001.
// 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
//!@brief 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;
class test_unit_fixture;
class global_fixture;
// 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,149 @@
// (C) Copyright Gennadiy Rozental 2001.
// 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
//!@brief 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 };
//____________________________________________________________________________//
//! Indicates the output format for the loggers or the test tree printing
enum output_format { OF_INVALID,
OF_CLF, ///< compiler log format
OF_XML, ///< XML format for report and log,
OF_JUNIT, ///< JUNIT format for report and log,
OF_CUSTOM_LOGGER, ///< User specified logger.
OF_DOT ///< dot format for output content
};
//____________________________________________________________________________//
enum test_unit_type { TUT_CASE = 0x01, TUT_SUITE = 0x10, TUT_ANY = 0x11 };
//____________________________________________________________________________//
enum assertion_result { AR_FAILED, AR_PASSED, AR_TRIGGERED };
//____________________________________________________________________________//
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 class for restoring the current test unit ID in a RAII manner
struct test_unit_id_restore {
test_unit_id_restore(test_unit_id& to_restore_, test_unit_id new_value)
: to_restore(to_restore_)
, bkup(to_restore_) {
to_restore = new_value;
}
~test_unit_id_restore() {
to_restore = bkup;
}
private:
test_unit_id& to_restore;
test_unit_id bkup;
};
//____________________________________________________________________________//
} // namespace ut_detail
// helper templates to prevent ODR violations
template<class T>
struct static_constant {
static T value;
};
template<class T>
T static_constant<T>::value;
//____________________________________________________________________________//
// helper defines for singletons.
// BOOST_TEST_SINGLETON_CONS should appear in the class body,
// BOOST_TEST_SINGLETON_CONS_IMPL should be in only one translation unit. The
// global instance should be declared by BOOST_TEST_SINGLETON_INST.
#define BOOST_TEST_SINGLETON_CONS_NO_CTOR( type ) \
public: \
static type& instance(); \
private: \
BOOST_DELETED_FUNCTION(type(type const&)) \
BOOST_DELETED_FUNCTION(type& operator=(type const&)) \
BOOST_DEFAULTED_FUNCTION(~type(), {}) \
/**/
#define BOOST_TEST_SINGLETON_CONS( type ) \
BOOST_TEST_SINGLETON_CONS_NO_CTOR(type) \
private: \
BOOST_DEFAULTED_FUNCTION(type(), {}) \
/**/
#define BOOST_TEST_SINGLETON_CONS_IMPL( type ) \
type& type::instance() { \
static type the_inst; return the_inst; \
} \
/**/
//____________________________________________________________________________//
#if defined(__APPLE_CC__) && defined(__GNUC__) && __GNUC__ < 4
#define BOOST_TEST_SINGLETON_INST( inst ) \
static BOOST_JOIN( inst, _t)& inst BOOST_ATTRIBUTE_UNUSED = BOOST_JOIN (inst, _t)::instance();
#else
#define BOOST_TEST_SINGLETON_INST( inst ) \
namespace { BOOST_JOIN( inst, _t)& inst BOOST_ATTRIBUTE_UNUSED = BOOST_JOIN( inst, _t)::instance(); }
#endif
} // namespace unit_test
} // namespace boost
//____________________________________________________________________________//
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER

View File

@@ -0,0 +1,42 @@
// (C) Copyright Gennadiy Rozental 2001.
// 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
//!@brief shared definition for unit test log levels
// ***************************************************************************
#ifndef BOOST_TEST_LOG_LEVEL_HPP_011605GER
#define BOOST_TEST_LOG_LEVEL_HPP_011605GER
#include <boost/test/detail/config.hpp>
namespace boost {
namespace unit_test {
// ************************************************************************** //
// ************** log levels ************** //
// ************************************************************************** //
// each log level includes all subsequent higher loging levels
enum BOOST_TEST_ENUM_SYMBOL_VISIBLE 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,49 @@
// (C) Copyright Gennadiy Rozental 2001.
// 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
//!@brief few helpers for working with variadic macros
// ***************************************************************************
#ifndef BOOST_TEST_PP_VARIADIC_HPP_021515GER
#define BOOST_TEST_PP_VARIADIC_HPP_021515GER
// Boost
#include <boost/preprocessor/control/iif.hpp>
#include <boost/preprocessor/comparison/equal.hpp>
#include <boost/preprocessor/variadic/size.hpp>
//____________________________________________________________________________//
#if BOOST_PP_VARIADICS
#if BOOST_PP_VARIADICS_MSVC
# define BOOST_TEST_INVOKE_VARIADIC( tool, ... ) BOOST_PP_CAT( tool (__VA_ARGS__), )
#else
# define BOOST_TEST_INVOKE_VARIADIC( tool, ... ) tool (__VA_ARGS__)
#endif
//____________________________________________________________________________//
/// if sizeof(__VA_ARGS__) == N: F1(__VA_ARGS__)
/// else: F2(__VA_ARGS__)
#define BOOST_TEST_INVOKE_IF_N_ARGS( N, F1, F2, ... ) \
BOOST_TEST_INVOKE_VARIADIC( \
BOOST_PP_IIF( \
BOOST_PP_EQUAL(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__), N), \
F1, \
F2), \
__VA_ARGS__ ) \
/**/
//____________________________________________________________________________//
#endif /* BOOST_PP_VARIADICS */
#endif // BOOST_TEST_PP_VARIADIC_HPP_021515GER
// EOF

View File

@@ -0,0 +1,41 @@
// (C) Copyright Gennadiy Rozental 2001.
// 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
//!@brief 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
#if defined(BOOST_CLANG) && (BOOST_CLANG == 1)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wvariadic-macros"
# pragma clang diagnostic ignored "-Wmissing-declarations"
#endif
#if defined(BOOST_GCC) && (BOOST_GCC >= 4 * 10000 + 6 * 100)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wvariadic-macros"
# pragma GCC diagnostic ignored "-Wmissing-declarations"
// # pragma GCC diagnostic ignored "-Wattributes"
#endif

View File

@@ -0,0 +1,71 @@
// (C) Copyright Gennadiy Rozental 2001.
// 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
//!@brief contains wrappers, which allows to build Boost.Test with no exception
// ***************************************************************************
#ifndef BOOST_TEST_DETAIL_THROW_EXCEPTION_HPP
#define BOOST_TEST_DETAIL_THROW_EXCEPTION_HPP
// Boost
#include <boost/config.hpp> // BOOST_NO_EXCEPTIONS
#ifdef BOOST_NO_EXCEPTIONS
// C RUNTIME
#include <stdlib.h>
#endif
#include <boost/test/detail/suppress_warnings.hpp>
//____________________________________________________________________________//
namespace boost {
namespace unit_test {
namespace ut_detail {
#ifdef BOOST_NO_EXCEPTIONS
template<typename E>
BOOST_NORETURN inline void
throw_exception(E const& /*e*/) { abort(); }
#define BOOST_TEST_I_TRY
#define BOOST_TEST_I_CATCH( T, var ) for(T const& var = *(T*)0; false;)
#define BOOST_TEST_I_CATCH0( T ) if(0)
#define BOOST_TEST_I_CATCHALL() if(0)
#define BOOST_TEST_I_RETHROW
#else
template<typename E>
BOOST_NORETURN inline void
throw_exception(E const& e) { throw e; }
#define BOOST_TEST_I_TRY try
#define BOOST_TEST_I_CATCH( T, var ) catch( T const& var )
#define BOOST_TEST_I_CATCH0( T ) catch( T const& )
#define BOOST_TEST_I_CATCHALL() catch(...)
#define BOOST_TEST_I_RETHROW throw
#endif
//____________________________________________________________________________//
#define BOOST_TEST_I_THROW( E ) unit_test::ut_detail::throw_exception( E )
#define BOOST_TEST_I_ASSRT( cond, ex ) if( cond ) {} else BOOST_TEST_I_THROW( ex )
} // namespace ut_detail
} // namespace unit_test
} // namespace boost
//____________________________________________________________________________//
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_DETAIL_THROW_EXCEPTION_HPP