Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71386 - sandbox/shifted_ptr/libs/smart_ptr/example
From: phil_at_[hidden]
Date: 2011-04-19 20:25:11


Author: pbouchard
Date: 2011-04-19 20:25:10 EDT (Tue, 19 Apr 2011)
New Revision: 71386
URL: http://svn.boost.org/trac/boost/changeset/71386

Log:
* Uncommented successful tests
Text files modified:
   sandbox/shifted_ptr/libs/smart_ptr/example/shifted_ptr_test3.cpp | 16 +++++++++-------
   1 files changed, 9 insertions(+), 7 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 2011-04-19 20:25:10 EDT (Tue, 19 Apr 2011)
@@ -12,6 +12,7 @@
 
 
 #include <boost/shifted_ptr.hpp>
+#include <boost/shifted_allocator.hpp>
 
 #include <vector>
 #include <iostream>
@@ -29,6 +30,7 @@
 
 using boost::shifted_ptr;
 using boost::shifted;
+using boost::shifted_allocator;
 
 struct node {
     node() {
@@ -69,7 +71,7 @@
     vector() { ++count; }
     ~vector() { --count; }
     vector(const vector& other) : elements(other.elements) { ++count; }
- std::vector<shifted_ptr<vector> > elements;
+ std::vector<shifted_ptr<vector>, shifted_allocator<shifted_ptr<vector> > > elements;
 };
 
 struct create_type {
@@ -80,14 +82,14 @@
 };
 
 BOOST_AUTO_TEST_CASE(test_shifted_ptr) {
-/*
+
     count = 0;
     {
         shifted_ptr<vector> v = new shifted<vector>();
         v->elements.push_back(v);
     }
     BOOST_CHECK_EQUAL(count, 0);
-*/
+/*
     count = 0;
     {
         list l;
@@ -99,7 +101,7 @@
         }
     }
     BOOST_CHECK_EQUAL(count, 0);
-/*
+*/
     count = 0;
     {
         shifted_ptr<int> test = new shifted<int>(5);
@@ -112,18 +114,18 @@
     for(int i = 0; i < 500; ++i) {
         boost::mpl::for_each<boost::mpl::range_c<int, 1, 100> >(create_type());
     }
-*/
-/*
+
     count = 0;
     {
         shifted_ptr<vector> v = new shifted<vector>();
         v->elements.push_back(v);
     }
     BOOST_CHECK_EQUAL(count, 0);
-*/
+
     {
         vector v;
         v.elements.push_back(new shifted<vector>());
     }
     BOOST_CHECK_EQUAL(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