mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@549 860be788-9bd5-4423-9f1e-828f051e677b
32 lines
873 B
C++
32 lines
873 B
C++
// http://turtle.sourceforge.net
|
|
//
|
|
// Copyright Mathieu Champlon 2012
|
|
//
|
|
// 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)
|
|
|
|
#include <turtle/detail/check.hpp>
|
|
#include <boost/test/auto_unit_test.hpp>
|
|
|
|
namespace
|
|
{
|
|
template< typename Expected, typename Actual >
|
|
bool check( Expected expected, Actual actual )
|
|
{
|
|
return mock::detail::check< Actual, Expected >( expected )( actual );
|
|
}
|
|
}
|
|
|
|
BOOST_AUTO_TEST_CASE( int_and_int_can_be_compared )
|
|
{
|
|
BOOST_CHECK( check( 3, 3 ) );
|
|
BOOST_CHECK( ! check( 3, 4 ) );
|
|
BOOST_CHECK( ! check( 4, 3 ) );
|
|
}
|
|
|
|
BOOST_AUTO_TEST_CASE( ref_to_int_and_int_can_be_compared )
|
|
{
|
|
BOOST_CHECK( check( 3, boost::cref( 3 ) ) );
|
|
BOOST_CHECK( ! check( 4, boost::cref( 3 ) ) );
|
|
}
|