Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67262 - sandbox/tti/libs/tti/test
From: eldiener_at_[hidden]
Date: 2010-12-15 22:32:57


Author: eldiener
Date: 2010-12-15 22:32:53 EST (Wed, 15 Dec 2010)
New Revision: 67262
URL: http://svn.boost.org/trac/boost/changeset/67262

Log:
Updated tests
Added:
   sandbox/tti/libs/tti/test/TestVMHasTemplateCheckParamsFail3.cpp (contents, props changed)
   sandbox/tti/libs/tti/test/TestVMHasTemplateCheckParamsFail4.cpp (contents, props changed)
Text files modified:
   sandbox/tti/libs/tti/test/TestHasMember.cpp | 8 ++++----
   sandbox/tti/libs/tti/test/TestHasMember.hpp | 6 +++---
   sandbox/tti/libs/tti/test/TestHasMemberCompile.cpp | 8 ++++----
   3 files changed, 11 insertions(+), 11 deletions(-)

Modified: sandbox/tti/libs/tti/test/TestHasMember.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestHasMember.cpp (original)
+++ sandbox/tti/libs/tti/test/TestHasMember.cpp 2010-12-15 22:32:53 EST (Wed, 15 Dec 2010)
@@ -7,14 +7,14 @@
   BOOST_TEST(tti::has_member_AnInt<int AType::*>::value);
   BOOST_TEST(tti::has_member_AnInt<long AnotherType::*>::value);
   BOOST_TEST(tti::has_member_VoidFunction<void (AType::*)()>::value);
- BOOST_TEST(tti::has_member_IntFunction<int (AType::*)()>::value);
- BOOST_TEST(tti::has_member_IntFunction<double (AnotherType::*)(int)>::value);
+ BOOST_TEST(tti::FunctionReturningInt<int (AType::*)()>::value);
+ BOOST_TEST(tti::FunctionReturningInt<double (AnotherType::*)(int)>::value);
   BOOST_TEST(tti::has_member_aFunction<AType (AnotherType::*)(int)>::value);
- BOOST_TEST(tti::has_member_anotherFunction<int (AnotherType::*)(AType)>::value);
+ BOOST_TEST(tti::AnotherIntFunction<int (AnotherType::*)(AType)>::value);
   BOOST_TEST(tti::has_member_sFunction<AType::AnIntType (AnotherType::*)(int,long,double)>::value);
   BOOST_TEST(tti::has_member_aMember<bool AnotherType::*>::value);
   BOOST_TEST(!tti::has_member_aMember<int AnotherType::*>::value);
- BOOST_TEST(tti::has_member_cMem<bool AnotherType::*>::value);
+ BOOST_TEST(tti::CMember<bool AnotherType::*>::value);
   BOOST_TEST(!tti::has_member_someDataMember<short AType::*>::value);
   BOOST_TEST(!tti::has_member_someFunctionMember<AType (AnotherType::*)(long,int)>::value);
   

Modified: sandbox/tti/libs/tti/test/TestHasMember.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestHasMember.hpp (original)
+++ sandbox/tti/libs/tti/test/TestHasMember.hpp 2010-12-15 22:32:53 EST (Wed, 15 Dec 2010)
@@ -6,12 +6,12 @@
 
 TTI_HAS_MEMBER(AnInt)
 TTI_HAS_MEMBER(VoidFunction)
-TTI_HAS_MEMBER(IntFunction)
+TTI_TRAIT_HAS_MEMBER(FunctionReturningInt,IntFunction)
 TTI_HAS_MEMBER(aFunction)
-TTI_HAS_MEMBER(anotherFunction)
+TTI_TRAIT_HAS_MEMBER(AnotherIntFunction,anotherFunction)
 TTI_HAS_MEMBER(sFunction)
 TTI_HAS_MEMBER(aMember)
-TTI_HAS_MEMBER(cMem)
+TTI_TRAIT_HAS_MEMBER(CMember,cMem)
 TTI_HAS_MEMBER(someDataMember)
 TTI_HAS_MEMBER(someFunctionMember)
 

Modified: sandbox/tti/libs/tti/test/TestHasMemberCompile.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestHasMemberCompile.cpp (original)
+++ sandbox/tti/libs/tti/test/TestHasMemberCompile.cpp 2010-12-15 22:32:53 EST (Wed, 15 Dec 2010)
@@ -15,13 +15,13 @@
   BOOST_MPL_ASSERT((tti::has_member_AnInt<int AType::*>));
   BOOST_MPL_ASSERT((tti::has_member_AnInt<long AnotherType::*>));
   BOOST_MPL_ASSERT((tti::has_member_VoidFunction<void (AType::*)()>));
- BOOST_MPL_ASSERT((tti::has_member_IntFunction<int (AType::*)()>));
- BOOST_MPL_ASSERT((tti::has_member_IntFunction<double (AnotherType::*)(int)>));
+ BOOST_MPL_ASSERT((tti::FunctionReturningInt<int (AType::*)()>));
+ BOOST_MPL_ASSERT((tti::FunctionReturningInt<double (AnotherType::*)(int)>));
   BOOST_MPL_ASSERT((tti::has_member_aFunction<AType (AnotherType::*)(int)>));
- BOOST_MPL_ASSERT((tti::has_member_anotherFunction<int (AnotherType::*)(AType)>));
+ BOOST_MPL_ASSERT((tti::AnotherIntFunction<int (AnotherType::*)(AType)>));
   BOOST_MPL_ASSERT((tti::has_member_sFunction<AType::AnIntType (AnotherType::*)(int,long,double)>));
   BOOST_MPL_ASSERT((tti::has_member_aMember<bool AnotherType::*>));
- BOOST_MPL_ASSERT((tti::has_member_cMem<bool AnotherType::*>));
+ BOOST_MPL_ASSERT((tti::CMember<bool AnotherType::*>));
   
   return 0;
 

Added: sandbox/tti/libs/tti/test/TestVMHasTemplateCheckParamsFail3.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/TestVMHasTemplateCheckParamsFail3.cpp 2010-12-15 22:32:53 EST (Wed, 15 Dec 2010)
@@ -0,0 +1,13 @@
+#include "TestVMHasTemplateCheckParams.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ // Wrong template parameters
+
+ BOOST_MPL_ASSERT((tti::WrongParametersForMP<AnotherType>));
+
+ return 0;
+
+ }

Added: sandbox/tti/libs/tti/test/TestVMHasTemplateCheckParamsFail4.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/TestVMHasTemplateCheckParamsFail4.cpp 2010-12-15 22:32:53 EST (Wed, 15 Dec 2010)
@@ -0,0 +1,13 @@
+#include "TestVMHasTemplateCheckParams.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ // Wrong template parameters
+
+ BOOST_MPL_ASSERT((tti::WrongParameters2ForMP<AnotherType>));
+
+ return 0;
+
+ }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk