Boost logo

Boost-Commit :

From: phil_at_[hidden]
Date: 2008-05-07 04:00:10


Author: pbouchard
Date: 2008-05-07 04:00:10 EDT (Wed, 07 May 2008)
New Revision: 45191
URL: http://svn.boost.org/trac/boost/changeset/45191

Log:
Ported unit test to MinGW
Text files modified:
   sandbox/shifted_ptr/libs/smart_ptr/example/shifted_ptr_test3.cpp | 16 ++++++++++++----
   1 files changed, 12 insertions(+), 4 deletions(-)

Modified: sandbox/shifted_ptr/libs/smart_ptr/example/shifted_ptr_test3.cpp
==============================================================================
--- sandbox/shifted_ptr/libs/smart_ptr/example/shifted_ptr_test3.cpp (original)
+++ sandbox/shifted_ptr/libs/smart_ptr/example/shifted_ptr_test3.cpp 2008-05-07 04:00:10 EDT (Wed, 07 May 2008)
@@ -2,6 +2,9 @@
         @file
         shifted_ptr_test3.cpp
 
+ @note
+ MinGW users must link with: -Wl,--enable-runtime-pseudo-reloc
+
         @author
         Steven Watanabe <watanabesj_at_[hidden]>
 */
@@ -17,6 +20,7 @@
 #include <boost/mpl/for_each.hpp>
 #include <boost/array.hpp>
 
+#define BOOST_TEST_DYN_LINK
 #define BOOST_TEST_MAIN
 
 #include <boost/test/unit_test.hpp>
@@ -76,13 +80,16 @@
 };
 
 BOOST_AUTO_TEST_CASE(test_shifted_ptr) {
+ count = 0;
+/*
     {
         shifted_ptr<vector> v = new_sh<vector>();
         v->elements.push_back(v);
     }
     BOOST_CHECK_EQUAL(count, 0);
- count = 0;
+*/
 
+ count = 0;
     {
         list l;
         for(int j = 0; j < 2; ++j) {
@@ -94,8 +101,8 @@
         std::cout << count << std::endl;
     }
     BOOST_CHECK_EQUAL(count, 0);
- count = 0;
 
+ count = 0;
     {
         shifted_ptr<int> test = new_sh<int>(5);
         test = test;
@@ -108,17 +115,18 @@
         boost::mpl::for_each<boost::mpl::range_c<int, 1, 100> >(create_type());
     }
 
+/*
+ count = 0;
     {
         shifted_ptr<vector> v = new_sh<vector>();
         v->elements.push_back(v);
     }
     BOOST_CHECK_EQUAL(count, 0);
- count = 0;
     
     {
         vector v;
         v.elements.push_back(new_sh<vector>());
     }
     BOOST_CHECK_EQUAL(count, 0);
- count = 0;
+*/
 }


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