From ec8813be526fdab9f8ee43bd520017c3ab1f135c Mon Sep 17 00:00:00 2001 From: mat007 Date: Sat, 5 May 2012 15:01:06 +0000 Subject: [PATCH] Refactoring git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@446 860be788-9bd5-4423-9f1e-828f051e677b --- build/vc100/turtle_test.vcxproj | 1 + build/vc100/turtle_test.vcxproj.filters | 3 +++ build/vc80/turtle_test.vcproj | 10 +++++++--- src/tests/turtle_test/args_test.cpp | 21 +++++++++++++++++++++ src/tests/turtle_test/mock_test.cpp | 9 --------- 5 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 src/tests/turtle_test/args_test.cpp diff --git a/build/vc100/turtle_test.vcxproj b/build/vc100/turtle_test.vcxproj index 3a9123e..3315134 100644 --- a/build/vc100/turtle_test.vcxproj +++ b/build/vc100/turtle_test.vcxproj @@ -22,6 +22,7 @@ + diff --git a/build/vc100/turtle_test.vcxproj.filters b/build/vc100/turtle_test.vcxproj.filters index 52ff5b9..7ebabd1 100644 --- a/build/vc100/turtle_test.vcxproj.filters +++ b/build/vc100/turtle_test.vcxproj.filters @@ -48,5 +48,8 @@ Source Files + + Source Files + \ No newline at end of file diff --git a/build/vc80/turtle_test.vcproj b/build/vc80/turtle_test.vcproj index 4c642e3..05d294f 100644 --- a/build/vc80/turtle_test.vcproj +++ b/build/vc80/turtle_test.vcproj @@ -1,7 +1,7 @@ @@ -190,6 +190,10 @@ Name="Source Files" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx;h;hpp;hxx;hm;inl;inc;xsd" > + + diff --git a/src/tests/turtle_test/args_test.cpp b/src/tests/turtle_test/args_test.cpp new file mode 100644 index 0000000..33cc863 --- /dev/null +++ b/src/tests/turtle_test/args_test.cpp @@ -0,0 +1,21 @@ +// +// 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) +// +// See http://turtle.sf.net for documentation. + +#include +#include +#include + +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 > )); diff --git a/src/tests/turtle_test/mock_test.cpp b/src/tests/turtle_test/mock_test.cpp index c828e42..cd40f0d 100644 --- a/src/tests/turtle_test/mock_test.cpp +++ b/src/tests/turtle_test/mock_test.cpp @@ -31,15 +31,6 @@ namespace float( int ), mock::detail::signature< BOOST_TYPEOF( &s::m2 ) >::type > )); - - 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 > )); } namespace