Use build time config to filter tests.

This commit is contained in:
Kohei Takahashi
2017-03-11 14:45:07 +09:00
parent 1ec001888d
commit 2952fd254f
5 changed files with 26 additions and 45 deletions

View File

@ -9,6 +9,7 @@
#==============================================================================
# bring in rules for testing
import testing ;
import ../../config/checks/config : requires ;
project
: requirements
@ -71,7 +72,8 @@ project
[ run sequence/convert_deque.cpp ]
[ run sequence/convert_list.cpp ]
[ run sequence/convert_std_pair.cpp ]
[ run sequence/convert_std_tuple.cpp ]
[ run sequence/convert_std_tuple.cpp : :
: [ requires cxx11_variadic_templates cxx11_hdr_tuple ] ]
[ run sequence/convert_vector.cpp ]
[ run sequence/filter_view.cpp ]
[ run sequence/hash.cpp ]
@ -123,7 +125,8 @@ project
[ run sequence/std_pair.cpp ]
[ run sequence/boost_array.cpp ]
[ run sequence/array.cpp ]
[ run sequence/std_array.cpp ]
[ run sequence/std_array.cpp : :
: [ requires cxx11_hdr_array ] ]
[ run sequence/tuple_comparison.cpp ]
[ run sequence/tuple_construction.cpp ]
[ run sequence/tuple_conversion.cpp ]
@ -210,8 +213,10 @@ project
[ run sequence/define_assoc_tpl_struct.cpp ]
[ run sequence/define_assoc_tpl_struct_empty.cpp ]
[ run sequence/define_assoc_tpl_struct_move.cpp ]
[ run sequence/std_tuple.cpp ]
[ run sequence/std_tuple_iterator.cpp ]
[ run sequence/std_tuple.cpp : :
: [ requires cxx11_variadic_templates cxx11_hdr_tuple ] ]
[ run sequence/std_tuple_iterator.cpp : :
: [ requires cxx11_variadic_templates cxx11_hdr_tuple ] ]
[ run sequence/ref_vector.cpp ]
[ run sequence/flatten_view.cpp ]

View File

@ -8,18 +8,13 @@
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#if defined(BOOST_NO_CXX11_HDR_TUPLE) || \
defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
# error "does not meet requirements"
#endif
#include <tuple>
#include <boost/fusion/include/std_tuple.hpp>
#define FUSION_SEQUENCE std::tuple
#include "convert.hpp"
#else
int main()
{
}
#endif

View File

@ -6,9 +6,10 @@
// at http://www.boost.org/LICENSE_1_0.txt)
//
#include <boost/config.hpp>
#ifdef BOOST_NO_CXX11_HDR_ARRAY
int main() {}
#else
# error "does not meet requirements"
#endif
#ifdef BOOST_MSVC
#pragma warning(disable:4180)
@ -46,4 +47,3 @@ int main()
return boost::report_errors();
}
#endif

View File

@ -8,8 +8,10 @@
#include <boost/config.hpp>
// adapted/std_tuple.hpp only supports implementations using variadic templates
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && \
!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#if defined(BOOST_NO_CXX11_HDR_TUPLE) || \
defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
# error "does not meet requirements"
#endif
#include <boost/detail/lightweight_test.hpp>
#include <boost/fusion/adapted/std_tuple.hpp>
@ -19,8 +21,7 @@
#include <tuple>
#include <string>
int
main()
int main()
{
using namespace boost::fusion;
using namespace boost;
@ -34,13 +35,3 @@ main()
return boost::report_errors();
}
#else
int
main()
{
return 0;
}
#endif

View File

@ -8,8 +8,10 @@
// The std_tuple_iterator adaptor only supports implementations
// using variadic templates
#if !defined(BOOST_NO_CXX11_HDR_TUPLE) && \
!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
#if defined(BOOST_NO_CXX11_HDR_TUPLE) || \
defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
# error "does not meet requirements"
#endif
#include <boost/fusion/adapted/std_tuple.hpp>
@ -17,20 +19,8 @@
#define FUSION_TRAVERSAL_TAG random_access_traversal_tag
#include "./iterator.hpp"
int
main()
int main()
{
test();
return boost::report_errors();
}
#else
int
main()
{
return 0;
}
#endif