Refactoring

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@479 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2012-07-22 06:52:39 +00:00
parent 4a128a0221
commit cf264cd31e
9 changed files with 75 additions and 98 deletions

View file

@ -1,20 +0,0 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2009
//
// 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/args.hpp>
#include <boost/test/auto_unit_test.hpp>
#include <boost/mpl/assert.hpp>
BOOST_MPL_ASSERT(( boost::is_same< float, mock::detail::arg< void( float ), 1, 1 >::type > ));
BOOST_MPL_ASSERT(( boost::is_same< float, mock::detail::arg< void( float, int ), 1, 2 >::type > ));
BOOST_MPL_ASSERT(( boost::is_same< int, mock::detail::arg< void( float, int ), 2, 2 >::type > ));
BOOST_MPL_ASSERT(( boost::is_same< mock::detail::invalid_type, mock::detail::arg< void( float ), 1, 2 >::type > ));
BOOST_MPL_ASSERT(( boost::is_same< mock::detail::invalid_type, mock::detail::arg< void( float ), 2, 2 >::type > ));
BOOST_MPL_ASSERT(( boost::is_same< mock::detail::invalid_type, mock::detail::arg< void( float, int ), 1, 1 >::type > ));
BOOST_MPL_ASSERT(( boost::is_same< mock::detail::invalid_type, mock::detail::arg< void( float, int ), 1, 3 >::type > ));
BOOST_MPL_ASSERT(( boost::is_same< mock::detail::invalid_type, mock::detail::arg< void( float, int ), 2, 3 >::type > ));

View file

@ -0,0 +1,15 @@
// http://turtle.sourceforge.net
//
// Copyright Mathieu Champlon 2009
//
// 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/parameters.hpp>
#include <boost/test/auto_unit_test.hpp>
#include <boost/mpl/assert.hpp>
BOOST_MPL_ASSERT(( boost::is_same< float, mock::detail::parameters< void( float ), 1 >::at< 0 >::type > ));
BOOST_MPL_ASSERT(( boost::is_same< float, mock::detail::parameters< void( float, int ), 2 >::at< 0 >::type > ));
BOOST_MPL_ASSERT(( boost::is_same< int, mock::detail::parameters< void( float, int ), 2 >::at< 1 >::type > ));