Refactoring

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@446 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2012-05-05 15:01:06 +00:00
parent a9c57304a2
commit ec8813be52
5 changed files with 32 additions and 12 deletions

View file

@ -22,6 +22,7 @@
<ClInclude Include="..\..\src\tests\turtle_test\mock_error.hpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\tests\turtle_test\args_test.cpp" />
<ClCompile Include="..\..\src\tests\turtle_test\constraints_test.cpp" />
<ClCompile Include="..\..\src\tests\turtle_test\error_test.cpp" />
<ClCompile Include="..\..\src\tests\turtle_test\function_test.cpp" />

View file

@ -48,5 +48,8 @@
<ClCompile Include="..\..\src\tests\turtle_test\max_args_test.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\tests\turtle_test\args_test.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Version="8,00"
Name="turtle_test"
ProjectGUID="{74810A2A-33D8-47D6-9A50-71261F1683F5}"
RootNamespace="turtle_test"
@ -95,7 +95,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="cd ../../run/vc80&#x0D;&#x0A;&quot;$(TargetDir)$(TargetName).exe&quot; --result_code=no --report_level=no --log_level=warning"
CommandLine="cd ../../run/vc80&#x0D;&#x0A;&quot;$(TargetDir)$(TargetName).exe&quot; --result_code=no --report_level=no --log_level=warning&#x0D;&#x0A;"
/>
</Configuration>
<Configuration
@ -179,7 +179,7 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="cd ../../run/vc80&#x0D;&#x0A;&quot;$(TargetDir)$(TargetName).exe&quot; --result_code=no --report_level=no --log_level=warning"
CommandLine="cd ../../run/vc80&#x0D;&#x0A;&quot;$(TargetDir)$(TargetName).exe&quot; --result_code=no --report_level=no --log_level=warning&#x0D;&#x0A;"
/>
</Configuration>
</Configurations>
@ -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"
>
<File
RelativePath="..\..\src\tests\turtle_test\args_test.cpp"
>
</File>
<File
RelativePath="..\..\src\tests\turtle_test\constraints_test.cpp"
>

View file

@ -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 <turtle/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

@ -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