From 0fa887deebf386a30027610ef83bb4aaefdb58c4 Mon Sep 17 00:00:00 2001 From: mat007 Date: Thu, 12 Apr 2012 16:21:02 +0000 Subject: [PATCH] Reverted previous commit git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@440 860be788-9bd5-4423-9f1e-828f051e677b --- src/libraries/turtle/check.hpp | 8 +------- src/tests/turtle_test/integration_test.cpp | 20 -------------------- 2 files changed, 1 insertion(+), 27 deletions(-) diff --git a/src/libraries/turtle/check.hpp b/src/libraries/turtle/check.hpp index d9410a3..4caca9d 100644 --- a/src/libraries/turtle/check.hpp +++ b/src/libraries/turtle/check.hpp @@ -20,12 +20,6 @@ namespace mock { - template< typename Actual, typename Expected > - bool compare( const Actual& actual, const Expected& expected ) - { - return actual == expected; - } - namespace detail { template< typename Actual > @@ -55,7 +49,7 @@ namespace detail private: virtual bool operator()( Actual actual ) { - return mock::compare( actual, boost::unwrap_ref( expected_ ) ); + return actual == boost::unwrap_ref( expected_ ); } virtual void serialize( std::ostream& s ) const { diff --git a/src/tests/turtle_test/integration_test.cpp b/src/tests/turtle_test/integration_test.cpp index ca7b69d..6abd303 100644 --- a/src/tests/turtle_test/integration_test.cpp +++ b/src/tests/turtle_test/integration_test.cpp @@ -535,23 +535,3 @@ BOOST_AUTO_TEST_CASE( a_static_method_in_a_template_class_can_be_mocked ) BOOST_CHECK( MOCK_VERIFY( some_template_class< int >::some_static_method ) ); MOCK_RESET( some_template_class< int >::some_static_method ); } - -namespace -{ - struct non_comparable_type - {}; -} - -namespace mock -{ - bool compare( non_comparable_type, non_comparable_type ) - { - return true; - } -} - -BOOST_AUTO_TEST_CASE( compare_function_can_be_used_to_customize_validation ) -{ - MOCK_FUNCTOR( f, void( non_comparable_type ) ); - MOCK_EXPECT( f ).with( non_comparable_type() ); -}