Skip to content

Commit

Permalink
Fixing range tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hkaiser committed Jul 1, 2017
1 parent 6485c8c commit 889f962
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 4 deletions.
Expand Up @@ -191,6 +191,7 @@ void test_remove_copy_if()
IteratorTag());
#endif

#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_remove_copy_if_outiter(execution::seq, IteratorTag());
test_remove_copy_if_outiter(execution::par, IteratorTag());
test_remove_copy_if_outiter(execution::par_unseq, IteratorTag());
Expand All @@ -211,13 +212,16 @@ void test_remove_copy_if()
test_remove_copy_if_outiter(
execution_policy(execution::par(execution::task)), IteratorTag());
#endif
#endif
}

void remove_copy_if_test()
{
test_remove_copy_if<std::random_access_iterator_tag>();
test_remove_copy_if<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_remove_copy_if<std::input_iterator_tag>();
#endif
}

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -329,7 +333,9 @@ void remove_copy_if_exception_test()
{
test_remove_copy_if_exception<std::random_access_iterator_tag>();
test_remove_copy_if_exception<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_remove_copy_if_exception<std::input_iterator_tag>();
#endif
}

////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -440,7 +446,9 @@ void remove_copy_if_bad_alloc_test()
{
test_remove_copy_if_bad_alloc<std::random_access_iterator_tag>();
test_remove_copy_if_bad_alloc<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_remove_copy_if_bad_alloc<std::input_iterator_tag>();
#endif
}

int hpx_main(boost::program_options::variables_map& vm)
Expand Down
Expand Up @@ -176,6 +176,7 @@ void test_remove_copy()
IteratorTag());
#endif

#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
//assure output iterator will work
test_remove_copy_outiter(execution::seq, IteratorTag());
test_remove_copy_outiter(execution::par, IteratorTag());
Expand All @@ -196,13 +197,16 @@ void test_remove_copy()
test_remove_copy_outiter(execution_policy(execution::par(execution::task)),
IteratorTag());
#endif
#endif
}

void remove_copy_test()
{
test_remove_copy<std::random_access_iterator_tag>();
test_remove_copy<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_remove_copy<std::input_iterator_tag>();
#endif
}

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -313,7 +317,9 @@ void remove_copy_exception_test()
{
test_remove_copy_exception<std::random_access_iterator_tag>();
test_remove_copy_exception<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_remove_copy_exception<std::input_iterator_tag>();
#endif
}

//////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -422,7 +428,9 @@ void remove_copy_bad_alloc_test()
{
test_remove_copy_bad_alloc<std::random_access_iterator_tag>();
test_remove_copy_bad_alloc<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_remove_copy_bad_alloc<std::input_iterator_tag>();
#endif
}

int hpx_main(boost::program_options::variables_map& vm)
Expand Down
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2015 Hartmut Kaiser
// Copyright (c) 2014-2017 Hartmut Kaiser
//
// 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)
Expand Down Expand Up @@ -128,7 +128,9 @@ void replace_copy_if_test()
{
test_replace_copy_if<std::random_access_iterator_tag>();
test_replace_copy_if<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_replace_copy_if<std::input_iterator_tag>();
#endif
}

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -241,7 +243,9 @@ void replace_copy_if_exception_test()
{
test_replace_copy_if_exception<std::random_access_iterator_tag>();
test_replace_copy_if_exception<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_replace_copy_if_exception<std::input_iterator_tag>();
#endif
}

//////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -352,7 +356,9 @@ void replace_copy_if_bad_alloc_test()
{
test_replace_copy_if_bad_alloc<std::random_access_iterator_tag>();
test_replace_copy_if_bad_alloc<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_replace_copy_if_bad_alloc<std::input_iterator_tag>();
#endif
}

int hpx_main(boost::program_options::variables_map& vm)
Expand Down
Expand Up @@ -114,7 +114,9 @@ void replace_copy_test()
{
test_replace_copy<std::random_access_iterator_tag>();
test_replace_copy<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_replace_copy<std::input_iterator_tag>();
#endif
}

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -227,7 +229,9 @@ void replace_copy_exception_test()
{
test_replace_copy_exception<std::random_access_iterator_tag>();
test_replace_copy_exception<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_replace_copy_exception<std::input_iterator_tag>();
#endif
}

//////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -338,7 +342,9 @@ void replace_copy_bad_alloc_test()
{
test_replace_copy_bad_alloc<std::random_access_iterator_tag>();
test_replace_copy_bad_alloc<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_replace_copy_bad_alloc<std::input_iterator_tag>();
#endif
}

int hpx_main(boost::program_options::variables_map& vm)
Expand Down
8 changes: 7 additions & 1 deletion tests/unit/parallel/container_algorithms/transform_range.cpp
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2015 Hartmut Kaiser
// Copyright (c) 2014-2017 Hartmut Kaiser
//
// 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)
Expand Down Expand Up @@ -121,7 +121,9 @@ void transform_test()
{
test_transform<std::random_access_iterator_tag>();
test_transform<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_transform<std::input_iterator_tag>();
#endif
}

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -233,7 +235,9 @@ void transform_exception_test()
{
test_transform_exception<std::random_access_iterator_tag>();
test_transform_exception<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_transform_exception<std::input_iterator_tag>();
#endif
}

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -343,7 +347,9 @@ void transform_bad_alloc_test()
{
test_transform_bad_alloc<std::random_access_iterator_tag>();
test_transform_bad_alloc<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_transform_bad_alloc<std::input_iterator_tag>();
#endif
}

///////////////////////////////////////////////////////////////////////////////
Expand Down
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2015 Hartmut Kaiser
// Copyright (c) 2014-2017 Hartmut Kaiser
//
// 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)
Expand Down Expand Up @@ -137,7 +137,9 @@ void transform_binary_test()
{
test_transform_binary<std::random_access_iterator_tag>();
test_transform_binary<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_transform_binary<std::input_iterator_tag>();
#endif
}

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -257,7 +259,9 @@ void transform_binary_exception_test()
{
test_transform_binary_exception<std::random_access_iterator_tag>();
test_transform_binary_exception<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_transform_binary_exception<std::input_iterator_tag>();
#endif
}

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -375,7 +379,9 @@ void transform_binary_bad_alloc_test()
{
test_transform_binary_bad_alloc<std::random_access_iterator_tag>();
test_transform_binary_bad_alloc<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_transform_binary_bad_alloc<std::input_iterator_tag>();
#endif
}

///////////////////////////////////////////////////////////////////////////////
Expand Down
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2015 Hartmut Kaiser
// Copyright (c) 2014-2017 Hartmut Kaiser
//
// 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)
Expand Down Expand Up @@ -137,7 +137,9 @@ void transform_binary_test()
{
test_transform_binary<std::random_access_iterator_tag>();
test_transform_binary<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_transform_binary<std::input_iterator_tag>();
#endif
}

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -263,7 +265,9 @@ void transform_binary_exception_test()
{
test_transform_binary_exception<std::random_access_iterator_tag>();
test_transform_binary_exception<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_transform_binary_exception<std::input_iterator_tag>();
#endif
}

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -387,7 +391,9 @@ void transform_binary_bad_alloc_test()
{
test_transform_binary_bad_alloc<std::random_access_iterator_tag>();
test_transform_binary_bad_alloc<std::forward_iterator_tag>();
#if defined(HPX_HAVE_ALGORITHM_INPUT_ITERATOR_SUPPORT)
test_transform_binary_bad_alloc<std::input_iterator_tag>();
#endif
}

///////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 889f962

Please sign in to comment.