mirror of
https://github.com/boostorg/mpl.git
synced 2025-08-01 05:44:37 +02:00
Updated tests and jamfiles to reflect the changed testing headers location.
This commit is contained in:
@@ -11,6 +11,11 @@
|
||||
|
||||
import testing ;
|
||||
|
||||
project
|
||||
: requirements
|
||||
<include>.
|
||||
;
|
||||
|
||||
compile aux_/largest_int.cpp ;
|
||||
|
||||
compile arithmetic.cpp ;
|
||||
|
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <boost/mpl/arithmetic.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -12,9 +12,8 @@
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/largest_int.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -14,7 +14,7 @@
|
||||
|
||||
#include <boost/mpl/bitwise.hpp>
|
||||
#include <boost/mpl/integral_c.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
typedef integral_c<unsigned int, 0> _0;
|
||||
typedef integral_c<unsigned int, 1> _1;
|
||||
|
@@ -12,8 +12,8 @@
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
|
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <boost/mpl/comparison.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
// make sure MSVC behaves nicely in presence of the following template
|
||||
template< typename T > struct value {};
|
||||
|
@@ -14,10 +14,8 @@
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -14,7 +14,7 @@
|
||||
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
BOOST_MPL_HAS_XXX_TRAIT_DEF(xxx)
|
||||
BOOST_MPL_HAS_XXX_TEMPLATE_NAMED_DEF(has_xxx_template, xxx, false)
|
||||
|
@@ -13,8 +13,8 @@
|
||||
|
||||
#include <boost/mpl/apply.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -13,8 +13,8 @@
|
||||
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -12,9 +12,9 @@
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/next_prior.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
|
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <boost/mpl/logical.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
struct unknown;
|
||||
|
||||
|
@@ -13,10 +13,8 @@
|
||||
|
||||
#include <boost/mpl/min_max.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/long.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
struct complex_tag : int_<10> {};
|
||||
|
||||
|
@@ -12,9 +12,7 @@
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/print.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -12,7 +12,7 @@
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/sizeof.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
struct my
|
||||
{
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_TEST_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_TEST_HPP_INCLUDED
|
||||
#ifndef BOOST_MPL_TEST_TEST_HPP_INCLUDED
|
||||
#define BOOST_MPL_TEST_TEST_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
@@ -14,9 +14,9 @@
|
||||
// $Date$
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/test/test_case.hpp>
|
||||
#include <boost/mpl/aux_/test/data.hpp>
|
||||
#include <boost/mpl/aux_/test/assert.hpp>
|
||||
#include "test/test_case.hpp"
|
||||
#include "test/data.hpp"
|
||||
#include "test/assert.hpp"
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
|
||||
int main()
|
||||
@@ -27,4 +27,4 @@ int main()
|
||||
using namespace boost;
|
||||
using namespace mpl;
|
||||
|
||||
#endif // BOOST_MPL_AUX_TEST_HPP_INCLUDED
|
||||
#endif // BOOST_MPL_TEST_TEST_HPP_INCLUDED
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_TEST_ASSERT_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_TEST_ASSERT_HPP_INCLUDED
|
||||
#ifndef BOOST_MPL_TEST_TEST_ASSERT_HPP_INCLUDED
|
||||
#define BOOST_MPL_TEST_TEST_ASSERT_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
@@ -26,4 +26,4 @@
|
||||
enum { BOOST_PP_CAT(instantiation_test, __LINE__) = sizeof( x ) } \
|
||||
/**/
|
||||
|
||||
#endif // BOOST_MPL_AUX_TEST_ASSERT_HPP_INCLUDED
|
||||
#endif // BOOST_MPL_TEST_TEST_ASSERT_HPP_INCLUDED
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_TEST_DATA_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_TEST_DATA_HPP_INCLUDED
|
||||
#ifndef BOOST_MPL_TEST_TEST_DATA_HPP_INCLUDED
|
||||
#define BOOST_MPL_TEST_TEST_DATA_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
@@ -22,4 +22,4 @@ struct incomplete;
|
||||
class abstract { public: virtual ~abstract() = 0; };
|
||||
using boost::noncopyable;
|
||||
|
||||
#endif // BOOST_MPL_AUX_TEST_DATA_HPP_INCLUDED
|
||||
#endif // BOOST_MPL_TEST_TEST_DATA_HPP_INCLUDED
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
||||
#ifndef BOOST_MPL_AUX_TEST_TEST_CASE_HPP_INCLUDED
|
||||
#define BOOST_MPL_AUX_TEST_TEST_CASE_HPP_INCLUDED
|
||||
#ifndef BOOST_MPL_TEST_TEST_TEST_CASE_HPP_INCLUDED
|
||||
#define BOOST_MPL_TEST_TEST_TEST_CASE_HPP_INCLUDED
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2002-2004
|
||||
//
|
||||
@@ -18,4 +18,4 @@
|
||||
|
||||
#define MPL_TEST_CASE() void BOOST_PP_CAT(test,__LINE__)()
|
||||
|
||||
#endif // BOOST_MPL_AUX_TEST_TEST_CASE_HPP_INCLUDED
|
||||
#endif // BOOST_MPL_TEST_TEST_TEST_CASE_HPP_INCLUDED
|
||||
|
@@ -11,6 +11,11 @@
|
||||
|
||||
import testing ;
|
||||
|
||||
project
|
||||
: requirements
|
||||
<include>../core/test
|
||||
;
|
||||
|
||||
compile aux_/msvc_is_class.cpp ;
|
||||
compile aux_/template_arity.cpp ;
|
||||
compile aux_/preprocessor/is_seq.cpp ;
|
||||
|
@@ -13,10 +13,10 @@
|
||||
|
||||
#include <boost/mpl/advance.hpp>
|
||||
#include <boost/mpl/iterator_tags.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
template< int pos > struct iter
|
||||
{
|
||||
typedef mpl::bidirectional_iterator_tag category;
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -15,9 +15,9 @@
|
||||
#include <boost/mpl/lambda.hpp>
|
||||
#include <boost/mpl/plus.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
|
||||
template< typename T > struct std_vector
|
||||
|
@@ -15,7 +15,6 @@
|
||||
#include <boost/mpl/limits/arity.hpp>
|
||||
#include <boost/mpl/aux_/preprocessor/params.hpp>
|
||||
#include <boost/mpl/aux_/preprocessor/enum.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/preprocessor/repeat.hpp>
|
||||
@@ -24,6 +23,8 @@
|
||||
#include <boost/preprocessor/if.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
|
||||
# define APPLY_0_FUNC_DEF(i) \
|
||||
struct f0 \
|
||||
|
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <boost/mpl/as_sequence.hpp>
|
||||
#include <boost/mpl/vector.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -13,8 +13,8 @@
|
||||
|
||||
#include <boost/mpl/at.hpp>
|
||||
#include <boost/mpl/vector/vector10_c.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
template< typename Seq, int n > struct at_test
|
||||
{
|
||||
@@ -26,7 +26,7 @@ template< typename Seq, int n > struct at_test
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
typedef vector10_c<int,9,8,7,6,5,4,3,2,1,0> numbers;
|
||||
|
||||
|
||||
at_test< numbers, 0 >();
|
||||
at_test< numbers, 1 >();
|
||||
at_test< numbers, 2 >();
|
||||
|
@@ -17,7 +17,7 @@
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
|
||||
|
||||
#include <boost/mpl/aux_/msvc_is_class.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
template< typename T > struct A { T x[0]; };
|
||||
|
||||
@@ -34,7 +34,7 @@ MPL_TEST_CASE()
|
||||
MPL_ASSERT_NOT(( aux::msvc_is_class< int[5] > ));
|
||||
MPL_ASSERT_NOT(( aux::msvc_is_class< void (*)() > ));
|
||||
MPL_ASSERT_NOT(( aux::msvc_is_class< int (*)(int, char) > ));
|
||||
|
||||
|
||||
MPL_ASSERT(( aux::msvc_is_class< UDT > ));
|
||||
MPL_ASSERT(( aux::msvc_is_class< incomplete > ));
|
||||
MPL_ASSERT(( aux::msvc_is_class< abstract > ));
|
||||
|
@@ -12,7 +12,7 @@
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/aux_/template_arity.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
#if defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
|
||||
|
||||
|
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <boost/mpl/back.hpp>
|
||||
#include <boost/mpl/range_c.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
template< typename Seq, int value > struct back_test
|
||||
{
|
||||
|
@@ -18,11 +18,12 @@
|
||||
#include <boost/mpl/next.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/apply_wrap.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_float.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
namespace {
|
||||
|
||||
struct f1
|
||||
@@ -50,7 +51,7 @@ MPL_TEST_CASE() // basic argument binding
|
||||
typedef apply_wrap5< bind1<f1,_5>, void,void,void,void,int >::type r12;
|
||||
MPL_ASSERT(( boost::is_same<r11,int> ));
|
||||
MPL_ASSERT(( boost::is_same<r12,int> ));
|
||||
|
||||
|
||||
typedef apply_wrap5< bind5<f5,_1,_2,_3,_4,_5>, void,void,void,void,int >::type r51;
|
||||
typedef apply_wrap5< bind5<f5,_5,_4,_3,_2,_1>, int,void,void,void,void >::type r52;
|
||||
MPL_ASSERT(( boost::is_same<r51,int> ));
|
||||
@@ -83,7 +84,7 @@ MPL_TEST_CASE() // if_ evaluation
|
||||
typedef bind3< quote3<if_>, _1, bind1< quote1<next>, _2>, _3 > f;
|
||||
typedef apply_wrap3< f,true_,int_<0>,int >::type r1;
|
||||
typedef apply_wrap3< f,false_,int,int_<0> >::type r2;
|
||||
|
||||
|
||||
MPL_ASSERT(( boost::is_same<r1,int_<1> > ));
|
||||
MPL_ASSERT(( boost::is_same<r2,int_<0> > ));
|
||||
}
|
||||
|
@@ -13,10 +13,10 @@
|
||||
|
||||
#include <boost/mpl/contains.hpp>
|
||||
#include <boost/mpl/vector.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
{
|
||||
typedef vector<int,char,long,short,char,long,double,long>::type types;
|
||||
|
||||
MPL_ASSERT(( contains< types,short > ));
|
||||
|
@@ -34,7 +34,7 @@
|
||||
#include <boost/mpl/pop_back_fwd.hpp>
|
||||
#include <boost/mpl/back_fwd.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -22,7 +22,7 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/type_traits/is_float.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#include <boost/mpl/vector.hpp>
|
||||
#include <boost/mpl/vector_c.hpp>
|
||||
#include <boost/mpl/integral_c.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
@@ -28,7 +28,7 @@ MPL_TEST_CASE()
|
||||
MPL_ASSERT_RELATION( (count<types,long>::value), ==, 3 );
|
||||
MPL_ASSERT_RELATION( (count<types,unsigned>::value), ==, 0 );
|
||||
}
|
||||
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
typedef vector_c<int,1,0,5,1,7,5,0,5> values;
|
||||
|
@@ -16,16 +16,17 @@
|
||||
#include <boost/mpl/vector_c.hpp>
|
||||
#include <boost/mpl/comparison.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_float.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
typedef vector<int,char&,long,short,char&,long,double,long> types;
|
||||
typedef vector_c<int,1,0,5,1,7,5,0,5> values;
|
||||
|
||||
|
||||
MPL_ASSERT_RELATION( (count_if< types, boost::is_float<_> >::value), ==, 1 );
|
||||
MPL_ASSERT_RELATION( (count_if< types, boost::is_same<_,char&> >::value), ==, 2 );
|
||||
MPL_ASSERT_RELATION( (count_if< types, boost::is_same<_,void*> >::value), ==, 0 );
|
||||
|
@@ -21,9 +21,8 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/empty.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
@@ -54,11 +53,11 @@ MPL_TEST_CASE()
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
typedef deque<char,long> d2;
|
||||
|
||||
|
||||
typedef begin<d2>::type i1;
|
||||
typedef next<i1>::type i2;
|
||||
typedef next<i2>::type i3;
|
||||
|
||||
|
||||
MPL_ASSERT(( boost::is_same<deref<i1>::type,char> ));
|
||||
MPL_ASSERT(( boost::is_same<deref<i2>::type,long> ));
|
||||
MPL_ASSERT(( boost::is_same< i3, end<d2>::type > ));
|
||||
|
@@ -15,7 +15,7 @@
|
||||
#include <boost/mpl/list.hpp>
|
||||
#include <boost/mpl/range_c.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
|
||||
MPL_TEST_CASE()
|
||||
@@ -23,7 +23,7 @@ MPL_TEST_CASE()
|
||||
typedef list<char,short,int,long>::type list;
|
||||
typedef begin<list>::type first;
|
||||
typedef end<list>::type last;
|
||||
|
||||
|
||||
MPL_ASSERT_RELATION( (mpl::distance<first,last>::value), ==, 4 );
|
||||
}
|
||||
|
||||
@@ -32,6 +32,6 @@ MPL_TEST_CASE()
|
||||
typedef range_c<int,0,10>::type range;
|
||||
typedef begin<range>::type first;
|
||||
typedef end<range>::type last;
|
||||
|
||||
|
||||
MPL_ASSERT_RELATION( (mpl::distance<first,last>::value), ==, 10 );
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@
|
||||
#include <boost/mpl/empty.hpp>
|
||||
|
||||
#include <boost/mpl/list/list10.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -17,10 +17,10 @@
|
||||
#include <boost/mpl/distance.hpp>
|
||||
#include <boost/mpl/advance.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/add_pointer.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -14,7 +14,7 @@
|
||||
#include <boost/mpl/equal.hpp>
|
||||
|
||||
#include <boost/mpl/list.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
@@ -22,7 +22,7 @@ MPL_TEST_CASE()
|
||||
typedef list<int,float,long,double,char,long,double,float> list2;
|
||||
typedef list<int,float,long,double,char,long,double,short> list3;
|
||||
typedef list<int,float,long,double,char,long,double> list4;
|
||||
|
||||
|
||||
MPL_ASSERT(( equal<list1,list2> ));
|
||||
MPL_ASSERT(( equal<list2,list1> ));
|
||||
MPL_ASSERT_NOT(( equal<list2,list3> ));
|
||||
|
@@ -18,15 +18,15 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/integral_c.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
typedef list<int,char,long,short,char,long,double,long> types;
|
||||
typedef find<types,short>::type iter;
|
||||
|
||||
|
||||
typedef erase<types, iter>::type result;
|
||||
MPL_ASSERT_RELATION( size<result>::value, ==, 7 );
|
||||
|
||||
|
@@ -16,8 +16,8 @@
|
||||
#include <boost/mpl/find.hpp>
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
@@ -27,7 +27,7 @@ MPL_TEST_CASE()
|
||||
typedef find<types,double>::type iter2;
|
||||
|
||||
typedef erase<types,iter1,iter2>::type result;
|
||||
|
||||
|
||||
MPL_ASSERT_RELATION( size<result>::value, ==, 5 );
|
||||
|
||||
typedef find<result,unsigned>::type iter;
|
||||
|
@@ -18,10 +18,10 @@
|
||||
#include <boost/mpl/list.hpp>
|
||||
#include <boost/mpl/sizeof.hpp>
|
||||
#include <boost/mpl/deref.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_float.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -17,17 +17,17 @@
|
||||
#include <boost/mpl/distance.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
{
|
||||
typedef list<int,char,long,short,char,long,double,long>::type types;
|
||||
typedef list_c<int,1,0,5,1,7,5,0,5> values;
|
||||
|
||||
typedef find<types, short>::type types_iter;
|
||||
typedef find< values, integral_c<int,7> >::type values_iter;
|
||||
|
||||
|
||||
MPL_ASSERT(( is_same< deref<types_iter>::type, short> ));
|
||||
MPL_ASSERT_RELATION( deref<values_iter>::type::value, ==, 7 );
|
||||
|
||||
|
@@ -16,11 +16,12 @@
|
||||
#include <boost/mpl/vector.hpp>
|
||||
#include <boost/mpl/distance.hpp>
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_float.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
typedef vector<int,char,long,short,char,long,double,float,char>::type types;
|
||||
typedef begin<types>::type first_;
|
||||
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/type_traits/is_float.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <boost/mpl/front.hpp>
|
||||
#include <boost/mpl/range_c.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
template< typename Seq, int value > struct front_test
|
||||
{
|
||||
|
@@ -15,7 +15,7 @@
|
||||
#include <boost/mpl/index_of.hpp>
|
||||
#include <boost/mpl/list.hpp>
|
||||
#include <boost/mpl/void.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -12,8 +12,8 @@
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/inherit.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
struct her { typedef her herself; };
|
||||
struct my { typedef my myself; };
|
||||
@@ -25,10 +25,10 @@ MPL_TEST_CASE()
|
||||
typedef inherit<her,my>::type her_my1;
|
||||
MPL_ASSERT(( is_same<her_my1::herself, her> ));
|
||||
MPL_ASSERT(( is_same<her_my1::myself, my> ));
|
||||
|
||||
|
||||
typedef inherit<empty_base,her>::type her1;
|
||||
MPL_ASSERT(( is_same<her1, her> ));
|
||||
|
||||
|
||||
typedef inherit<empty_base,her,empty_base,empty_base>::type her2;
|
||||
MPL_ASSERT(( is_same<her2, her> ));
|
||||
|
||||
|
@@ -18,14 +18,14 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/range_c.hpp>
|
||||
#include <boost/mpl/equal.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
typedef vector_c<int,0,1,3,4,5,6,7,8,9> numbers;
|
||||
typedef find< numbers,integral_c<int,3> >::type pos;
|
||||
typedef insert< numbers,pos,integral_c<int,2> >::type range;
|
||||
|
||||
|
||||
MPL_ASSERT_RELATION( size<range>::value, ==, 10 );
|
||||
MPL_ASSERT(( equal< range,range_c<int,0,10> > ));
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#include <boost/mpl/range_c.hpp>
|
||||
#include <boost/mpl/equal.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -13,12 +13,12 @@
|
||||
|
||||
#include <boost/mpl/is_placeholder.hpp>
|
||||
#include <boost/mpl/placeholders.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/preprocessor/repeat.hpp>
|
||||
#include <boost/preprocessor/inc.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
#define AUX_IS_PLACEHOLDER_TEST(unused1, n, unused2) \
|
||||
{ MPL_ASSERT(( is_placeholder< \
|
||||
BOOST_PP_CAT(_,BOOST_PP_INC(n)) \
|
||||
@@ -33,7 +33,7 @@ MPL_TEST_CASE()
|
||||
MPL_ASSERT_NOT(( is_placeholder<abstract> ));
|
||||
MPL_ASSERT_NOT(( is_placeholder<noncopyable> ));
|
||||
MPL_ASSERT(( is_placeholder<_> ));
|
||||
|
||||
|
||||
BOOST_PP_REPEAT(
|
||||
BOOST_MPL_LIMIT_METAFUNCTION_ARITY
|
||||
, AUX_IS_PLACEHOLDER_TEST
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#include <boost/mpl/list.hpp>
|
||||
#include <boost/mpl/vector.hpp>
|
||||
#include <boost/mpl/range_c.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
template< typename T > struct std_vector
|
||||
{
|
||||
|
@@ -14,7 +14,7 @@
|
||||
#include <boost/mpl/iterator_tags.hpp>
|
||||
|
||||
#include <boost/mpl/less.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -17,10 +17,9 @@
|
||||
#include <boost/mpl/list.hpp>
|
||||
#include <boost/mpl/equal.hpp>
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
@@ -39,10 +38,10 @@ template< typename View > struct test_is_empty
|
||||
{
|
||||
typedef typename begin<View>::type first_;
|
||||
typedef typename end<View>::type last_;
|
||||
|
||||
|
||||
MPL_ASSERT_RELATION( size<View>::value, ==, 0 );
|
||||
MPL_ASSERT(( is_same< first_,last_> ));
|
||||
|
||||
|
||||
MPL_ASSERT_INSTANTIATION( View );
|
||||
MPL_ASSERT_INSTANTIATION( first_ );
|
||||
MPL_ASSERT_INSTANTIATION( last_ );
|
||||
|
@@ -20,10 +20,9 @@
|
||||
#include <boost/mpl/sizeof.hpp>
|
||||
#include <boost/mpl/apply.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/is_float.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
struct my
|
||||
{
|
||||
@@ -73,6 +72,6 @@ MPL_TEST_CASE()
|
||||
// bind <-> lambda interaction
|
||||
typedef lambda< less<_1,_2> >::type pred;
|
||||
typedef bind2< pred, _1, int_<4> > f;
|
||||
|
||||
|
||||
MPL_ASSERT(( apply_wrap1< f,int_<3> > ));
|
||||
}
|
||||
|
@@ -13,11 +13,11 @@
|
||||
|
||||
#include <boost/mpl/lambda.hpp>
|
||||
#include <boost/mpl/apply.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/mpl/aux_/config/gcc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
typedef int UDT::* mem_ptr;
|
||||
typedef int (UDT::* mem_fun_ptr)();
|
||||
|
@@ -18,9 +18,8 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/empty.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
|
||||
MPL_TEST_CASE()
|
||||
@@ -48,11 +47,11 @@ MPL_TEST_CASE()
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
typedef list2<char,long> l2;
|
||||
|
||||
|
||||
typedef begin<l2>::type i1;
|
||||
typedef next<i1>::type i2;
|
||||
typedef next<i2>::type i3;
|
||||
|
||||
|
||||
MPL_ASSERT(( is_same<deref<i1>::type,char> ));
|
||||
MPL_ASSERT(( is_same<deref<i2>::type,long> ));
|
||||
MPL_ASSERT(( is_same< i3, end<l2>::type > ));
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
@@ -72,11 +72,11 @@ MPL_TEST_CASE()
|
||||
typedef list_c<unsigned,2,1> l2;
|
||||
|
||||
MPL_ASSERT(( is_same< l2::value_type, unsigned > ));
|
||||
|
||||
|
||||
typedef begin<l2>::type i1;
|
||||
typedef next<i1>::type i2;
|
||||
typedef next<i2>::type i3;
|
||||
|
||||
|
||||
MPL_ASSERT_RELATION( deref<i1>::type::value, ==, 2 );
|
||||
MPL_ASSERT_RELATION( deref<i2>::type::value, ==, 1 );
|
||||
MPL_ASSERT(( is_same< i3, end<l2>::type > ));
|
||||
|
@@ -16,13 +16,13 @@
|
||||
#include <boost/mpl/list_c.hpp>
|
||||
#include <boost/mpl/less.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
typedef list_c<int,1,2,3,3,3,5,8> numbers;
|
||||
typedef lower_bound< numbers, int_<4> >::type iter;
|
||||
|
||||
|
||||
MPL_ASSERT_RELATION( (mpl::distance< begin<numbers>::type,iter >::value), ==, 5 );
|
||||
MPL_ASSERT_RELATION( deref<iter>::type::value, ==, 5 );
|
||||
}
|
||||
|
14
test/map.cpp
14
test/map.cpp
@@ -26,7 +26,7 @@
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
|
||||
MPL_TEST_CASE()
|
||||
@@ -41,7 +41,7 @@ MPL_TEST_CASE()
|
||||
MPL_ASSERT_RELATION( size<m>::type::value, ==, 1 );
|
||||
MPL_ASSERT_NOT(( empty<m> ));
|
||||
MPL_ASSERT(( is_same< clear<m>::type,map0<> > ));
|
||||
|
||||
|
||||
MPL_ASSERT(( is_same< at<m,int>::type,unsigned > ));
|
||||
MPL_ASSERT(( is_same< at<m,char>::type,void_ > ));
|
||||
MPL_ASSERT(( contains< m,mpl::pair<int,unsigned> > ));
|
||||
@@ -50,7 +50,7 @@ MPL_TEST_CASE()
|
||||
|
||||
MPL_ASSERT_NOT(( has_key<m,char>::type ));
|
||||
MPL_ASSERT(( has_key<m,int>::type ));
|
||||
|
||||
|
||||
MPL_ASSERT_NOT(( is_same< order<m,int>::type, void_ > ));
|
||||
MPL_ASSERT(( is_same< order<m,char>::type,void_ > ));
|
||||
|
||||
@@ -126,7 +126,7 @@ MPL_TEST_CASE()
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
typedef map0<> m;
|
||||
|
||||
|
||||
MPL_ASSERT_RELATION( size<m>::type::value, ==, 0 );
|
||||
MPL_ASSERT(( empty<m>::type ));
|
||||
|
||||
@@ -177,20 +177,20 @@ MPL_TEST_CASE()
|
||||
{
|
||||
typedef map< mpl::pair<int,int*> > map_of_1_pair;
|
||||
typedef begin<map_of_1_pair>::type iter_to_1_pair;
|
||||
|
||||
|
||||
BOOST_MPL_ASSERT((
|
||||
is_same<
|
||||
deref<iter_to_1_pair>::type
|
||||
, mpl::pair<int,int*>
|
||||
>
|
||||
));
|
||||
|
||||
|
||||
typedef map<
|
||||
mpl::pair<int,int*>
|
||||
, mpl::pair<long,long*>
|
||||
, mpl::pair<char,char*>
|
||||
> mymap;
|
||||
|
||||
|
||||
test<mymap>();
|
||||
test<mymap::type>();
|
||||
}
|
||||
|
@@ -14,13 +14,13 @@
|
||||
#include <boost/mpl/max_element.hpp>
|
||||
|
||||
#include <boost/mpl/list_c.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
typedef list_c<int,3,4,2,0,-5,8,-1,7>::type numbers;
|
||||
typedef max_element< numbers >::type iter;
|
||||
typedef deref<iter>::type max_value;
|
||||
|
||||
|
||||
MPL_ASSERT_RELATION( max_value::value, ==, 8 );
|
||||
}
|
||||
|
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <boost/mpl/insert.hpp>
|
||||
#include <boost/mpl/count.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/mpl/assert.hpp>
|
||||
#include <boost/mpl/size.hpp>
|
||||
@@ -24,6 +23,7 @@
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
/*
|
||||
struct test_data1
|
||||
@@ -93,16 +93,16 @@ void find_test()
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
// agurt 11/jun/06: multiset does not implement iterators yet!
|
||||
// agurt 11/jun/06: multiset does not implement iterators yet!
|
||||
// typedef insert<multiset0<>, int>::type set_of_1_int;
|
||||
// typedef begin<set_of_1_int>::type iter_to_1_int;
|
||||
// BOOST_MPL_ASSERT(( is_same< deref<iter_to_1_int>::type, int > ));
|
||||
|
||||
|
||||
typedef multiset0<> s0;
|
||||
typedef insert<s0,int>::type s1;
|
||||
typedef insert<s1,long>::type s2;
|
||||
typedef insert<s2,char>::type myset;
|
||||
|
||||
|
||||
// find_test<myset>();
|
||||
// find_test<myset::type>();
|
||||
}
|
||||
|
@@ -14,8 +14,8 @@
|
||||
#include <boost/mpl/next.hpp>
|
||||
#include <boost/mpl/prior.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -16,31 +16,31 @@
|
||||
#include <boost/mpl/vector/vector50_c.hpp>
|
||||
#include <boost/mpl/range_c.hpp>
|
||||
#include <boost/mpl/distance.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
typedef range_c<int,0,10> r;
|
||||
typedef vector10_c<int,9,8,7,6,5,4,3,2,1,10> v;
|
||||
|
||||
|
||||
typedef pair_view<r,v> view;
|
||||
typedef begin<view>::type first_;
|
||||
typedef end<view>::type last_;
|
||||
|
||||
MPL_ASSERT(( is_same< first_::category, mpl::random_access_iterator_tag > ));
|
||||
|
||||
|
||||
MPL_ASSERT(( is_same< advance_c<first_,0>::type, first_ > ));
|
||||
MPL_ASSERT(( is_same< advance_c<last_,0>::type, last_ > ));
|
||||
MPL_ASSERT(( is_same< advance_c<first_,10>::type, last_ > ));
|
||||
MPL_ASSERT(( is_same< advance_c<last_,-10>::type, first_ > ));
|
||||
|
||||
|
||||
typedef advance_c<first_,5>::type iter;
|
||||
|
||||
|
||||
MPL_ASSERT(( is_same<
|
||||
deref<iter>::type
|
||||
, mpl::pair< integral_c<int,5>,integral_c<int,4> >
|
||||
> ));
|
||||
|
||||
> ));
|
||||
|
||||
}
|
||||
|
@@ -19,7 +19,8 @@
|
||||
#include <boost/mpl/equal.hpp>
|
||||
#include <boost/mpl/modulus.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
template< typename N > struct is_odd
|
||||
: modulus< N, int_<2> >
|
||||
|
@@ -15,8 +15,8 @@
|
||||
#include <boost/mpl/list.hpp>
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/front.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
@@ -27,11 +27,11 @@ MPL_TEST_CASE()
|
||||
typedef pop_front<types1>::type result1;
|
||||
typedef pop_front<types2>::type result2;
|
||||
typedef pop_front<types3>::type result3;
|
||||
|
||||
|
||||
MPL_ASSERT_RELATION( size<result1>::value, ==, 0 );
|
||||
MPL_ASSERT_RELATION( size<result2>::value, ==, 1 );
|
||||
MPL_ASSERT_RELATION( size<result3>::value, ==, 2 );
|
||||
|
||||
|
||||
MPL_ASSERT(( is_same< front<result2>::type, long > ));
|
||||
MPL_ASSERT(( is_same< front<result3>::type, int > ));
|
||||
}
|
||||
|
@@ -13,9 +13,8 @@
|
||||
|
||||
#include <boost/mpl/push_back.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
struct no_push_back_tag {};
|
||||
|
||||
|
@@ -18,10 +18,10 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/front.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
struct no_push_front_tag {};
|
||||
|
||||
struct no_push_front
|
||||
@@ -34,15 +34,15 @@ MPL_TEST_CASE()
|
||||
typedef push_front<list0<>,long>::type res1;
|
||||
typedef push_front<list1<long>,int>::type res2;
|
||||
typedef push_front<list2<int,long>,char>::type res3;
|
||||
|
||||
|
||||
MPL_ASSERT_RELATION( size<res1>::value, ==, 1 );
|
||||
MPL_ASSERT_RELATION( size<res2>::value, ==, 2 );
|
||||
MPL_ASSERT_RELATION( size<res3>::value, ==, 3 );
|
||||
|
||||
|
||||
MPL_ASSERT(( is_same< front<res1>::type, long > ));
|
||||
MPL_ASSERT(( is_same< front<res2>::type, int > ));
|
||||
MPL_ASSERT(( is_same< front<res3>::type, char > ));
|
||||
|
||||
|
||||
MPL_ASSERT(( has_push_front< list0<> > ));
|
||||
MPL_ASSERT(( has_push_front< list1<long> > ));
|
||||
|
||||
|
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <boost/mpl/quote.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
template< typename T > struct f1
|
||||
{
|
||||
@@ -36,7 +36,7 @@ MPL_TEST_CASE()
|
||||
{
|
||||
typedef quote1<f1>::apply<int>::type t1;
|
||||
typedef quote5<f5>::apply<char,short,int,long,float>::type t5;
|
||||
|
||||
|
||||
MPL_ASSERT(( boost::is_same< t1, int > ));
|
||||
MPL_ASSERT(( boost::is_same< t5, f5<char,short,int,long,float> > ));
|
||||
}
|
||||
|
@@ -18,8 +18,8 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/front.hpp>
|
||||
#include <boost/mpl/back.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#include <boost/mpl/vector/vector10.hpp>
|
||||
#include <boost/mpl/equal.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
|
||||
MPL_TEST_CASE()
|
||||
|
@@ -23,7 +23,7 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/type_traits/is_float.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
#include <boost/mpl/list.hpp>
|
||||
#include <boost/mpl/equal.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#include <boost/mpl/greater.hpp>
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -19,7 +19,7 @@
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
#include <boost/mpl/at.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -12,9 +12,8 @@
|
||||
// $Revision$
|
||||
|
||||
#include <boost/mpl/same_as.hpp>
|
||||
|
||||
#include <boost/mpl/apply.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
16
test/set.cpp
16
test/set.cpp
@@ -29,10 +29,10 @@
|
||||
#include <boost/mpl/empty.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
// Use templates for testing so that GCC will show us the actual types involved
|
||||
|
||||
template< typename s >
|
||||
@@ -40,7 +40,7 @@ void empty_set_test()
|
||||
{
|
||||
MPL_ASSERT_RELATION( size<s>::value, ==, 0 );
|
||||
MPL_ASSERT(( empty<s> ));
|
||||
|
||||
|
||||
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME clear<s>::type, set0<> > ));
|
||||
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME at<s,int>::type, void_ > ));
|
||||
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME at<s,char>::type, void_ > ));
|
||||
@@ -56,7 +56,7 @@ void empty_set_test()
|
||||
MPL_ASSERT(( is_same< o1, void_ > ));
|
||||
MPL_ASSERT(( is_same< o2, void_ > ));
|
||||
MPL_ASSERT(( is_same< o3, void_ > ));
|
||||
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME begin<s>::type first;
|
||||
typedef BOOST_DEDUCED_TYPENAME end<s>::type last;
|
||||
|
||||
@@ -70,7 +70,7 @@ void int_set_test()
|
||||
{
|
||||
MPL_ASSERT_RELATION( size<s>::value, ==, 1 );
|
||||
MPL_ASSERT_NOT(( empty<s> ));
|
||||
|
||||
|
||||
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME clear<s>::type, set0<> > ));
|
||||
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME at<s,int>::type, int > ));
|
||||
MPL_ASSERT(( is_same< BOOST_DEDUCED_TYPENAME at<s,char>::type, void_ > ));
|
||||
@@ -86,7 +86,7 @@ void int_set_test()
|
||||
MPL_ASSERT_NOT(( is_same< o1, void_ > ));
|
||||
MPL_ASSERT(( is_same< o2, void_ > ));
|
||||
MPL_ASSERT(( is_same< o3, void_ > ));
|
||||
|
||||
|
||||
typedef BOOST_DEDUCED_TYPENAME begin<s>::type first;
|
||||
typedef BOOST_DEDUCED_TYPENAME end<s>::type last;
|
||||
|
||||
@@ -186,7 +186,7 @@ void basic_set_test()
|
||||
int_set_test< BOOST_DEDUCED_TYPENAME erase_key<
|
||||
BOOST_DEDUCED_TYPENAME erase_key<S3,char>::type
|
||||
, long
|
||||
>::type >();
|
||||
>::type >();
|
||||
|
||||
int_char_set_test<S2>();
|
||||
int_char_set_test< BOOST_DEDUCED_TYPENAME insert<
|
||||
@@ -206,7 +206,7 @@ void basic_set_test()
|
||||
, int
|
||||
>::type >();
|
||||
|
||||
int_char_long_set_test< BOOST_DEDUCED_TYPENAME insert<
|
||||
int_char_long_set_test< BOOST_DEDUCED_TYPENAME insert<
|
||||
BOOST_DEDUCED_TYPENAME insert<S1,long>::type
|
||||
, char
|
||||
>::type >();
|
||||
|
@@ -16,9 +16,8 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
namespace test { namespace {
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
@@ -70,7 +69,7 @@ MPL_TEST_CASE()
|
||||
typedef begin<s2>::type first2;
|
||||
typedef end<s2>::type last2;
|
||||
MPL_ASSERT_RELATION( (distance<first2, last2>::value), ==, 1 );
|
||||
|
||||
|
||||
typedef begin<s3>::type first3;
|
||||
typedef end<s3>::type last3;
|
||||
MPL_ASSERT_RELATION( (distance<first3, last3>::value), ==, 2 );
|
||||
@@ -97,7 +96,7 @@ MPL_TEST_CASE()
|
||||
MPL_ASSERT(( is_same< test::at_c<s1,'z'>::type, void_ > ));
|
||||
MPL_ASSERT(( is_same< test::at_c<s2,'k'>::type, void_ > ));
|
||||
#endif
|
||||
|
||||
|
||||
typedef begin<s1>::type first1;
|
||||
typedef end<s1>::type last1;
|
||||
MPL_ASSERT_RELATION( (distance<first1, last1>::value), ==, 1 );
|
||||
|
@@ -15,8 +15,8 @@
|
||||
#include <boost/mpl/advance.hpp>
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/begin_end.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -14,13 +14,13 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
|
||||
#include <boost/mpl/list.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
typedef list<> empty_list;
|
||||
typedef list<char,short,int,long> list;
|
||||
|
||||
|
||||
MPL_ASSERT_RELATION( size<empty_list>::value, ==, 0 );
|
||||
MPL_ASSERT_RELATION( size<list>::value, ==, 4 );
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@
|
||||
#include <boost/mpl/equal.hpp>
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -18,7 +18,7 @@
|
||||
#include <boost/mpl/equal.hpp>
|
||||
#include <boost/mpl/comparison.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
typedef vector_c<int,3,4,0,-5,8,-1,7>::type numbers;
|
||||
typedef vector_c<int,0,-5,-1>::type manual_first;
|
||||
|
@@ -19,13 +19,13 @@
|
||||
#include <boost/mpl/equal.hpp>
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
#include <boost/mpl/plus.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/mpl/aux_/config/gcc.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/add_pointer.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -16,7 +16,7 @@
|
||||
#include <boost/mpl/max_element.hpp>
|
||||
#include <boost/mpl/list.hpp>
|
||||
#include <boost/mpl/sizeof.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
|
||||
MPL_TEST_CASE()
|
||||
|
@@ -17,7 +17,7 @@
|
||||
#include <boost/mpl/equal.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -14,9 +14,10 @@
|
||||
#include <boost/mpl/unpack_args.hpp>
|
||||
|
||||
#include <boost/mpl/vector/vector10.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
MPL_ASSERT(( apply1<
|
||||
|
@@ -17,7 +17,7 @@
|
||||
#include <boost/mpl/list_c.hpp>
|
||||
#include <boost/mpl/less.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -23,10 +23,10 @@
|
||||
#include <boost/mpl/size.hpp>
|
||||
#include <boost/mpl/empty.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -15,10 +15,10 @@
|
||||
#include <boost/mpl/front.hpp>
|
||||
#include <boost/mpl/size.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
|
||||
#include "test.hpp"
|
||||
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <=1200)
|
||||
MPL_TEST_CASE()
|
||||
{
|
||||
|
@@ -23,9 +23,8 @@
|
||||
#include <boost/mpl/unpack_args.hpp>
|
||||
#include <boost/mpl/math/is_even.hpp>
|
||||
|
||||
#include <boost/mpl/aux_/test.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include "test.hpp"
|
||||
|
||||
|
||||
MPL_TEST_CASE()
|
||||
|
Reference in New Issue
Block a user