Fixed tests compilation.

This commit is contained in:
Andrey Semashev
2014-08-31 14:09:10 +04:00
parent 64f50f82aa
commit 9bbc806090
35 changed files with 59 additions and 44 deletions

View File

@@ -1,28 +0,0 @@
#ifndef BOOST_MPL_AUX_IS_SAME_HPP_INCLUDED
#define BOOST_MPL_AUX_IS_SAME_HPP_INCLUDED
// Copyright Andrey Semashev 2014
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/bool.hpp>
namespace boost { namespace mpl { namespace aux {
template< typename T, typename U >
struct is_same : mpl::false_ {};
template< typename T >
struct is_same< T, T > : mpl::true_ {};
}}}
#endif // BOOST_MPL_AUX_IS_SAME_HPP_INCLUDED

View File

@@ -17,7 +17,6 @@
#include <boost/mpl/aux_/test/test_case.hpp>
#include <boost/mpl/aux_/test/data.hpp>
#include <boost/mpl/aux_/test/assert.hpp>
#include <boost/mpl/aux_/is_same.hpp>
#include <boost/detail/lightweight_test.hpp>
int main()
@@ -27,6 +26,5 @@ int main()
using namespace boost;
using namespace mpl;
using boost::mpl::aux_::is_same;
#endif // BOOST_MPL_AUX_TEST_HPP_INCLUDED

View File

@@ -13,6 +13,7 @@
#include <boost/mpl/aux_/largest_int.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()

View File

@@ -13,6 +13,7 @@
#include <boost/mpl/bool.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
#include <cassert>

View File

@@ -14,6 +14,7 @@
#include <boost/mpl/apply.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()
{

View File

@@ -14,6 +14,7 @@
#include <boost/mpl/if.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()
{

View File

@@ -14,6 +14,7 @@
#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 <cassert>

View File

@@ -15,6 +15,7 @@
#include <boost/mpl/int.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()

View File

@@ -15,6 +15,8 @@
#include <boost/mpl/iterator_tags.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
template< int pos > struct iter
{
typedef mpl::bidirectional_iterator_tag category;

View File

@@ -17,6 +17,8 @@
#include <boost/mpl/int.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
template< typename T > struct std_vector
{

View File

@@ -16,6 +16,7 @@
#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>
#include <boost/preprocessor/comma_if.hpp>

View File

@@ -14,11 +14,12 @@
#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>
template< typename Seq, int n > struct at_test
{
typedef typename at_c<Seq,n>::type t;
MPL_ASSERT(( is_same< t, integral_c<int,9-n> > ));
MPL_ASSERT(( boost::is_same< t, integral_c<int,9-n> > ));
MPL_ASSERT_RELATION( t::value, ==, 9 - n );
};

View File

@@ -21,6 +21,7 @@
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_float.hpp>
#include <boost/type_traits/is_same.hpp>
namespace {

View File

@@ -23,6 +23,7 @@
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()
{
@@ -41,12 +42,12 @@ MPL_TEST_CASE()
MPL_ASSERT_NOT(( empty<d2> ));
MPL_ASSERT_NOT(( empty<d9> ));
MPL_ASSERT(( is_same< front<d1>::type,char > ));
MPL_ASSERT(( is_same< back<d1>::type,char > ));
MPL_ASSERT(( is_same< front<d2>::type,char > ));
MPL_ASSERT(( is_same< back<d2>::type,long > ));
MPL_ASSERT(( is_same< front<d9>::type,char > ));
MPL_ASSERT(( is_same< back<d9>::type,int > ));
MPL_ASSERT(( boost::is_same< front<d1>::type,char > ));
MPL_ASSERT(( boost::is_same< back<d1>::type,char > ));
MPL_ASSERT(( boost::is_same< front<d2>::type,char > ));
MPL_ASSERT(( boost::is_same< back<d2>::type,long > ));
MPL_ASSERT(( boost::is_same< front<d9>::type,char > ));
MPL_ASSERT(( boost::is_same< back<d9>::type,int > ));
}
@@ -58,9 +59,9 @@ MPL_TEST_CASE()
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<d2>::type > ));
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 > ));
}
MPL_TEST_CASE()
@@ -68,14 +69,14 @@ MPL_TEST_CASE()
typedef deque<> d0;
typedef push_back<d0,int>::type d1;
MPL_ASSERT(( is_same< back<d1>::type,int > ));
MPL_ASSERT(( boost::is_same< back<d1>::type,int > ));
typedef push_front<d1,char>::type d2;
MPL_ASSERT(( is_same< back<d2>::type,int > ));
MPL_ASSERT(( is_same< front<d2>::type,char > ));
MPL_ASSERT(( boost::is_same< back<d2>::type,int > ));
MPL_ASSERT(( boost::is_same< front<d2>::type,char > ));
typedef push_back<d2,long>::type d3;
MPL_ASSERT(( is_same< back<d3>::type,long > ));
MPL_ASSERT(( boost::is_same< back<d3>::type,long > ));
}
MPL_TEST_CASE()

