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" /> <ClInclude Include="..\..\src\tests\turtle_test\mock_error.hpp" />
</ItemGroup> </ItemGroup>
<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\constraints_test.cpp" />
<ClCompile Include="..\..\src\tests\turtle_test\error_test.cpp" /> <ClCompile Include="..\..\src\tests\turtle_test\error_test.cpp" />
<ClCompile Include="..\..\src\tests\turtle_test\function_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"> <ClCompile Include="..\..\src\tests\turtle_test\max_args_test.cpp">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\..\src\tests\turtle_test\args_test.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="8.00" Version="8,00"
Name="turtle_test" Name="turtle_test"
ProjectGUID="{74810A2A-33D8-47D6-9A50-71261F1683F5}" ProjectGUID="{74810A2A-33D8-47D6-9A50-71261F1683F5}"
RootNamespace="turtle_test" RootNamespace="turtle_test"
@ -95,7 +95,7 @@
/> />
<Tool <Tool
Name="VCPostBuildEventTool" 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>
<Configuration <Configuration
@ -179,7 +179,7 @@
/> />
<Tool <Tool
Name="VCPostBuildEventTool" 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>
</Configurations> </Configurations>
@ -190,6 +190,10 @@
Name="Source Files" Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx;h;hpp;hxx;hm;inl;inc;xsd" 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 <File
RelativePath="..\..\src\tests\turtle_test\constraints_test.cpp" 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 ), float( int ),
mock::detail::signature< BOOST_TYPEOF( &s::m2 ) >::type 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 namespace