Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r67102 - sandbox/tti/libs/tti/test
From: eldiener_at_[hidden]
Date: 2010-12-08 11:37:08


Author: eldiener
Date: 2010-12-08 11:37:06 EST (Wed, 08 Dec 2010)
New Revision: 67102
URL: http://svn.boost.org/trac/boost/changeset/67102

Log:
Updated tests
Added:
   sandbox/tti/libs/tti/test/TestHasMemberFail4.cpp (contents, props changed)
   sandbox/tti/libs/tti/test/TestHasMemberFail5.cpp (contents, props changed)
Text files modified:
   sandbox/tti/libs/tti/test/Jamfile.v2 | 2 ++
   sandbox/tti/libs/tti/test/TestHasStaticMember.cpp | 8 ++++++++
   sandbox/tti/libs/tti/test/TestHasStaticMember.hpp | 7 +++++++
   3 files changed, 17 insertions(+), 0 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-08 11:37:06 EST (Wed, 08 Dec 2010)
@@ -22,6 +22,8 @@
         [ compile-fail TestHasMemberFail.cpp ]
         [ compile-fail TestHasMemberFail2.cpp ]
         [ compile-fail TestHasMemberFail3.cpp ]
+ [ compile-fail TestHasMemberFail4.cpp ]
+ [ compile-fail TestHasMemberFail5.cpp ]
         [ run TestHasStaticMember.cpp ]
         [ compile TestHasStaticMemberCompile.cpp ]
         [ compile-fail TestHasStaticMemberFail.cpp ]

Added: sandbox/tti/libs/tti/test/TestHasMemberFail4.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/TestHasMemberFail4.cpp 2010-12-08 11:37:06 EST (Wed, 08 Dec 2010)
@@ -0,0 +1,12 @@
+#include "TestHasMember.hpp"
+
+int main()
+ {
+
+ // Data signature has type which does not exist
+
+ tti::has_member_aMember<AType::NTHType AnotherType::*> aVar;
+
+ return 0;
+
+ }

Added: sandbox/tti/libs/tti/test/TestHasMemberFail5.cpp
==============================================================================
--- (empty file)
+++ sandbox/tti/libs/tti/test/TestHasMemberFail5.cpp 2010-12-08 11:37:06 EST (Wed, 08 Dec 2010)
@@ -0,0 +1,12 @@
+#include "TestHasMember.hpp"
+
+int main()
+ {
+
+ // Function signature has type which does not exist
+
+ tti::has_member_sFunction<AType::AnIntType (NVType::*)(short,long,double)> aVar;
+
+ return 0;
+
+ }

Modified: sandbox/tti/libs/tti/test/TestHasStaticMember.cpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestHasStaticMember.cpp (original)
+++ sandbox/tti/libs/tti/test/TestHasStaticMember.cpp 2010-12-08 11:37:06 EST (Wed, 08 Dec 2010)
@@ -4,6 +4,14 @@
 int main()
   {
   
+ BOOST_TEST((tti::has_static_member_DSMember<AType,short>::value));
+ BOOST_TEST((tti::HaveTheSIntFunction<AType,int (long,double)>::value));
+ BOOST_TEST((!tti::TheTIntFunction<AType,AType (long,double)>::value));
+ BOOST_TEST((tti::TheTIntFunction<AnotherType,AType (long,double)>::value));
+ BOOST_TEST((tti::has_static_member_TSFunction<AnotherType,AType::AStructType (AType::AnIntType,double)>::value));
+ BOOST_TEST((!tti::has_static_member_SomeStaticData<AnotherType,float>::value));
+ BOOST_TEST((!tti::Pickedname<AnotherType,void ()>::value));
+
   return boost::report_errors();
 
   }

Modified: sandbox/tti/libs/tti/test/TestHasStaticMember.hpp
==============================================================================
--- sandbox/tti/libs/tti/test/TestHasStaticMember.hpp (original)
+++ sandbox/tti/libs/tti/test/TestHasStaticMember.hpp 2010-12-08 11:37:06 EST (Wed, 08 Dec 2010)
@@ -4,4 +4,11 @@
 #include "TestStructs.hpp"
 #include <boost/tti/TTIntrospection.hpp>
 
+TTI_HAS_STATIC_MEMBER(DSMember)
+TTI_TRAIT_HAS_STATIC_MEMBER(HaveTheSIntFunction,SIntFunction)
+TTI_TRAIT_HAS_STATIC_MEMBER(TheTIntFunction,TIntFunction)
+TTI_HAS_STATIC_MEMBER(TSFunction)
+TTI_HAS_STATIC_MEMBER(SomeStaticData)
+TTI_TRAIT_HAS_STATIC_MEMBER(Pickedname,SomeStaticFunction)
+
 #endif // TEST_HAS_STATIC_MEMBER_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