X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=boost%2Fpending%2Fiterator_tests.hpp;h=37c839b76042032b0e117cbc9d1f5ecc4e961b6a;hb=08c1e93fa36a49f49325a07fe91ff92c964c2b6c;hp=dd5fe2ddd6a52f6cc2a50a8c26648ca85b487c90;hpb=bb4dd8289b351fae6b55e303f189127a394a1edd;p=platform%2Fupstream%2Fboost.git diff --git a/boost/pending/iterator_tests.hpp b/boost/pending/iterator_tests.hpp index dd5fe2d..37c839b 100644 --- a/boost/pending/iterator_tests.hpp +++ b/boost/pending/iterator_tests.hpp @@ -25,28 +25,26 @@ # include # include // for detail::dummy_constructor # include -# include namespace boost { // use this for the value type -struct dummyT { +struct dummyT { dummyT() { } dummyT(detail::dummy_constructor) { } dummyT(int x) : m_x(x) { } - int foo() const { return m_x; } + int foo() const { return m_x; } bool operator==(const dummyT& d) const { return m_x == d.m_x; } int m_x; }; } -BOOST_TT_BROKEN_COMPILER_SPEC(boost::dummyT) - namespace boost { +namespace iterators { // Tests whether type Iterator satisfies the requirements for a -// TrivialIterator. +// TrivialIterator. // Preconditions: i != j, *i == val template void trivial_iterator_test(const Iterator i, const Iterator j, T val) @@ -87,7 +85,7 @@ void mutable_trivial_iterator_test(const Iterator i, const Iterator j, T val) // Preconditions: *i == v1, *++i == v2 template -void input_iterator_test(Iterator i, T v1, T v2) +void input_iterator_test(Iterator i, T v1, T v2) { Iterator i1(i); @@ -153,7 +151,7 @@ template <> struct lvalue_test { #endif template -void forward_iterator_test(Iterator i, T v1, T v2) +void forward_iterator_test(Iterator i, T v1, T v2) { input_iterator_test(i, v1, v2); @@ -218,7 +216,7 @@ void random_access_iterator_test(Iterator i, int N, TrueVals vals) int c; typedef typename boost::detail::iterator_traits::value_type value_type; - + for (c = 0; c < N-1; ++c) { assert(i == j + c); assert(*i == vals[c]); @@ -237,7 +235,7 @@ void random_access_iterator_test(Iterator i, int N, TrueVals vals) assert(i == k - c); assert(*i == vals[N - 1 - c]); assert(*i == boost::implicit_cast(j[N - 1 - c])); - Iterator q = k - c; + Iterator q = k - c; assert(*i == *q); assert(i > j); assert(i >= j); @@ -263,6 +261,18 @@ void const_nonconst_iterator_test(Iterator i, ConstIterator j) assert(i == k); } +} // namespace iterators + +using iterators::undefined; +using iterators::trivial_iterator_test; +using iterators::mutable_trivial_iterator_test; +using iterators::input_iterator_test; +using iterators::lvalue_test; +using iterators::forward_iterator_test; +using iterators::bidirectional_iterator_test; +using iterators::random_access_iterator_test; +using iterators::const_nonconst_iterator_test; + } // namespace boost #endif // BOOST_ITERATOR_TESTS_HPP