Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65610 - sandbox/opaque/libs/opaque/test
From: vicente.botet_at_[hidden]
Date: 2010-09-26 15:01:07


Author: viboes
Date: 2010-09-26 15:01:04 EDT (Sun, 26 Sep 2010)
New Revision: 65610
URL: http://svn.boost.org/trac/boost/changeset/65610

Log:
Opaque: Add test on new_type

Text files modified:
   sandbox/opaque/libs/opaque/test/Jamfile.v2 | 3 ++-
   sandbox/opaque/libs/opaque/test/new_type_test.cpp | 16 +++++++++++-----
   2 files changed, 13 insertions(+), 6 deletions(-)

Modified: sandbox/opaque/libs/opaque/test/Jamfile.v2
==============================================================================
--- sandbox/opaque/libs/opaque/test/Jamfile.v2 (original)
+++ sandbox/opaque/libs/opaque/test/Jamfile.v2 2010-09-26 15:01:04 EDT (Sun, 26 Sep 2010)
@@ -35,9 +35,10 @@
         <toolset>msvc:<cxxflags>/wd4127
     ;
 
- test-suite "new_type"
+ test-suite "new"
         :
         [ run new_type_test.cpp ]
+ [ run new_class_test.cpp ]
         ;
 
    test-suite "opaque"

Modified: sandbox/opaque/libs/opaque/test/new_type_test.cpp
==============================================================================
--- sandbox/opaque/libs/opaque/test/new_type_test.cpp (original)
+++ sandbox/opaque/libs/opaque/test/new_type_test.cpp 2010-09-26 15:01:04 EDT (Sun, 26 Sep 2010)
@@ -16,12 +16,13 @@
 using namespace boost::unit_test;
 
 
-struct private_unsigned : boost::new_type<private_unsigned, unsigned
+#if 0
+struct private_unsigned : boost::new_class<private_unsigned, unsigned
     , opaque::equality_comparable1<private_unsigned
>
>
 {
- typedef boost::new_type<private_unsigned, unsigned
+ typedef boost::new_class<private_unsigned, unsigned
     , opaque::equality_comparable1<private_unsigned
>
> base_type;
@@ -36,10 +37,9 @@
         : base_type(r.val_)
     {}
 };
-
-struct private_unsigned2: boost::new_type<private_unsigned2, unsigned>
+struct private_unsigned2: boost::new_class<private_unsigned2, unsigned>
 {
- typedef boost::new_type<private_unsigned2, unsigned> base_type;
+ typedef boost::new_class<private_unsigned2, unsigned> base_type;
     
     private_unsigned2(){}
     explicit private_unsigned2(unsigned v) : base_type(v) {}
@@ -51,7 +51,13 @@
         : base_type(r.val_)
     {}
 };
+#else
+struct private_unsigned_tag;
+typedef boost::new_type<unsigned, private_unsigned_tag, boost::mpl::vector<opaque::using_equality_comparable1> > private_unsigned;
+struct private_unsigned2_tag;
+typedef boost::new_type<unsigned, private_unsigned2_tag> private_unsigned2;
 
+#endif
 void private_assign_test() {
     private_unsigned a, a2;
     private_unsigned2 b;


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