config.hpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // (C) Copyright Gennadiy Rozental 2001.
  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. // See http://www.boost.org/libs/test for the library home page.
  6. //
  7. //!@file
  8. //!@brief common dataset macros
  9. // ***************************************************************************
  10. #ifndef BOOST_TEST_DATA_CONFIG_HPP_112611GER
  11. #define BOOST_TEST_DATA_CONFIG_HPP_112611GER
  12. // Boost.Test
  13. #include <boost/test/detail/config.hpp>
  14. #include <boost/test/detail/throw_exception.hpp>
  15. // STL
  16. #include <stdexcept> // for std::logic_error
  17. // availability on features: preprocessed by doxygen
  18. #if defined(BOOST_NO_CXX11_HDR_RANDOM) || defined(BOOST_TEST_DOXYGEN_DOC__)
  19. //! Defined when the random dataset feature is not available
  20. #define BOOST_TEST_NO_RANDOM_DATASET_AVAILABLE
  21. #endif
  22. #if defined(BOOST_NO_CXX11_HDR_TUPLE) || defined(BOOST_TEST_DOXYGEN_DOC__)
  23. //! Defined when grid composition of datasets is not available
  24. #define BOOST_TEST_NO_GRID_COMPOSITION_AVAILABLE
  25. //! Defined when zip composition of datasets is not available
  26. #define BOOST_TEST_NO_ZIP_COMPOSITION_AVAILABLE
  27. #endif
  28. //! Defined when the initializer_list implementation is buggy, such as for VS2013
  29. #if defined(_MSC_VER) && _MSC_VER < 1900
  30. # define BOOST_TEST_ERRONEOUS_INIT_LIST
  31. #endif
  32. //____________________________________________________________________________//
  33. #define BOOST_TEST_DS_ERROR( msg ) BOOST_TEST_I_THROW( std::logic_error( msg ) )
  34. #define BOOST_TEST_DS_ASSERT( cond, msg ) BOOST_TEST_I_ASSRT( cond, std::logic_error( msg ) )
  35. #endif // BOOST_TEST_DATA_CONFIG_HPP_112611GER