View File

@@ -20,6 +20,8 @@
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()
{
typedef list<int,char,long,short,char,long,double,long> types;

View File

@@ -17,6 +17,7 @@
#include <boost/mpl/size.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()
{

View File

@@ -18,6 +18,7 @@
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/int.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()
{

View File

@@ -13,6 +13,7 @@
#include <boost/mpl/inherit.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
struct her { typedef her herself; };
struct my { typedef my myself; };

View File

@@ -19,6 +19,8 @@
#include <boost/mpl/size.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()
{

View File

@@ -17,6 +17,8 @@
#include <boost/mpl/aux_/config/gcc.hpp>
#include <boost/mpl/aux_/config/workaround.hpp>
#include <boost/type_traits/is_same.hpp>
typedef int UDT::* mem_ptr;
typedef int (UDT::* mem_fun_ptr)();

View File

@@ -20,6 +20,8 @@
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()
{

View File

@@ -18,6 +18,8 @@
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
#if !BOOST_WORKAROUND(BOOST_MSVC,<= 1200)
MPL_TEST_CASE()

View File

@@ -23,6 +23,7 @@
#include <boost/mpl/find.hpp>
#include <boost/config.hpp>
#include <boost/type_traits/is_same.hpp>
/*
struct test_data1

View File

@@ -15,6 +15,7 @@
#include <boost/mpl/prior.hpp>
#include <boost/mpl/int.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()
{

View File

@@ -17,6 +17,7 @@
#include <boost/mpl/range_c.hpp>
#include <boost/mpl/distance.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()

View File

@@ -16,6 +16,7 @@
#include <boost/mpl/size.hpp>
#include <boost/mpl/front.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()
{

View File

@@ -15,6 +15,8 @@
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
struct no_push_back_tag {};
struct no_push_back

View File

@@ -20,6 +20,8 @@
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
struct no_push_front_tag {};
struct no_push_front

View File

@@ -19,6 +19,7 @@
#include <boost/mpl/front.hpp>
#include <boost/mpl/back.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()
{

View File

@@ -31,6 +31,7 @@
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
// Use templates for testing so that GCC will show us the actual types involved

View File

@@ -18,6 +18,8 @@
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
namespace test { namespace {
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
template< typename S, typename S::value_type k >

View File

@@ -16,6 +16,7 @@
#include <boost/mpl/size.hpp>
#include <boost/mpl/begin_end.hpp>
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()
{

View File

@@ -23,6 +23,7 @@
#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>

View File

@@ -25,6 +25,8 @@
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
MPL_TEST_CASE()
{

View File

@@ -17,6 +17,8 @@
#include <boost/mpl/aux_/test.hpp>
#include <boost/type_traits/is_same.hpp>
#if !BOOST_WORKAROUND(BOOST_MSVC, <=1200)
MPL_TEST_CASE()
{