Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67766 - sandbox/tti/libs/tti/test
From: eldiener_at_[hidden]
Date: 2011-01-07 19:49:42


Author: eldiener
Date: 2011-01-07 19:49:41 EST (Fri, 07 Jan 2011)
New Revision: 67766
URL: http://svn.boost.org/trac/boost/changeset/67766

Log:
Updated tests and test data
Text files modified:
   sandbox/tti/libs/tti/test/TestHasMember.cpp | 4 ++++
   sandbox/tti/libs/tti/test/TestHasMember.hpp | 4 ++++
   sandbox/tti/libs/tti/test/TestHasMemberCompile.cpp | 4 ++++
   sandbox/tti/libs/tti/test/TestMFHasMemberData.cpp | 40 ++++++++++++++++++++++++++++++++++++++++
   sandbox/tti/libs/tti/test/TestMFHasMemberData.hpp | 7 +++++++
   sandbox/tti/libs/tti/test/TestMFHasMemberDataCompile.cpp | 36 ++++++++++++++++++++++++++++++++++++
   sandbox/tti/libs/tti/test/TestStructs.hpp | 4 ++++
   7 files changed, 99 insertions(+), 0 deletions(-)

Modified: sandbox/tti/libs/tti/test/TestHasMember.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestHasMember.cpp (original)
+++ sandbox/tti/libs/tti/test/TestHasMember.cpp 2011-01-07 19:49:41 EST (Fri, 07 Jan 2011)
@@ -17,6 +17,10 @@
   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);
+ BOOST_TEST(tti::has_member_IntBT<AType::BType AType::*>::value);
+ BOOST_TEST(tti::NestedData<AType::BType::CType AType::*>::value);
+ BOOST_TEST(tti::AOther<AType AnotherType::*>::value);
+ BOOST_TEST(tti::has_member_ONestStr<AType::AStructType AnotherType::*>::value);
   
   return boost::report_errors();
 

Modified: sandbox/tti/libs/tti/test/TestHasMember.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestHasMember.hpp (original)
+++ sandbox/tti/libs/tti/test/TestHasMember.hpp 2011-01-07 19:49:41 EST (Fri, 07 Jan 2011)
@@ -14,5 +14,9 @@
 TTI_TRAIT_HAS_MEMBER(CMember,cMem)
 TTI_HAS_MEMBER(someDataMember)
 TTI_HAS_MEMBER(someFunctionMember)
+TTI_HAS_MEMBER(IntBT)
+TTI_TRAIT_HAS_MEMBER(NestedData,NestedCT)
+TTI_TRAIT_HAS_MEMBER(AOther,OtherAT)
+TTI_HAS_MEMBER(ONestStr)
 
 #endif // TEST_HAS_MEMBER_HPP

Modified: sandbox/tti/libs/tti/test/TestHasMemberCompile.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestHasMemberCompile.cpp (original)
+++ sandbox/tti/libs/tti/test/TestHasMemberCompile.cpp 2011-01-07 19:49:41 EST (Fri, 07 Jan 2011)
@@ -22,6 +22,10 @@
   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::CMember<bool AnotherType::*>));
+ BOOST_MPL_ASSERT((tti::has_member_IntBT<AType::BType AType::*>));
+ BOOST_MPL_ASSERT((tti::NestedData<AType::BType::CType AType::*>));
+ BOOST_MPL_ASSERT((tti::AOther<AType AnotherType::*>));
+ BOOST_MPL_ASSERT((tti::has_member_ONestStr<AType::AStructType AnotherType::*>));
   
   return 0;
 

Modified: sandbox/tti/libs/tti/test/TestMFHasMemberData.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasMemberData.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasMemberData.cpp 2011-01-07 19:49:41 EST (Fri, 07 Jan 2011)
@@ -40,6 +40,46 @@
               ::value
             ));
   
+ BOOST_TEST((tti::mf_has_member_data
+ <
+ tti::has_member_IntBT,
+ boost::mpl::identity<AType>,
+ tti::member_type_BType<AType>
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_member_data
+ <
+ tti::NestedData,
+ boost::mpl::identity<AType>,
+ tti::mf_member_type
+ <
+ tti::member_type_CType,
+ tti::member_type_BType<AType>
+ >
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_member_data
+ <
+ tti::AOther,
+ boost::mpl::identity<AnotherType>,
+ boost::mpl::identity<AType>
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_member_data
+ <
+ tti::has_member_ONestStr,
+ boost::mpl::identity<AnotherType>,
+ tti::member_type_AStructType<AType>
+ >
+ ::value
+ ));
+
   return boost::report_errors();
 
   }

Modified: sandbox/tti/libs/tti/test/TestMFHasMemberData.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasMemberData.hpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasMemberData.hpp 2011-01-07 19:49:41 EST (Fri, 07 Jan 2011)
@@ -8,5 +8,12 @@
 TTI_HAS_MEMBER(aMember)
 TTI_TRAIT_HAS_MEMBER(CMember,cMem)
 TTI_HAS_MEMBER(someDataMember)
+TTI_HAS_MEMBER(IntBT)
+TTI_TRAIT_HAS_MEMBER(NestedData,NestedCT)
+TTI_TRAIT_HAS_MEMBER(AOther,OtherAT)
+TTI_HAS_MEMBER(ONestStr)
+TTI_MEMBER_TYPE(BType)
+TTI_MEMBER_TYPE(CType)
+TTI_MEMBER_TYPE(AStructType)
 
 #endif // TEST_MF_HAS_MEMBER_DATA_HPP

Modified: sandbox/tti/libs/tti/test/TestMFHasMemberDataCompile.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasMemberDataCompile.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasMemberDataCompile.cpp 2011-01-07 19:49:41 EST (Fri, 07 Jan 2011)
@@ -36,6 +36,42 @@
>
                   ));
   
+ BOOST_MPL_ASSERT((tti::mf_has_member_data
+ <
+ tti::has_member_IntBT,
+ boost::mpl::identity<AType>,
+ tti::member_type_BType<AType>
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_member_data
+ <
+ tti::NestedData,
+ boost::mpl::identity<AType>,
+ tti::mf_member_type
+ <
+ tti::member_type_CType,
+ tti::member_type_BType<AType>
+ >
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_member_data
+ <
+ tti::AOther,
+ boost::mpl::identity<AnotherType>,
+ boost::mpl::identity<AType>
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_member_data
+ <
+ tti::has_member_ONestStr,
+ boost::mpl::identity<AnotherType>,
+ tti::member_type_AStructType<AType>
+ >
+ ));
+
   return 0;
 
   }

Modified: sandbox/tti/libs/tti/test/TestStructs.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestStructs.hpp (original)
+++ sandbox/tti/libs/tti/test/TestStructs.hpp 2011-01-07 19:49:41 EST (Fri, 07 Jan 2011)
@@ -32,6 +32,8 @@
   // Data
   
   int AnInt;
+ BType IntBT;
+ BType::CType NestedCT;
   
   // Function
   
@@ -66,6 +68,8 @@
   bool aMember;
   bool cMem;
   long AnInt;
+ AType OtherAT;
+ AType::AStructType ONestStr;
   
   // Function
   


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