![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /proc/self/root/usr/include/boost/test/tools/ |
Upload File : |
// (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 C string comparison with enhanced reporting // *************************************************************************** #ifndef BOOST_TEST_TOOLS_CSTRING_COMPARISON_OP_HPP_050815GER #define BOOST_TEST_TOOLS_CSTRING_COMPARISON_OP_HPP_050815GER // Boost.Test #include <boost/test/tools/assertion.hpp> #include <boost/test/utils/is_cstring.hpp> #include <boost/test/utils/basic_cstring/compare.hpp> // Boost #include <boost/utility/enable_if.hpp> #include <boost/test/detail/suppress_warnings.hpp> //____________________________________________________________________________// namespace boost { namespace test_tools { namespace assertion { namespace op { // ************************************************************************** // // ************** string_compare ************** // // ************************************************************************** // #define DEFINE_CSTRING_COMPARISON( oper, name, rev ) \ template<typename Lhs,typename Rhs> \ struct name<Lhs,Rhs,typename boost::enable_if_c< \ ( unit_test::is_cstring_comparable<Lhs>::value \ && unit_test::is_cstring_comparable<Rhs>::value) \ >::type > \ { \ typedef typename unit_test::deduce_cstring<Lhs>::type lhs_char_type; \ typedef typename unit_test::deduce_cstring<Rhs>::type rhs_char_type; \ public: \ typedef assertion_result result_type; \ \ typedef name< \ typename lhs_char_type::value_type, \ typename rhs_char_type::value_type> elem_op; \ \ static bool \ eval( Lhs const& lhs, Rhs const& rhs) \ { \ return lhs_char_type(lhs) oper rhs_char_type(rhs); \ } \ \ template<typename PrevExprType> \ static void \ report( std::ostream& ostr, \ PrevExprType const& lhs, \ Rhs const& rhs) \ { \ lhs.report( ostr ); \ ostr << revert() \ << tt_detail::print_helper( rhs ); \ } \ \ static char const* revert() \ { return " " #rev " "; } \ }; \ /**/ BOOST_TEST_FOR_EACH_COMP_OP( DEFINE_CSTRING_COMPARISON ) #undef DEFINE_CSTRING_COMPARISON //____________________________________________________________________________// } // namespace op } // namespace assertion } // namespace test_tools } // namespace boost #include <boost/test/detail/enable_warnings.hpp> #endif // BOOST_TEST_TOOLS_CSTRING_COMPARISON_OP_HPP_050815GER