no message

[SVN r38076]
This commit is contained in:
Ion Gaztañaga
2007-06-23 13:09:46 +00:00
parent 7be768cf8e
commit 0653ca2678
18 changed files with 412 additions and 370 deletions
+1 -1
View File
@@ -31,4 +31,4 @@ rule test_all
return $(all_rules) ;
}
test-suite intrusive_test : [ test_all r ] ;
test-suite intrusive_test : [ test_all r ] : <threading>multi ;
+1 -1
View File
@@ -19,7 +19,7 @@ namespace boost {
namespace intrusive {
namespace test {
class delete_destroyer
class delete_disposer
{
public:
template <class Pointer>
+19 -16
View File
@@ -10,6 +10,8 @@
// See http://www.boost.org/libs/intrusive for documentation.
//
/////////////////////////////////////////////////////////////////////////////
#include <boost/intrusive/detail/config_begin.hpp>
#include <boost/intrusive/list.hpp>
#include <boost/intrusive/detail/pointer_to_other.hpp>
#include "itestvalue.hpp"
@@ -269,9 +271,9 @@ void test_list<ValueTraits>
list_type testlist1 (&values[0], &values[0] + values.size());
list_type testlist2;
testlist2.clone_from(testlist1, test::new_cloner(), test::delete_destroyer());
testlist2.clone_from(testlist1, test::new_cloner(), test::delete_disposer());
BOOST_TEST (testlist2 == testlist1);
testlist2.clear_and_destroy(test::delete_destroyer());
testlist2.clear_and_dispose(test::delete_disposer());
BOOST_TEST (testlist2.empty());
}
@@ -321,23 +323,23 @@ class test_main_template<VoidPointer, false>
return 0;
}
};
/*
//Explicit instantiations of non-counted classes
template class boost::intrusive::list<list_base_raw, false>;
template class boost::intrusive::list<list_member_raw, false>;
template class boost::intrusive::list<list_auto_base_raw, false>;
template class boost::intrusive::list<list_auto_member_raw, false>;
template class boost::intrusive::list<list_base_smart, false>;
template class boost::intrusive::list<list_member_smart, false>;
template class boost::intrusive::list<list_auto_base_smart, false>;
template class boost::intrusive::list<list_auto_member_smart, false>;
//template class boost::intrusive::list<list_base_raw, false>;
//template class boost::intrusive::list<list_member_raw, false>;
//template class boost::intrusive::list<list_auto_base_raw, false>;
//template class boost::intrusive::list<list_auto_member_raw, false>;
//template class boost::intrusive::list<list_base_smart, false>;
//template class boost::intrusive::list<list_member_smart, false>;
//template class boost::intrusive::list<list_auto_base_smart, false>;
//template class boost::intrusive::list<list_auto_member_smart, false>;
//Explicit instantiation of counted classes
template class boost::intrusive::list<list_base_raw_t, true>;
template class boost::intrusive::list<list_member_raw_t, true>;
template class boost::intrusive::list<list_base_smart_t, true>;
template class boost::intrusive::list<list_member_smart_t, true>;
*/
//template class boost::intrusive::list<list_base_raw_t, true>;
//template class boost::intrusive::list<list_member_raw_t, true>;
//template class boost::intrusive::list<list_base_smart_t, true>;
//template class boost::intrusive::list<list_member_smart_t, true>;
int main( int, char* [] )
{
test_main_template<void*, false>()();
@@ -346,3 +348,4 @@ int main( int, char* [] )
test_main_template<boost::intrusive::smart_ptr<void>, true>()();
return boost::report_errors();
}
#include <boost/intrusive/detail/config_end.hpp>
+4 -4
View File
@@ -10,7 +10,7 @@
// See http://www.boost.org/libs/intrusive for documentation.
//
/////////////////////////////////////////////////////////////////////////////
#include <boost/intrusive/detail/config_begin.hpp>
#include <boost/intrusive/set.hpp>
#include <boost/intrusive/detail/pointer_to_other.hpp>
#include "itestvalue.hpp"
@@ -201,9 +201,9 @@ void test_multiset<ValueTraits>
multiset_type testmultiset1 (&values[0], &values[0] + values.size());
multiset_type testmultiset2;
testmultiset2.clone_from(testmultiset1, test::new_cloner(), test::delete_destroyer());
testmultiset2.clone_from(testmultiset1, test::new_cloner(), test::delete_disposer());
BOOST_TEST (testmultiset2 == testmultiset1);
testmultiset2.clear_and_destroy(test::delete_destroyer());
testmultiset2.clear_and_dispose(test::delete_disposer());
BOOST_TEST (testmultiset2.empty());
}
@@ -293,4 +293,4 @@ int main( int, char* [] )
return boost::report_errors();
}
#include <boost/intrusive/detail/config_end.hpp>
+4 -3
View File
@@ -10,7 +10,7 @@
// See http://www.boost.org/libs/intrusive for documentation.
//
/////////////////////////////////////////////////////////////////////////////
#include <boost/intrusive/detail/config_begin.hpp>
#include <boost/intrusive/set.hpp>
#include <boost/intrusive/detail/pointer_to_other.hpp>
#include "itestvalue.hpp"
@@ -204,9 +204,9 @@ void test_set<ValueTraits>
set_type testset1 (&values[0], &values[0] + values.size());
set_type testset2;
testset2.clone_from(testset1, test::new_cloner(), test::delete_destroyer());
testset2.clone_from(testset1, test::new_cloner(), test::delete_disposer());
BOOST_TEST (testset2 == testset1);
testset2.clear_and_destroy(test::delete_destroyer());
testset2.clear_and_dispose(test::delete_disposer());
BOOST_TEST (testset2.empty());
}
@@ -295,3 +295,4 @@ int main( int, char* [] )
test_main_template<boost::intrusive::smart_ptr<void>, true>()();
return boost::report_errors();
}
#include <boost/intrusive/detail/config_end.hpp>
+4 -2
View File
@@ -10,6 +10,7 @@
// See http://www.boost.org/libs/intrusive for documentation.
//
/////////////////////////////////////////////////////////////////////////////
#include <boost/intrusive/detail/config_begin.hpp>
#include <boost/intrusive/slist.hpp>
#include <boost/intrusive/detail/pointer_to_other.hpp>
#include "itestvalue.hpp"
@@ -302,9 +303,9 @@ void test_slist<ValueTraits>
list_type testlist1 (&values[0], &values[0] + values.size());
list_type testlist2;
testlist2.clone_from(testlist1, test::new_cloner(), test::delete_destroyer());
testlist2.clone_from(testlist1, test::new_cloner(), test::delete_disposer());
BOOST_TEST (testlist2 == testlist1);
testlist2.clear_and_destroy(test::delete_destroyer());
testlist2.clear_and_dispose(test::delete_disposer());
BOOST_TEST (testlist2.empty());
}
@@ -379,3 +380,4 @@ int main(int, char* [])
test_main_template<boost::intrusive::smart_ptr<void>, true>()();
return boost::report_errors();
}
#include <boost/intrusive/detail/config_end.hpp>
+1 -1
View File
@@ -38,7 +38,7 @@ Semantics of an expression is defined only where it differs from, or is not defi
Move constructor X(a) X().size() == a.size(). X() contains a copy of each of a's elements.
Move constructor X b(a); b.size() == a.size(). b contains a copy of each of a's elements.
Move Assignment operator b = a b.size() == a.size(). b contains a copy of each of a's elements.
Destructor a.~X() Each of a's elements is destroyed, and memory allocated for them (if any) is deallocated.
Destructor a.~X() Each of a's elements is disposed, and memory allocated for them (if any) is deallocated.
Beginning of range a.begin() Returns an iterator pointing to the first element in the container. [7] a.begin() is either dereferenceable or past-the-end. It is past-the-end if and only if a.size() == 0.
End of range a.end() Returns an iterator pointing one past the last element in the container. a.end() is past-the-end.
Size a.size() Returns the size of the container, that is, its number of elements. [8] a.size() >= 0 && a.size() <= max_size()
+11 -6
View File
@@ -11,6 +11,7 @@
//
/////////////////////////////////////////////////////////////////////////////
#include <boost/intrusive/detail/config_begin.hpp>
#include <boost/intrusive/unordered_set.hpp>
#include <boost/intrusive/detail/pointer_to_other.hpp>
#include "itestvalue.hpp"
@@ -281,14 +282,14 @@ void test_unordered_multiset<ValueTraits>
unordered_multiset_type testset1 (buckets1, BucketSize, values.begin(), values.end());
unordered_multiset_type testset2 (buckets2, BucketSize);
testset2.clone_from(testset1, test::new_cloner(), test::delete_destroyer());
testset2.clone_from(testset1, test::new_cloner(), test::delete_disposer());
//Ordering is not guarantee in the cloning so insert data in a set and test
std::multiset<typename ValueTraits::value_type>
src(testset1.begin(), testset1.end());
std::multiset<typename ValueTraits::value_type>
dst(testset2.begin(), testset2.end());
BOOST_TEST (src == dst);
testset2.clear_and_destroy(test::delete_destroyer());
testset2.clear_and_dispose(test::delete_disposer());
BOOST_TEST (testset2.empty());
}
{
@@ -298,14 +299,14 @@ void test_unordered_multiset<ValueTraits>
unordered_multiset_type testset1 (buckets1, BucketSize*2, values.begin(), values.end());
unordered_multiset_type testset2 (buckets2, BucketSize);
testset2.clone_from(testset1, test::new_cloner(), test::delete_destroyer());
testset2.clone_from(testset1, test::new_cloner(), test::delete_disposer());
//Ordering is not guarantee in the cloning so insert data in a set and test
std::multiset<typename ValueTraits::value_type>
src(testset1.begin(), testset1.end());
std::multiset<typename ValueTraits::value_type>
dst(testset2.begin(), testset2.end());
BOOST_TEST (src == dst);
testset2.clear_and_destroy(test::delete_destroyer());
testset2.clear_and_dispose(test::delete_disposer());
BOOST_TEST (testset2.empty());
}
{
@@ -315,14 +316,14 @@ void test_unordered_multiset<ValueTraits>
unordered_multiset_type testset1 (buckets1, BucketSize, values.begin(), values.end());
unordered_multiset_type testset2 (buckets2, BucketSize*2);
testset2.clone_from(testset1, test::new_cloner(), test::delete_destroyer());
testset2.clone_from(testset1, test::new_cloner(), test::delete_disposer());
//Ordering is not guarantee in the cloning so insert data in a set and test
std::multiset<typename ValueTraits::value_type>
src(testset1.begin(), testset1.end());
std::multiset<typename ValueTraits::value_type>
dst(testset2.begin(), testset2.end());
BOOST_TEST (src == dst);
testset2.clear_and_destroy(test::delete_destroyer());
testset2.clear_and_dispose(test::delete_disposer());
BOOST_TEST (testset2.empty());
}
}
@@ -375,6 +376,7 @@ class test_main_template<VoidPointer, false>
return 0;
}
};
/*
//Explicit instantiations of non-counted classes
template class boost::intrusive::unordered_multiset
@@ -428,6 +430,7 @@ template class boost::intrusive::unordered_multiset
, boost::hash<unordered_set_member_smart_t::value_type>
, std::equal_to<unordered_set_member_smart_t::value_type>, true>;
*/
int main( int, char* [] )
{
test_main_template<void*, false>()();
@@ -436,3 +439,5 @@ int main( int, char* [] )
test_main_template<boost::intrusive::smart_ptr<void>, true>()();
return boost::report_errors();
}
#include <boost/intrusive/detail/config_end.hpp>
+8 -7
View File
@@ -10,7 +10,7 @@
// See http://www.boost.org/libs/intrusive for documentation.
//
/////////////////////////////////////////////////////////////////////////////
#include <boost/intrusive/detail/config_begin.hpp>
#include <boost/intrusive/unordered_set.hpp>
#include <boost/intrusive/detail/pointer_to_other.hpp>
#include "itestvalue.hpp"
@@ -257,14 +257,14 @@ void test_unordered_set<ValueTraits>
unordered_set_type testset1 (buckets1, BucketSize, values.begin(), values.end());
unordered_set_type testset2 (buckets2, BucketSize);
testset2.clone_from(testset1, test::new_cloner(), test::delete_destroyer());
testset2.clone_from(testset1, test::new_cloner(), test::delete_disposer());
//Ordering is not guarantee in the cloning so insert data in a set and test
std::set<typename ValueTraits::value_type>
src(testset1.begin(), testset1.end());
std::set<typename ValueTraits::value_type>
dst(testset2.begin(), testset2.end());
BOOST_TEST (src == dst );
testset2.clear_and_destroy(test::delete_destroyer());
testset2.clear_and_dispose(test::delete_disposer());
BOOST_TEST (testset2.empty());
}
{
@@ -274,14 +274,14 @@ void test_unordered_set<ValueTraits>
unordered_set_type testset1 (buckets1, BucketSize*2, values.begin(), values.end());
unordered_set_type testset2 (buckets2, BucketSize);
testset2.clone_from(testset1, test::new_cloner(), test::delete_destroyer());
testset2.clone_from(testset1, test::new_cloner(), test::delete_disposer());
//Ordering is not guarantee in the cloning so insert data in a set and test
std::set<typename ValueTraits::value_type>
src(testset1.begin(), testset1.end());
std::set<typename ValueTraits::value_type>
dst(testset2.begin(), testset2.end());
BOOST_TEST (src == dst );
testset2.clear_and_destroy(test::delete_destroyer());
testset2.clear_and_dispose(test::delete_disposer());
BOOST_TEST (testset2.empty());
}
{
@@ -291,14 +291,14 @@ void test_unordered_set<ValueTraits>
unordered_set_type testset1 (buckets1, BucketSize, values.begin(), values.end());
unordered_set_type testset2 (buckets2, BucketSize*2);
testset2.clone_from(testset1, test::new_cloner(), test::delete_destroyer());
testset2.clone_from(testset1, test::new_cloner(), test::delete_disposer());
//Ordering is not guarantee in the cloning so insert data in a set and test
std::set<typename ValueTraits::value_type>
src(testset1.begin(), testset1.end());
std::set<typename ValueTraits::value_type>
dst(testset2.begin(), testset2.end());
BOOST_TEST (src == dst );
testset2.clear_and_destroy(test::delete_destroyer());
testset2.clear_and_dispose(test::delete_disposer());
BOOST_TEST (testset2.empty());
}
}
@@ -411,3 +411,4 @@ int main( int, char* [] )
test_main_template<boost::intrusive::smart_ptr<void>, true>()();
return boost::report_errors();
}
#include <boost/intrusive/detail/config_end.hpp>