final fixes

[SVN r26176]
This commit is contained in:
Aleksey Gurtovoy committed 2004-11-10 23:53:10 +00:00
1 parent a009ac5eb3
commit 3008c9934d
30 files changed
+8215 -54

No files matched your search

+13 -23
View File
@@ -12,6 +12,8 @@
// $Revision$
#include <boost/mpl/range_c.hpp>
#include <boost/mpl/advance.hpp>
#include <boost/mpl/distance.hpp>
#include <boost/mpl/empty.hpp>
#include <boost/mpl/size.hpp>
#include <boost/mpl/front.hpp>
@@ -32,7 +34,7 @@ MPL_TEST_CASE()
MPL_ASSERT_NOT(( empty<range1> ));
MPL_ASSERT_NOT(( empty<range10> ));
MPL_ASSERT(( is_same<begin<range0>::type, end<range0>::type > ));
MPL_ASSERT(( is_same< begin<range0>::type, end<range0>::type > ));
MPL_ASSERT_NOT(( is_same<begin<range1>::type, end<range1>::type > ));
MPL_ASSERT_NOT(( is_same<begin<range10>::type, end<range10>::type > ));
@@ -44,27 +46,15 @@ MPL_TEST_CASE()
MPL_TEST_CASE()
{
typedef range_c<int,0,10> range10;
typedef begin<range10>::type i0;
typedef next<i0>::type i1;
typedef next<i1>::type i2;
typedef next<i2>::type i3;
typedef next<i3>::type i4;
typedef next<i4>::type i5;
typedef next<i5>::type i6;
typedef next<i6>::type i7;
typedef next<i7>::type i8;
typedef next<i8>::type i9;
typedef next<i9>::type i10;
typedef range_c<unsigned char,0,10> r;
typedef begin<r>::type first;
typedef end<r>::type last;
MPL_ASSERT_RELATION( deref<i0>::type::value, ==, 0 );
MPL_ASSERT_RELATION( deref<i1>::type::value, ==, 1 );
MPL_ASSERT_RELATION( deref<i2>::type::value, ==, 2 );
MPL_ASSERT_RELATION( deref<i3>::type::value, ==, 3 );
MPL_ASSERT_RELATION( deref<i4>::type::value, ==, 4 );
MPL_ASSERT_RELATION( deref<i5>::type::value, ==, 5 );
MPL_ASSERT_RELATION( deref<i6>::type::value, ==, 6 );
MPL_ASSERT_RELATION( deref<i7>::type::value, ==, 7 );
MPL_ASSERT_RELATION( deref<i8>::type::value, ==, 8 );
MPL_ASSERT_RELATION( deref<i9>::type::value, ==, 9 );
MPL_ASSERT(( is_same< advance_c<first,10>::type, last > ));
MPL_ASSERT(( is_same< advance_c<last,-10>::type, first > ));
MPL_ASSERT_RELATION( ( mpl::distance<first,last>::value ), ==, 10 );
typedef advance_c<first,5>::type iter;
MPL_ASSERT_RELATION( deref<iter>::type::value, ==, 5 );
}