2
0
mirror of https://github.com/boostorg/test.git synced 2026-01-26 07:02:12 +00:00

number of warnings/remarks cleaned up

[SVN r82747]
This commit is contained in:
Gennadiy Rozental
2013-02-05 09:20:53 +00:00
parent 0b4af99471
commit 4631efa972
9 changed files with 33 additions and 30 deletions

View File

@@ -92,7 +92,7 @@ BOOST_TEST_DECL test_unit_id current_test_case_id(); /* safe version of a
BOOST_TEST_DECL test_unit& get( test_unit_id, test_unit_type );
template<typename UnitType>
UnitType& get( test_unit_id id )
inline UnitType& get( test_unit_id id )
{
return static_cast<UnitType&>( get( id, static_cast<test_unit_type>(UnitType::type) ) );
}
@@ -116,13 +116,13 @@ void apply_filters( test_unit_id );
// ************** framework errors ************** //
// ************************************************************************** //
struct BOOST_TEST_DECL internal_error : std::runtime_error {
struct BOOST_TEST_DECL internal_error : public std::runtime_error {
internal_error( const_string m ) : std::runtime_error( std::string( m.begin(), m.size() ) ) {}
};
//____________________________________________________________________________//
struct BOOST_TEST_DECL setup_error : std::runtime_error {
struct BOOST_TEST_DECL setup_error : public std::runtime_error {
setup_error( const_string m ) : std::runtime_error( std::string( m.begin(), m.size() ) ) {}
};

View File

@@ -48,7 +48,7 @@ operator<<( unit_test::lazy_ostream const&, bitwise ) { return 0; }
namespace tt_detail {
template<typename Lhs, typename Rhs, typename E>
assertion_result
inline assertion_result
bitwise_compare(Lhs const& lhs, Rhs const& rhs, E const& expr )
{
assertion_result pr( true );
@@ -89,7 +89,7 @@ bitwise_compare(Lhs const& lhs, Rhs const& rhs, E const& expr )
//____________________________________________________________________________//
template<typename T1, typename T2, typename T3, typename T4>
assertion_result
inline assertion_result
operator<<(assertion_evaluate_t<assertion::binary_expr<T1,T2,assertion::op::EQ<T3,T4> > > const& ae, bitwise )
{
return bitwise_compare( ae.m_e.lhs().value(), ae.m_e.rhs(), ae.m_e );

View File

@@ -147,7 +147,7 @@ struct tolerance_traits<percent_tolerance_t<FPT> > {
//____________________________________________________________________________//
template<typename FPT>
std::ostream& operator<<( std::ostream& out, percent_tolerance_t<FPT> t )
inline std::ostream& operator<<( std::ostream& out, percent_tolerance_t<FPT> t )
{
return out << t.m_value;
}
@@ -232,7 +232,7 @@ private:
// ************************************************************************** //
template<typename FPT1, typename FPT2, typename ToleranceType>
bool
inline bool
is_close_to( FPT1 left, FPT2 right, ToleranceType tolerance )
{
return fpc::close_at_tolerance<typename fpc::comp_supertype<FPT1,FPT2>::type>( tolerance, FPC_STRONG )( left, right );
@@ -273,7 +273,7 @@ private:
// ************************************************************************** //
template<typename FPT>
bool
inline bool
is_small( FPT fpv, FPT tolerance )
{
return small_with_tolerance<FPT>( tolerance )( fpv );

View File

@@ -33,7 +33,7 @@ namespace fpc = math::fpc;
// ************************************************************************** //
template<typename FPT>
FPT&
inline FPT&
fpc_tolerance()
{
static FPT s_value = FPT();

View File

@@ -12,14 +12,17 @@
// Description : contains definition for all test tools in test toolbox
// ***************************************************************************
#ifndef BOOST_TEST_OLD_TOOLBOX_HPP_111712GER
#define BOOST_TEST_OLD_TOOLBOX_HPP_111712GER
#ifndef BOOST_TEST_TOOLS_INTERFACE_HPP_111712GER
#define BOOST_TEST_TOOLS_INTERFACE_HPP_111712GER
// Boost.Test
#include <boost/test/unit_test_log.hpp>
#ifdef BOOST_TEST_TOOLS_DEBUGGABLE
#include <boost/test/debug.hpp>
#endif
#ifdef BOOST_NO_CXX11_AUTO_DECLARATIONS
#include <boost/test/tools/detail/expression_holder.hpp>
#endif
// Boost
#include <boost/preprocessor/control/iif.hpp>
@@ -362,4 +365,4 @@ do { try { \
#include <boost/test/detail/enable_warnings.hpp>
#endif // BOOST_TEST_OLD_TOOLBOX_HPP_111712GER
#endif // BOOST_TEST_TOOLS_INTERFACE_HPP_111712GER

View File

@@ -101,7 +101,7 @@ BOOST_PP_REPEAT( BOOST_TEST_MAX_PREDICATE_ARITY, IMPL_FRWD, _ )
//____________________________________________________________________________//
template <class Left, class Right>
assertion_result equal_impl( Left const& left, Right const& right )
inline assertion_result equal_impl( Left const& left, Right const& right )
{
return left == right;
}
@@ -301,7 +301,7 @@ struct BOOST_TEST_DECL check_is_close_t {
//____________________________________________________________________________//
template<typename FPT1, typename FPT2, typename ToleranceType>
assertion_result
inline assertion_result
check_is_close( FPT1 left, FPT2 right, ToleranceType tolerance )
{
return check_is_close_t()( left, right, tolerance );
@@ -328,7 +328,7 @@ struct BOOST_TEST_DECL check_is_small_t {
//____________________________________________________________________________//
template<typename FPT>
bool
inline bool
check_is_small( FPT fpv, FPT tolerance )
{
return fpc::is_small( fpv, tolerance );

View File

@@ -119,11 +119,11 @@ struct char_traits_with_find : std::string_char_traits<CharT> {
}
};
template<> struct bcs_char_traits_impl<char> : char_traits_with_find<char> {};
template<> struct bcs_char_traits_impl<wchar_t> : char_traits_with_find<wchar_t> {};
template<> struct bcs_char_traits_impl<char> : public char_traits_with_find<char> {};
template<> struct bcs_char_traits_impl<wchar_t> : public char_traits_with_find<wchar_t> {};
#else
template<> struct bcs_char_traits_impl<char> : std::char_traits<char> {};
template<> struct bcs_char_traits_impl<wchar_t> : std::char_traits<wchar_t> {};
template<> struct bcs_char_traits_impl<char> : public std::char_traits<char> {};
template<> struct bcs_char_traits_impl<wchar_t> : public std::char_traits<wchar_t> {};
#endif
template<typename CharT>

View File

@@ -33,21 +33,21 @@ namespace unit_test {
namespace ut_detail {
template<typename T>
struct is_cstring_impl : mpl::false_ {};
struct is_cstring_impl : public mpl::false_ {};
template<typename T>
struct is_cstring_impl<T const*> : is_cstring_impl<T*> {};
struct is_cstring_impl<T const*> : public is_cstring_impl<T*> {};
template<>
struct is_cstring_impl<char*> : mpl::true_ {};
struct is_cstring_impl<char*> : public mpl::true_ {};
template<>
struct is_cstring_impl<wchar_t*> : mpl::true_ {};
struct is_cstring_impl<wchar_t*> : public mpl::true_ {};
} // namespace ut_detail
template<typename T>
struct is_cstring : ut_detail::is_cstring_impl<typename decay<T>::type> {};
struct is_cstring : public ut_detail::is_cstring_impl<typename decay<T>::type> {};
} // namespace unit_test
} // namespace boost

View File

@@ -46,26 +46,26 @@ namespace unit_test {
#ifdef BOOST_NO_CXX11_DECLTYPE
template<typename T>
struct is_forward_iterable : mpl::false_ {};
struct is_forward_iterable : public mpl::false_ {};
template<typename T>
struct is_forward_iterable<T const> : is_forward_iterable<T> {};
struct is_forward_iterable<T const> : public is_forward_iterable<T> {};
template<typename T>
struct is_forward_iterable<T&> : is_forward_iterable<T> {};
struct is_forward_iterable<T&> : public is_forward_iterable<T> {};
template<typename T>
struct is_forward_iterable<std::vector<T> > : mpl::true_ {};
struct is_forward_iterable<std::vector<T> > : public mpl::true_ {};
template<typename T>
struct is_forward_iterable<std::list<T> > : mpl::true_ {};
struct is_forward_iterable<std::list<T> > : public mpl::true_ {};
#else
namespace ut_detail {
template<typename T>
struct is_present : mpl::true_ {};
struct is_present : public mpl::true_ {};
struct is_forward_iterable_impl {
template<typename T>