Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67412 - sandbox/tti/libs/tti/test
From: eldiener_at_[hidden]
Date: 2010-12-22 12:26:56


Author: eldiener
Date: 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
New Revision: 67412
URL: http://svn.boost.org/trac/boost/changeset/67412

Log:
New tests and support for gcc 4.3.0
Added:
   sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail3.cpp (contents, props changed)
Removed:
   sandbox/tti/libs/tti/test/TestMFMemberTypeFail.cpp
   sandbox/tti/libs/tti/test/TestMFMemberTypeFail2.cpp
Text files modified:
   sandbox/tti/libs/tti/test/Jamfile.v2 | 5 +
   sandbox/tti/libs/tti/test/TestMFHasMemberData.cpp | 1
   sandbox/tti/libs/tti/test/TestMFHasMemberDataFail.cpp | 1
   sandbox/tti/libs/tti/test/TestMFHasMemberDataFail2.cpp | 1
   sandbox/tti/libs/tti/test/TestMFHasMemberDataFail3.cpp | 1
   sandbox/tti/libs/tti/test/TestMFHasType.cpp | 68 ++++++++++++++++++++++++
   sandbox/tti/libs/tti/test/TestMFHasType.hpp | 14 +++++
   sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.cpp | 89 ++++++++++++++++++++++++++++++++
   sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.hpp | 15 +++++
   sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefCompile.cpp | 90 ++++++++++++++++++++++++++++++++
   sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail.cpp | 10 +++
   sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail2.cpp | 10 +++
   sandbox/tti/libs/tti/test/TestMFHasTypeCompile.cpp | 76 +++++++++++++++++++++++++++
   sandbox/tti/libs/tti/test/TestMFHasTypeFail.cpp | 9 ++
   sandbox/tti/libs/tti/test/TestMFHasTypeFail2.cpp | 9 ++
   sandbox/tti/libs/tti/test/TestMFMemberType.cpp | 109 ++++++++++++++++++++++++++++++++++++++++
   sandbox/tti/libs/tti/test/TestMFMemberType.hpp | 9 +++
   sandbox/tti/libs/tti/test/TestMFMemberTypeCompile.cpp | 100 ++++++++++++++++++++++++++++++++++++
   sandbox/tti/libs/tti/test/TestMemberType.hpp | 1
   19 files changed, 604 insertions(+), 14 deletions(-)

Modified: sandbox/tti/libs/tti/test/Jamfile.v2
==============================================================================
--- sandbox/tti/libs/tti/test/Jamfile.v2 (original)
+++ sandbox/tti/libs/tti/test/Jamfile.v2 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -7,6 +7,8 @@
 import testing ;
 
 project tti_tests : requirements <warnings>on
+ <toolset>gcc-4.3.0:<warnings>all
+ <toolset>gcc-4.3.0:<cxxflags>-Wno-variadic-macros
                                  <toolset>gcc-4.4.0:<warnings>all
                                  <toolset>gcc-4.4.0:<cxxflags>-Wno-variadic-macros
                                  <toolset>gcc-4.5.0:<warnings>all
@@ -85,10 +87,9 @@
         [ compile TestMFHasTypeCheckTypedefCompile.cpp ]
         [ compile-fail TestMFHasTypeCheckTypedefFail.cpp ]
         [ compile-fail TestMFHasTypeCheckTypedefFail2.cpp ]
+ [ compile-fail TestMFHasTypeCheckTypedefFail3.cpp ]
         [ run TestMFMemberType.cpp ]
         [ compile TestMFMemberTypeCompile.cpp ]
- [ compile-fail TestMFMemberTypeFail.cpp ]
- [ compile-fail TestMFMemberTypeFail2.cpp ]
     ;
 
 alias ttiVM

Modified: sandbox/tti/libs/tti/test/TestMFHasMemberData.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasMemberData.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasMemberData.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -1,6 +1,5 @@
 #include "TestMFHasMemberData.hpp"
 #include <boost/detail/lightweight_test.hpp>
