Update of /cvsroot/boost/boost/libs/bimap/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10074/test

Modified Files:
        Jamfile.v2 test_bimap_info.cpp test_bimap_ordered.cpp 
        test_bimap_project.cpp 
Log Message:
add bimap_and_boost to the test chain

Index: Jamfile.v2
===================================================================
RCS file: /cvsroot/boost/boost/libs/bimap/test/Jamfile.v2,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Jamfile.v2  31 May 2007 07:07:29 -0000      1.3
+++ Jamfile.v2  4 Jun 2007 20:18:45 -0000       1.4
@@ -65,3 +65,16 @@
     [ compile-fail compile_fail/test_bimap_info_2.cpp                         ]
     [ compile-fail compile_fail/test_bimap_info_3.cpp                         ]
     ;
+
+test-suite "bimap_and_boost"
+    :
+    [ run     ../example/bimap_and_boost/property_map.cpp                     ]
+    [ run     ../example/bimap_and_boost/range.cpp                            ]
+    [ run     ../example/bimap_and_boost/foreach.cpp                          ]
+    [ run     ../example/bimap_and_boost/lambda.cpp                           ]
+    [ run     ../example/bimap_and_boost/assign.cpp                           ]
+    [ run     ../example/bimap_and_boost/xpressive.cpp                        ]
+    [ run     ../example/bimap_and_boost/typeof.cpp                           ]
+    [ compile ../example/bimap_and_boost/serialization.cpp
+                    /boost/serialization//boost_serialization                 ]
+    ;

Index: test_bimap_info.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/bimap/test/test_bimap_info.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- test_bimap_info.cpp 1 Jun 2007 14:28:49 -0000       1.1
+++ test_bimap_info.cpp 4 Jun 2007 20:18:45 -0000       1.2
@@ -32,7 +32,7 @@
 {
     using namespace boost::bimaps;
 
-    typedef bimap< double, unordered_set_of<int>, info_hook<std::string> > 
bm_type;
+    typedef bimap< double, unordered_set_of<int>, with_info<std::string> > 
bm_type;
 
     bm_type bm;
     const bm_type & cbm = bm;
@@ -68,11 +68,59 @@
 
     return 0;
 }
-//]
+
+
+struct left  {};
+struct right {};
+struct info  {};
+
+int test_tagged_bimap_info()
+{
+    using namespace boost::bimaps;
+
+    typedef bimap< tagged<int,left>,
+                   tagged<int,right>,
+                   with_info<tagged<int,info> > > bm_type;
+
+    bm_type bm;
+    const bm_type & cbm = bm;
+
+    bm      .insert( bm_type::      value_type(1,1,1) );
+    bm.left .insert( bm_type:: left_value_type(2,2,2) );
+    bm.right.insert( bm_type::right_value_type(3,3,3) );
+
+    bm.begin()->get<info>() = 10;
+    BOOST_CHECK( bm.right.find(1)->get<info>() == 10 );
+    BOOST_CHECK( cbm.right.find(1)->get<info>() == 10 );
+
+    bm.left.find(2)->get<info>() = 20;
+    BOOST_CHECK( bm.right.find(2)->get<info>() == 20 );
+    BOOST_CHECK( cbm.right.find(2)->get<info>() == 20 );
+
+    bm.right.find(3)->get<info>() = 30;
+    BOOST_CHECK( bm.right.find(3)->get<info>() == 30 );
+    BOOST_CHECK( cbm.right.find(3)->get<info>() == 30 );
+
+    // Empty info insert
+    bm      .insert( bm_type::      value_type(4,4) );
+    bm. left.insert( bm_type:: left_value_type(5,5) );
+    bm.right.insert( bm_type::right_value_type(6,6) );
+
+    bm.left.info_at(4) = 4;
+    BOOST_CHECK(  bm.right.info_at(4) == 4 );
+    BOOST_CHECK( cbm.right.info_at(4) == 4 );
+
+    bm.right.info_at(5) = 5;
+    BOOST_CHECK(  bm.left.info_at(5) == 5 );
+    BOOST_CHECK( cbm.left.info_at(5) == 5 );
+
+    return 0;
+}
 
 int test_main( int, char* [] )
 {
     test_bimap_info();
+    test_tagged_bimap_info();
     return 0;
 }
 

Index: test_bimap_ordered.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/bimap/test/test_bimap_ordered.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- test_bimap_ordered.cpp      1 Jun 2007 03:29:32 -0000       1.3
+++ test_bimap_ordered.cpp      4 Jun 2007 20:18:45 -0000       1.4
@@ -79,8 +79,8 @@
     {
         typedef bimap
         <
-            multiset_of< tagged<int>, left_tag > >,
-            multiset_of< tagged<double>, right_tag > >,
+            multiset_of< tagged<int, left_tag > >,
+            multiset_of< tagged<double, right_tag > >,
             multiset_of_relation< std::less< _relation > >
 
         > bm_type;

Index: test_bimap_project.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/bimap/test/test_bimap_project.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- test_bimap_project.cpp      1 Jun 2007 03:29:32 -0000       1.2
+++ test_bimap_project.cpp      4 Jun 2007 20:18:45 -0000       1.3
@@ -35,8 +35,8 @@
 {
     typedef bimap
     <
-                 tagged< int         ,  left_tag >,
-        list_of< tagged< lstd::string, right_tag > >
+                 tagged< int        ,  left_tag >,
+        list_of< tagged< std::string, right_tag > >
 
     > bm_type;
 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to