-#include <boost/mpl/identity.hpp>
 
 int main()
   {

Modified: sandbox/tti/libs/tti/test/TestMFHasMemberDataFail.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasMemberDataFail.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasMemberDataFail.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -1,6 +1,5 @@
 #include "TestMFHasMemberData.hpp"
 #include <boost/mpl/assert.hpp>
-#include <boost/mpl/identity.hpp>
 
 int main()
   {

Modified: sandbox/tti/libs/tti/test/TestMFHasMemberDataFail2.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasMemberDataFail2.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasMemberDataFail2.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -1,6 +1,5 @@
 #include "TestMFHasMemberData.hpp"
 #include <boost/mpl/assert.hpp>
-#include <boost/mpl/identity.hpp>
 
 int main()
   {

Modified: sandbox/tti/libs/tti/test/TestMFHasMemberDataFail3.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasMemberDataFail3.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasMemberDataFail3.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -1,6 +1,5 @@
 #include "TestMFHasMemberData.hpp"
 #include <boost/mpl/assert.hpp>
-#include <boost/mpl/identity.hpp>
 
 int main()
   {

Modified: sandbox/tti/libs/tti/test/TestMFHasType.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasType.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasType.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -4,6 +4,74 @@
 int main()
   {
   
+ BOOST_TEST((tti::mf_has_type
+ <
+ tti::has_type_AnIntType,
+ boost::mpl::identity<AType>
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_type
+ <
+ tti::NameStruct,
+ boost::mpl::identity<AType>
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_type
+ <
+ tti::has_type_AnIntTypeReference,
+ boost::mpl::identity<AType>
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_type
+ <
+ tti::has_type_BType,
+ boost::mpl::identity<AType>
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_type
+ <
+ tti::TheInteger,
+ tti::member_type_BType<AType>
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_type
+ <
+ tti::has_type_CType,
+ tti::member_type_BType<AType>
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_type
+ <
+ tti::has_type_AnotherIntegerType,
+ tti::mf_member_type
+ <
+ tti::member_type_CType,
+ tti::member_type_BType<AType>
+ >
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_type
+ <
+ tti::SomethingElse,
+ boost::mpl::identity<AnotherType>
+ >
+ ::value
+ ));
+
   return boost::report_errors();
 
   }

Modified: sandbox/tti/libs/tti/test/TestMFHasType.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasType.hpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasType.hpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -4,4 +4,18 @@
 #include "TestStructs.hpp"
 #include <boost/tti/TTIntrospection.hpp>
 
+TTI_HAS_TYPE(AnIntType)
+TTI_TRAIT_HAS_TYPE(NameStruct,AStructType)
+TTI_HAS_TYPE(AnIntTypeReference)
+TTI_HAS_TYPE(BType)
+TTI_TRAIT_HAS_TYPE(TheInteger,AnIntegerType)
+TTI_HAS_TYPE(CType)
+TTI_HAS_TYPE(AnotherIntegerType)
+
+TTI_TRAIT_HAS_TYPE(SomethingElse,someOtherType)
+TTI_HAS_TYPE(NoOtherType)
+
+TTI_MEMBER_TYPE(BType)
+TTI_MEMBER_TYPE(CType)
+
 #endif // TEST_MF_HAS_TYPE_HPP

Modified: sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -4,6 +4,95 @@
 int main()
   {
   
+ BOOST_TEST((tti::mf_has_type_check_typedef
+ <
+ tti::has_type_check_typedef_AnIntType,
+ boost::mpl::identity<AType>,
+ boost::mpl::identity<int>
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_type_check_typedef
+ <
+ tti::NameStruct,
+ boost::mpl::identity<AType>,
+ tti::member_type_AStructType<AType>
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_type_check_typedef
+ <
+ tti::has_type_check_typedef_AnIntTypeReference,
+ boost::mpl::identity<AType>,
+ boost::mpl::identity<int &>
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_type_check_typedef
+ <
+ tti::has_type_check_typedef_BType,
+ boost::mpl::identity<AType>,
+ tti::member_type_BType<AType>
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_type_check_typedef
+ <
+ tti::TheInteger,
+ tti::member_type_BType<AType>,
+ boost::mpl::identity<int>
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_type_check_typedef
+ <
+ tti::has_type_check_typedef_CType,
+ tti::member_type_BType<AType>,
+ tti::mf_member_type
+ <
+ tti::member_type_CType,
+ tti::member_type_BType<AType>
+ >
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_type_check_typedef
+ <
+ tti::has_type_check_typedef_AnotherIntegerType,
+ tti::mf_member_type
+ <
+ tti::member_type_CType,
+ tti::member_type_BType<AType>
+ >,
+ boost::mpl::identity<int>
+ >
+ ::value
+ ));
+
+ BOOST_TEST((tti::mf_has_type_check_typedef
+ <
+ tti::SomethingElse,
+ boost::mpl::identity<AnotherType>,
+ tti::member_type_AnIntType<AType>
+ >
+ ::value
+ ));
+
+ BOOST_TEST((!tti::mf_has_type_check_typedef
+ <
+ tti::has_type_check_typedef_NoOtherType,
+ boost::mpl::identity<AnotherType>,
+ boost::mpl::identity<double>
+ >
+ ::value
+ ));
+
   return boost::report_errors();
 
   }

Modified: sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.hpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedef.hpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -4,4 +4,19 @@
 #include "TestStructs.hpp"
 #include <boost/tti/TTIntrospection.hpp>
 
+TTI_HAS_TYPE_CHECK_TYPEDEF(AnIntType)
+TTI_TRAIT_HAS_TYPE_CHECK_TYPEDEF(NameStruct,AStructType)
+TTI_HAS_TYPE_CHECK_TYPEDEF(AnIntTypeReference)
+TTI_HAS_TYPE_CHECK_TYPEDEF(BType)
+TTI_TRAIT_HAS_TYPE_CHECK_TYPEDEF(TheInteger,AnIntegerType)
+TTI_HAS_TYPE_CHECK_TYPEDEF(CType)
+TTI_HAS_TYPE_CHECK_TYPEDEF(AnotherIntegerType)
+TTI_TRAIT_HAS_TYPE_CHECK_TYPEDEF(SomethingElse,someOtherType)
+TTI_HAS_TYPE_CHECK_TYPEDEF(NoOtherType)
+
+TTI_MEMBER_TYPE(AStructType)
+TTI_MEMBER_TYPE(BType)
+TTI_MEMBER_TYPE(CType)
+TTI_MEMBER_TYPE(AnIntType)
+
 #endif // TEST_MF_HAS_TYPE_CHECK_TYPEDEF_HPP

Modified: sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefCompile.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefCompile.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefCompile.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -4,7 +4,95 @@
 int main()
   {
   
- BOOST_MPL_ASSERT((boost::mpl::true_));
+ // You can always instantiate without compiler errors
+
+ tti::mf_has_type_check_typedef
+ <
+ tti::TheInteger,
+ tti::member_type_BType<AnotherType>,
+ boost::mpl::identity<long>
+ > aVar;
+
+ tti::mf_has_type_check_typedef
+ <
+ tti::has_type_check_typedef_NoOtherType,
+ boost::mpl::identity<AType>,
+ boost::mpl::identity<float>
+ > aVar2;
+
+ // Compile time asserts
+
+ BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ <
+ tti::has_type_check_typedef_AnIntType,
+ boost::mpl::identity<AType>,
+ boost::mpl::identity<int>
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ <
+ tti::NameStruct,
+ boost::mpl::identity<AType>,
+ tti::member_type_AStructType<AType>
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ <
+ tti::has_type_check_typedef_AnIntTypeReference,
+ boost::mpl::identity<AType>,
+ boost::mpl::identity<int &>
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ <
+ tti::has_type_check_typedef_BType,
+ boost::mpl::identity<AType>,
+ tti::member_type_BType<AType>
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ <
+ tti::TheInteger,
+ tti::member_type_BType<AType>,
+ boost::mpl::identity<int>
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ <
+ tti::has_type_check_typedef_CType,
+ tti::member_type_BType<AType>,
+ tti::mf_member_type
+ <
+ tti::member_type_CType,
+ tti::member_type_BType<AType>
+ >
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ <
+ tti::has_type_check_typedef_AnotherIntegerType,
+ tti::mf_member_type
+ <
+ tti::member_type_CType,
+ tti::member_type_BType<AType>
+ >,
+ boost::mpl::identity<int>
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ <
+ tti::SomethingElse,
+ boost::mpl::identity<AnotherType>,
+ tti::member_type_AnIntType<AType>
+ >
+ ));
   
   return 0;
 

Modified: sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -4,7 +4,15 @@
 int main()
   {
   
- BOOST_MPL_ASSERT((boost::mpl::false_));
+ // NoOtherType does not exist at all
+
+ BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ <
+ tti::has_type_check_typedef_NoOtherType,
+ boost::mpl::identity<AnotherType>,
+ boost::mpl::identity<float>
+ >
+ ));
   
   return 0;
 

Modified: sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail2.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail2.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail2.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -4,7 +4,15 @@
 int main()
   {
   
- BOOST_MPL_ASSERT((boost::mpl::false_));
+ // Wrong enclosing type
+
+ BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ <
+ tti::has_type_check_typedef_BType,
+ boost::mpl::identity<AnotherType>,
+ tti::member_type_BType<AType>
+ >
+ ));
   
   return 0;
 

Added: sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail3.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/TestMFHasTypeCheckTypedefFail3.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -0,0 +1,19 @@
+#include "TestMFHasTypeCheckTypedef.hpp"
+#include <boost/mpl/assert.hpp>
+
+int main()
+ {
+
+ // Wrong typedef type
+
+ BOOST_MPL_ASSERT((tti::mf_has_type_check_typedef
+ <
+ tti::TheInteger,
+ tti::member_type_BType<AType>,
+ boost::mpl::identity<long>
+ >
+ ));
+
+ return 0;
+
+ }

Modified: sandbox/tti/libs/tti/test/TestMFHasTypeCompile.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasTypeCompile.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasTypeCompile.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -4,8 +4,82 @@
 int main()
   {
   
- BOOST_MPL_ASSERT((boost::mpl::true_));
+ // You can always instantiate without compiler errors
   
+ tti::mf_has_type
+ <
+ tti::has_type_AnIntType,
+ boost::mpl::identity<AnotherType>
+ > aVar;
+
+ tti::mf_has_type
+ <
+ tti::has_type_NoOtherType,
+ boost::mpl::identity<AnotherType>
+ > aVar2;
+
+ // Compile time asserts
+
+ BOOST_MPL_ASSERT((tti::mf_has_type
+ <
+ tti::has_type_AnIntType,
+ boost::mpl::identity<AType>
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_type
+ <
+ tti::NameStruct,
+ boost::mpl::identity<AType>
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_type
+ <
+ tti::has_type_AnIntTypeReference,
+ boost::mpl::identity<AType>
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_type
+ <
+ tti::has_type_BType,
+ boost::mpl::identity<AType>
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_type
+ <
+ tti::TheInteger,
+ tti::member_type_BType<AType>
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_type
+ <
+ tti::has_type_CType,
+ tti::member_type_BType<AType>
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_type
+ <
+ tti::has_type_AnotherIntegerType,
+ tti::mf_member_type
+ <
+ tti::member_type_CType,
+ tti::member_type_BType<AType>
+ >
+ >
+ ));
+
+ BOOST_MPL_ASSERT((tti::mf_has_type
+ <
+ tti::SomethingElse,
+ boost::mpl::identity<AnotherType>
+ >
+ ));
+
   return 0;
 
   }

Modified: sandbox/tti/libs/tti/test/TestMFHasTypeFail.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasTypeFail.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasTypeFail.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -4,7 +4,14 @@
 int main()
   {
   
- BOOST_MPL_ASSERT((boost::mpl::false_));
+ // NoOtherType does not exist at all
+
+ BOOST_MPL_ASSERT((tti::mf_has_type
+ <
+ tti::has_type_NoOtherType,
+ boost::mpl::identity<AType>
+ >
+ ));
   
   return 0;
 

Modified: sandbox/tti/libs/tti/test/TestMFHasTypeFail2.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFHasTypeFail2.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFHasTypeFail2.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -4,7 +4,14 @@
 int main()
   {
   
- BOOST_MPL_ASSERT((boost::mpl::false_));
+ // Wrong enclosing type
+
+ BOOST_MPL_ASSERT((tti::mf_has_type
+ <
+ tti::has_type_AnIntType,
+ boost::mpl::identity<AnotherType>
+ >
+ ));
   
   return 0;
 

Modified: sandbox/tti/libs/tti/test/TestMFMemberType.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFMemberType.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFMemberType.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -1,9 +1,118 @@
 #include "TestMFMemberType.hpp"
 #include <boost/detail/lightweight_test.hpp>
+#include <boost/type_traits/is_same.hpp>
 
 int main()
   {
   
+ BOOST_TEST((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::member_type_AnIntType,
+ boost::mpl::identity<AType>
+ >
+ ::type,
+ AType::AnIntType
+ >
+ ::value
+ ));
+
+ BOOST_TEST((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::NameStruct,
+ boost::mpl::identity<AType>
+ >
+ ::type,
+ AType::AStructType
+ >
+ ::value
+ ));
+
+ BOOST_TEST((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::member_type_AnIntTypeReference,
+ boost::mpl::identity<AType>
+ >
+ ::type,
+ AType::AnIntTypeReference
+ >
+ ::value
+ ));
+
+ BOOST_TEST((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::member_type_BType,
+ boost::mpl::identity<AType>
+ >
+ ::type,
+ AType::BType
+ >
+ ::value
+ ));
+
+ BOOST_TEST((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::TheInteger,
+ tti::member_type_BType<AType>
+ >
+ ::type,
+ AType::BType::AnIntegerType
+ >
+ ::value
+ ));
+
+ BOOST_TEST((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::member_type_CType,
+ tti::member_type_BType<AType>
+ >
+ ::type,
+ AType::BType::CType
+ >
+ ::value
+ ));
+
+ BOOST_TEST((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::member_type_AnotherIntegerType,
+ tti::mf_member_type
+ <
+ tti::member_type_CType,
+ tti::member_type_BType<AType>
+ >
+ >
+ ::type,
+ AType::BType::CType::AnotherIntegerType
+ >
+ ::value
+ ));
+
+ BOOST_TEST((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::SomethingElse,
+ boost::mpl::identity<AnotherType>
+ >
+ ::type,
+ AnotherType::someOtherType
+ >
+ ::value
+ ));
+
   return boost::report_errors();
 
   }

Modified: sandbox/tti/libs/tti/test/TestMFMemberType.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFMemberType.hpp (original)
+++ sandbox/tti/libs/tti/test/TestMFMemberType.hpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -4,4 +4,13 @@
 #include "TestStructs.hpp"
 #include <boost/tti/TTIntrospection.hpp>
 
+TTI_MEMBER_TYPE(AnIntType)
+TTI_TRAIT_MEMBER_TYPE(NameStruct,AStructType)
+TTI_MEMBER_TYPE(AnIntTypeReference)
+TTI_MEMBER_TYPE(BType)
+TTI_TRAIT_MEMBER_TYPE(TheInteger,AnIntegerType)
+TTI_MEMBER_TYPE(CType)
+TTI_MEMBER_TYPE(AnotherIntegerType)
+TTI_TRAIT_MEMBER_TYPE(SomethingElse,someOtherType)
+
 #endif // TEST_MF_MEMBER_TYPE_HPP

Modified: sandbox/tti/libs/tti/test/TestMFMemberTypeCompile.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFMemberTypeCompile.cpp (original)
+++ sandbox/tti/libs/tti/test/TestMFMemberTypeCompile.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -4,7 +4,105 @@
 int main()
   {
   
- BOOST_MPL_ASSERT((boost::mpl::true_));
+ BOOST_MPL_ASSERT((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::member_type_AnIntType,
+ boost::mpl::identity<AType>
+ >
+ ::type,
+ AType::AnIntType
+ >
+ ));
+
+ BOOST_MPL_ASSERT((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::NameStruct,
+ boost::mpl::identity<AType>
+ >
+ ::type,
+ AType::AStructType
+ >
+ ));
+
+ BOOST_MPL_ASSERT((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::member_type_AnIntTypeReference,
+ boost::mpl::identity<AType>
+ >
+ ::type,
+ AType::AnIntTypeReference
+ >
+ ));
+
+ BOOST_MPL_ASSERT((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::member_type_BType,
+ boost::mpl::identity<AType>
+ >
+ ::type,
+ AType::BType
+ >
+ ));
+
+ BOOST_MPL_ASSERT((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::TheInteger,
+ tti::member_type_BType<AType>
+ >
+ ::type,
+ AType::BType::AnIntegerType
+ >
+ ));
+
+ BOOST_MPL_ASSERT((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::member_type_CType,
+ tti::member_type_BType<AType>
+ >
+ ::type,
+ AType::BType::CType
+ >
+ ));
+
+ BOOST_MPL_ASSERT((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::member_type_AnotherIntegerType,
+ tti::mf_member_type
+ <
+ tti::member_type_CType,
+ tti::member_type_BType<AType>
+ >
+ >
+ ::type,
+ AType::BType::CType::AnotherIntegerType
+ >
+ ));
+
+ BOOST_MPL_ASSERT((boost::is_same
+ <
+ tti::mf_member_type
+ <
+ tti::SomethingElse,
+ boost::mpl::identity<AnotherType>
+ >
+ ::type,
+ AnotherType::someOtherType
+ >
+ ));
   
   return 0;
 

Deleted: sandbox/tti/libs/tti/test/TestMFMemberTypeFail.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFMemberTypeFail.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
+++ (empty file)
@@ -1,11 +0,0 @@
-#include "TestMFMemberType.hpp"
-#include <boost/mpl/assert.hpp>
-
-int main()
- {
-
- BOOST_MPL_ASSERT((boost::mpl::false_));
-
- return 0;
-
- }

Deleted: sandbox/tti/libs/tti/test/TestMFMemberTypeFail2.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMFMemberTypeFail2.cpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
+++ (empty file)
@@ -1,11 +0,0 @@
-#include "TestMFMemberType.hpp"
-#include <boost/mpl/assert.hpp>
-
-int main()
- {
-
- BOOST_MPL_ASSERT((boost::mpl::false_));
-
- return 0;
-
- }

Modified: sandbox/tti/libs/tti/test/TestMemberType.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestMemberType.hpp (original)
+++ sandbox/tti/libs/tti/test/TestMemberType.hpp 2010-12-22 12:26:52 EST (Wed, 22 Dec 2010)
@@ -12,6 +12,5 @@
 TTI_MEMBER_TYPE(CType)
 TTI_MEMBER_TYPE(AnotherIntegerType)
 TTI_TRAIT_MEMBER_TYPE(SomethingElse,someOtherType)
-TTI_MEMBER_TYPE(NoOtherType)
 
 #endif // TEST_MEMBER_TYPE_HPP


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