summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pstl/CMakeLists.txt4
-rw-r--r--pstl/include/pstl/internal/parallel_backend_utils.h1
-rw-r--r--pstl/test/CMakeLists.txt5
-rw-r--r--pstl/test/std/algorithms/alg.merge/inplace_merge.pass.cpp (renamed from pstl/test/test_inplace_merge.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.merge/merge.pass.cpp (renamed from pstl/test/test_merge.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp (renamed from pstl/test/test_copy_if.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp (renamed from pstl/test/test_is_partitioned.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp (renamed from pstl/test/test_partition.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp (renamed from pstl/test/test_partition_copy.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp (renamed from pstl/test/test_reverse.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp (renamed from pstl/test/test_reverse_copy.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/copy_move.pass.cpp (renamed from pstl/test/test_copy_move.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/fill.pass.cpp (renamed from pstl/test/test_fill.cpp)13
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/generate.pass.cpp (renamed from pstl/test/test_generate.cpp)13
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/remove.pass.cpp (renamed from pstl/test/test_remove.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/remove_copy.pass.cpp (renamed from pstl/test/test_remove_copy.cpp)13
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp (renamed from pstl/test/test_replace.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/replace_copy.pass.cpp (renamed from pstl/test/test_replace_copy.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/rotate.pass.cpp (renamed from pstl/test/test_rotate.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/rotate_copy.pass.cpp (renamed from pstl/test/test_rotate_copy.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/swap_ranges.pass.cpp (renamed from pstl/test/test_swap_ranges.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/transform_binary.pass.cpp (renamed from pstl/test/test_transform_binary.cpp)14
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/transform_unary.pass.cpp (renamed from pstl/test/test_transform_unary.cpp)14
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/unique.pass.cpp (renamed from pstl/test/test_unique.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.modifying.operations/unique_copy_equal.pass.cpp (renamed from pstl/test/test_unique_copy_equal.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp (renamed from pstl/test/test_adjacent_find.cpp)13
-rw-r--r--pstl/test/std/algorithms/alg.nonmodifying/all_of.pass.cpp (renamed from pstl/test/test_all_of.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.nonmodifying/any_of.pass.cpp (renamed from pstl/test/test_any_of.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.nonmodifying/count.pass.cpp (renamed from pstl/test/test_count.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp (renamed from pstl/test/test_equal.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.nonmodifying/find.pass.cpp (renamed from pstl/test/test_find.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp (renamed from pstl/test/test_find_end.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.nonmodifying/find_first_of.pass.cpp (renamed from pstl/test/test_find_first_of.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.nonmodifying/find_if.pass.cpp (renamed from pstl/test/test_find_if.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.nonmodifying/for_each.pass.cpp (renamed from pstl/test/test_for_each.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.nonmodifying/mismatch.pass.cpp (renamed from pstl/test/test_mismatch.cpp)13
-rw-r--r--pstl/test/std/algorithms/alg.nonmodifying/none_of.pass.cpp (renamed from pstl/test/test_none_of.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.nonmodifying/nth_element.pass.cpp (renamed from pstl/test/test_nth_element.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp (renamed from pstl/test/test_search_n.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.sorting/alg.heap.operations/is_heap.pass.cpp (renamed from pstl/test/test_is_heap.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp (renamed from pstl/test/test_lexicographical_compare.cpp)14
-rw-r--r--pstl/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp (renamed from pstl/test/test_minmax_element.cpp)13
-rw-r--r--pstl/test/std/algorithms/alg.sorting/alg.set.operations/includes.pass.cpp (renamed from pstl/test/test_includes.cpp)13
-rw-r--r--pstl/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp (renamed from pstl/test/test_set.cpp)13
-rw-r--r--pstl/test/std/algorithms/alg.sorting/is_sorted.pass.cpp (renamed from pstl/test/test_is_sorted.cpp)13
-rw-r--r--pstl/test/std/algorithms/alg.sorting/partial_sort.pass.cpp (renamed from pstl/test/test_partial_sort.cpp)13
-rw-r--r--pstl/test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp (renamed from pstl/test/test_partial_sort_copy.cpp)12
-rw-r--r--pstl/test/std/algorithms/alg.sorting/sort.pass.cpp (renamed from pstl/test/test_sort.cpp)13
-rw-r--r--pstl/test/std/numerics/numeric.ops/adjacent_difference.pass.cpp (renamed from pstl/test/test_adjacent_difference.cpp)12
-rw-r--r--pstl/test/std/numerics/numeric.ops/reduce.pass.cpp (renamed from pstl/test/test_reduce.cpp)12
-rw-r--r--pstl/test/std/numerics/numeric.ops/scan.pass.cpp (renamed from pstl/test/test_scan.cpp)13
-rw-r--r--pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp (renamed from pstl/test/test_transform_reduce.cpp)13
-rw-r--r--pstl/test/std/numerics/numeric.ops/transform_scan.pass.cpp (renamed from pstl/test/test_transform_scan.cpp)13
-rw-r--r--pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_construct.pass.cpp (renamed from pstl/test/test_uninitialized_construct.cpp)12
-rw-r--r--pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_copy_move.pass.cpp (renamed from pstl/test/test_uninitialized_copy_move.cpp)12
-rw-r--r--pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_fill_destroy.pass.cpp (renamed from pstl/test/test_uninitialized_fill_destroy.cpp)13
-rw-r--r--pstl/test/support/pstl_test_config.h (renamed from pstl/test/pstl_test_config.h)0
-rw-r--r--pstl/test/support/utils.h (renamed from pstl/test/utils.h)0
58 files changed, 506 insertions, 161 deletions
diff --git a/pstl/CMakeLists.txt b/pstl/CMakeLists.txt
index 47fcab251e9..bbfac3641f0 100644
--- a/pstl/CMakeLists.txt
+++ b/pstl/CMakeLists.txt
@@ -31,11 +31,13 @@ add_library(ParallelSTL INTERFACE)
add_library(pstl::ParallelSTL ALIAS ParallelSTL)
if (PARALLELSTL_USE_PARALLEL_POLICIES)
+ message(STATUS "Using Parallel Policies")
if (PARALLELSTL_BACKEND STREQUAL "tbb")
find_package(TBB 2018 REQUIRED tbb OPTIONAL_COMPONENTS tbbmalloc)
message(STATUS "Parallel STL uses TBB ${TBB_VERSION} (interface version: ${TBB_INTERFACE_VERSION})")
target_link_libraries(ParallelSTL INTERFACE TBB::tbb)
- else()
+ else()
+ message(STATUS "Using Parallel Policies, but not tbb")
if (TARGET ${PARALLELSTL_BACKEND})
target_link_libraries(ParallelSTL INTERFACE ${PARALLELSTL_BACKEND})
else()
diff --git a/pstl/include/pstl/internal/parallel_backend_utils.h b/pstl/include/pstl/internal/parallel_backend_utils.h
index dd9cabc45e2..1d4f14b7776 100644
--- a/pstl/include/pstl/internal/parallel_backend_utils.h
+++ b/pstl/include/pstl/internal/parallel_backend_utils.h
@@ -12,6 +12,7 @@
#include <iterator>
#include <utility>
+#include <cassert>
#include "utils.h"
namespace __pstl
diff --git a/pstl/test/CMakeLists.txt b/pstl/test/CMakeLists.txt
index 1b8638a3a4f..33814977495 100644
--- a/pstl/test/CMakeLists.txt
+++ b/pstl/test/CMakeLists.txt
@@ -18,14 +18,17 @@ add_custom_target(check-pstl
DEPENDS pstl-build-tests
COMMENT "Build and run all the unit tests.")
-file(GLOB_RECURSE UNIT_TESTS "test_*.cpp")
+file(GLOB_RECURSE UNIT_TESTS "*.pass.cpp")
foreach(_file IN LISTS UNIT_TESTS)
file(RELATIVE_PATH _target "${CMAKE_CURRENT_SOURCE_DIR}" "${_file}")
string(REPLACE ".cpp" "" _target "${_target}")
+ string(REPLACE "/" "-" _target "${_target}")
set(_target "pstl-${_target}")
add_executable(${_target} EXCLUDE_FROM_ALL "${_file}")
+ target_include_directories(${_target} PRIVATE "${CMAKE_CURRENT_LIST_DIR}")
target_link_libraries(${_target} PRIVATE pstl::ParallelSTL)
+ target_compile_definitions(${_target} PRIVATE -DPSTL_STANDALONE_TESTS)
set_target_properties(${_target} PROPERTIES CXX_EXTENSIONS NO
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
add_test(${_target} "${CMAKE_CURRENT_BINARY_DIR}/${_target}")
diff --git a/pstl/test/test_inplace_merge.cpp b/pstl/test/std/algorithms/alg.merge/inplace_merge.pass.cpp
index 8bf79f50f35..6e89ab82eff 100644
--- a/pstl/test/test_inplace_merge.cpp
+++ b/pstl/test/std/algorithms/alg.merge/inplace_merge.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_inplace_merge.cpp --------------------------------------------===//
+//===-- inplace_merge.pass.cpp --------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,13 +7,19 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include <algorithm>
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_merge.cpp b/pstl/test/std/algorithms/alg.merge/merge.pass.cpp
index 6b2ed4bf0c4..a80bbae07f8 100644
--- a/pstl/test/test_merge.cpp
+++ b/pstl/test/std/algorithms/alg.merge/merge.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_merge.cpp ----------------------------------------------------===//
+//===-- merge.pass.cpp ----------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,14 +7,20 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include <algorithm>
#include <functional>
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_copy_if.cpp b/pstl/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp
index dba6f234d38..5e6ea34ed80 100644
--- a/pstl/test/test_copy_if.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_copy_if.cpp --------------------------------------------------===//
+//===-- copy_if.pass.cpp --------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -8,11 +8,17 @@
//===----------------------------------------------------------------------===//
// Tests for copy_if and remove_copy_if
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_is_partitioned.cpp b/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp
index a80a3319713..5d665d25516 100644
--- a/pstl/test/test_is_partitioned.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_is_partitioned.cpp -------------------------------------------===//
+//===-- is_partitioned.pass.cpp -------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,17 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_partition.cpp b/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp
index ad5d9920cb8..b79a27a44a0 100644
--- a/pstl/test/test_partition.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_partition.cpp ------------------------------------------------===//
+//===-- partition.pass.cpp ------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -8,11 +8,17 @@
//===----------------------------------------------------------------------===//
// Tests for stable_partition and partition
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
#include <iterator>
#include <type_traits>
diff --git a/pstl/test/test_partition_copy.cpp b/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp
index 163540622d8..c27e51ca798 100644
--- a/pstl/test/test_partition_copy.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_partition_copy.cpp -------------------------------------------===//
+//===-- partition_copy.pass.cpp -------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -8,11 +8,17 @@
//===----------------------------------------------------------------------===//
// Tests for stable_partition and partition_copy
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
#include <cstdlib>
#include <iterator>
diff --git a/pstl/test/test_reverse.cpp b/pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp
index 48420301379..ad722df3a83 100644
--- a/pstl/test/test_reverse.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_reverse.cpp --------------------------------------------------===//
+//===-- reverse.pass.cpp --------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,13 +7,19 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include <iterator>
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_reverse_copy.cpp b/pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp
index 1378a9505c9..d26f41f175d 100644
--- a/pstl/test/test_reverse_copy.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_reverse_copy.cpp ---------------------------------------------===//
+//===-- reverse_copy.pass.cpp ---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,13 +7,19 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include <iterator>
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_copy_move.cpp b/pstl/test/std/algorithms/alg.modifying.operations/copy_move.pass.cpp
index 7fdf549b4ff..89de3f92c9e 100644
--- a/pstl/test/test_copy_move.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/copy_move.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_copy_move.cpp ------------------------------------------------===//
+//===-- copy_move.pass.cpp ------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -9,11 +9,17 @@
// Tests for copy, move and copy_n
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_fill.cpp b/pstl/test/std/algorithms/alg.modifying.operations/fill.pass.cpp
index 64f411b1937..19bc150b31b 100644
--- a/pstl/test/test_fill.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/fill.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_fill.cpp -----------------------------------------------------===//
+//===-- fill.pass.cpp -----------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,18 @@
//
//===----------------------------------------------------------------------===//
-// Tests for fill/fill_n
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_generate.cpp b/pstl/test/std/algorithms/alg.modifying.operations/generate.pass.cpp
index 4a88ee919e3..9862f14ba62 100644
--- a/pstl/test/test_generate.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/generate.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_generate.cpp -------------------------------------------------===//
+//===-- generate.pass.cpp -------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,12 +7,19 @@
//
//===----------------------------------------------------------------------===//
-// Tests for generate
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include <atomic>
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_remove.cpp b/pstl/test/std/algorithms/alg.modifying.operations/remove.pass.cpp
index ee08df1af28..82b986bcfbf 100644
--- a/pstl/test/test_remove.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/remove.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_remove.cpp ---------------------------------------------------===//
+//===-- remove.pass.cpp ---------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -8,11 +8,17 @@
//===----------------------------------------------------------------------===//
// Test for remove, remove_if
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_remove_copy.cpp b/pstl/test/std/algorithms/alg.modifying.operations/remove_copy.pass.cpp
index 2d62c1a75dd..0437292af4f 100644
--- a/pstl/test/test_remove_copy.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/remove_copy.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_remove_copy.cpp ----------------------------------------------===//
+//===-- remove_copy.pass.cpp ----------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,18 @@
//
//===----------------------------------------------------------------------===//
-// Tests for remove_copy
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_replace.cpp b/pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp
index 293de5a2f8b..5aeaac88812 100644
--- a/pstl/test/test_replace.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_replace.cpp --------------------------------------------------===//
+//===-- replace.pass.cpp --------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,17 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_replace_copy.cpp b/pstl/test/std/algorithms/alg.modifying.operations/replace_copy.pass.cpp
index 1c8942212c4..7ebbf4c0c7f 100644
--- a/pstl/test/test_replace_copy.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/replace_copy.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_replace_copy.cpp ---------------------------------------------===//
+//===-- replace_copy.pass.cpp ---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -9,11 +9,17 @@
// Tests for replace_copy and replace_copy_if
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_rotate.cpp b/pstl/test/std/algorithms/alg.modifying.operations/rotate.pass.cpp
index 5619bca7571..2bebc4e57da 100644
--- a/pstl/test/test_rotate.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/rotate.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_rotate.cpp ---------------------------------------------------===//
+//===-- rotate.pass.cpp ---------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,13 +7,19 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include <iterator>
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_rotate_copy.cpp b/pstl/test/std/algorithms/alg.modifying.operations/rotate_copy.pass.cpp
index aa800d2d104..7d0ec7ec450 100644
--- a/pstl/test/test_rotate_copy.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/rotate_copy.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_rotate_copy.cpp ----------------------------------------------===//
+//===-- rotate_copy.pass.cpp ----------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,13 +7,19 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include <iterator>
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_swap_ranges.cpp b/pstl/test/std/algorithms/alg.modifying.operations/swap_ranges.pass.cpp
index 5be0614ce0c..b53003c4626 100644
--- a/pstl/test/test_swap_ranges.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/swap_ranges.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_swap_ranges.cpp ----------------------------------------------===//
+//===-- swap_ranges.pass.cpp ----------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,13 +7,19 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include <iterator>
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_transform_binary.cpp b/pstl/test/std/algorithms/alg.modifying.operations/transform_binary.pass.cpp
index 4f5f4d230fa..2d680c369f2 100644
--- a/pstl/test/test_transform_binary.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/transform_binary.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_transform_binary.cpp -----------------------------------------===//
+//===-- transform_binary.pass.cpp -----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,9 +7,17 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl/execution"
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/algorithm"
-#include "utils.h"
+#include "pstl/execution"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_transform_unary.cpp b/pstl/test/std/algorithms/alg.modifying.operations/transform_unary.pass.cpp
index 0389aa63962..e198c6e2a8b 100644
--- a/pstl/test/test_transform_unary.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/transform_unary.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_transform_unary.cpp ------------------------------------------===//
+//===-- transform_unary.pass.cpp ------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,9 +7,17 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl/execution"
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/algorithm"
-#include "utils.h"
+#include "pstl/execution"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_unique.cpp b/pstl/test/std/algorithms/alg.modifying.operations/unique.pass.cpp
index ee34ebd13d2..06639ccf685 100644
--- a/pstl/test/test_unique.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/unique.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_unique.cpp ---------------------------------------------------===//
+//===-- unique.pass.cpp ---------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -8,11 +8,17 @@
//===----------------------------------------------------------------------===//
// Test for unique
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_unique_copy_equal.cpp b/pstl/test/std/algorithms/alg.modifying.operations/unique_copy_equal.pass.cpp
index 392f8db5e9a..c948e80d45a 100644
--- a/pstl/test/test_unique_copy_equal.cpp
+++ b/pstl/test/std/algorithms/alg.modifying.operations/unique_copy_equal.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_unique_copy_equal.cpp ----------------------------------------===//
+//===-- unique_copy_equal.pass.cpp ----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -8,11 +8,17 @@
//===----------------------------------------------------------------------===//
// Tests for unique_copy
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_adjacent_find.cpp b/pstl/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp
index 39440148c46..50b01e38bc1 100644
--- a/pstl/test/test_adjacent_find.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_adjacent_find.cpp --------------------------------------------===//
+//===-- adjacent_find.pass.cpp --------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,18 @@
//
//===----------------------------------------------------------------------===//
-// Tests for adjacent_find
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_all_of.cpp b/pstl/test/std/algorithms/alg.nonmodifying/all_of.pass.cpp
index 1de6e03fb11..f6372c44bd5 100644
--- a/pstl/test/test_all_of.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/all_of.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_all_of.cpp ---------------------------------------------------===//
+//===-- all_of.pass.cpp ---------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,17 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
/*
TODO: consider implementing the following tests for a better code coverage
diff --git a/pstl/test/test_any_of.cpp b/pstl/test/std/algorithms/alg.nonmodifying/any_of.pass.cpp
index 05090786782..70bd4b2fb3b 100644
--- a/pstl/test/test_any_of.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/any_of.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_any_of.cpp ---------------------------------------------------===//
+//===-- any_of.pass.cpp ---------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,17 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
/*
TODO: consider implementing the following tests for a better code coverage
diff --git a/pstl/test/test_count.cpp b/pstl/test/std/algorithms/alg.nonmodifying/count.pass.cpp
index c6a7d21a5c2..38c553762f3 100644
--- a/pstl/test/test_count.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/count.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_count.cpp ----------------------------------------------------===//
+//===-- count.pass.cpp ----------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -8,11 +8,17 @@
//===----------------------------------------------------------------------===//
// Tests for count and count_if
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_equal.cpp b/pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp
index 5cb52ba3f43..0e4f38c2eb7 100644
--- a/pstl/test/test_equal.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_equal.cpp ----------------------------------------------------===//
+//===-- equal.pass.cpp ----------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,17 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_find.cpp b/pstl/test/std/algorithms/alg.nonmodifying/find.pass.cpp
index 956b099b68e..60e56ae4628 100644
--- a/pstl/test/test_find.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/find.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_find.cpp -----------------------------------------------------===//
+//===-- find.pass.cpp -----------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -8,11 +8,17 @@
//===----------------------------------------------------------------------===//
// Tests for find
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_find_end.cpp b/pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp
index 0a5a44bb0ae..4059630b3d1 100644
--- a/pstl/test/test_find_end.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_find_end.cpp -------------------------------------------------===//
+//===-- find_end.pass.cpp -------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,17 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_find_first_of.cpp b/pstl/test/std/algorithms/alg.nonmodifying/find_first_of.pass.cpp
index 8cdb30840be..ee62e84fd16 100644
--- a/pstl/test/test_find_first_of.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/find_first_of.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_find_first_of.cpp --------------------------------------------===//
+//===-- find_first_of.pass.cpp --------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,17 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_find_if.cpp b/pstl/test/std/algorithms/alg.nonmodifying/find_if.pass.cpp
index 914ebc2ac0b..2ea8765077f 100644
--- a/pstl/test/test_find_if.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/find_if.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_find_if.cpp --------------------------------------------------===//
+//===-- find_if.pass.cpp --------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -8,11 +8,17 @@
//===----------------------------------------------------------------------===//
// Tests for find_if and find_if_not
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_for_each.cpp b/pstl/test/std/algorithms/alg.nonmodifying/for_each.pass.cpp
index 0d89cc20435..cb0fa06dcda 100644
--- a/pstl/test/test_for_each.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/for_each.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_for_each.cpp -------------------------------------------------===//
+//===-- for_each.pass.cpp -------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,9 +7,17 @@
//
//===----------------------------------------------------------------------===//
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_mismatch.cpp b/pstl/test/std/algorithms/alg.nonmodifying/mismatch.pass.cpp
index 5d5c9e877d4..ec34af08fb0 100644
--- a/pstl/test/test_mismatch.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/mismatch.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_mismatch.cpp -------------------------------------------------===//
+//===-- mismatch.pass.cpp -------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,14 +7,21 @@
//
//===----------------------------------------------------------------------===//
-// Tests for the rest algorithms; temporary approach to check compiling
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
#include "pstl/numeric"
#include "pstl/memory"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_none_of.cpp b/pstl/test/std/algorithms/alg.nonmodifying/none_of.pass.cpp
index 43f0da63b69..47a01a15027 100644
--- a/pstl/test/test_none_of.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/none_of.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_none_of.cpp --------------------------------------------------===//
+//===-- none_of.pass.cpp --------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,17 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
/*
TODO: consider implementing the following tests for a better code coverage
diff --git a/pstl/test/test_nth_element.cpp b/pstl/test/std/algorithms/alg.nonmodifying/nth_element.pass.cpp
index eb7b72622da..f8154d2426d 100644
--- a/pstl/test/test_nth_element.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/nth_element.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_nth_element.cpp ----------------------------------------------===//
+//===-- nth_element.pass.cpp ----------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,14 +7,20 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include <algorithm>
#include <iostream>
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_search_n.cpp b/pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp
index 16033678568..c0c6040e176 100644
--- a/pstl/test/test_search_n.cpp
+++ b/pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_search_n.cpp -------------------------------------------------===//
+//===-- search_n.pass.cpp -------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,17 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_is_heap.cpp b/pstl/test/std/algorithms/alg.sorting/alg.heap.operations/is_heap.pass.cpp
index dacdd872792..0c70342426e 100644
--- a/pstl/test/test_is_heap.cpp
+++ b/pstl/test/std/algorithms/alg.sorting/alg.heap.operations/is_heap.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_is_heap.cpp --------------------------------------------------===//
+//===-- is_heap.pass.cpp --------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -8,11 +8,17 @@
//===----------------------------------------------------------------------===//
// Tests for is_heap, is_heap_until
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
#include <iostream>
using namespace TestUtils;
diff --git a/pstl/test/test_lexicographical_compare.cpp b/pstl/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp
index 3a98808bdda..236e34290ae 100644
--- a/pstl/test/test_lexicographical_compare.cpp
+++ b/pstl/test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_lexicographical_compare.cpp ----------------------------------===//
+//===-- lexicographical_compare.pass.cpp ----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,13 +7,19 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
-#include <string>
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include <iostream>
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_minmax_element.cpp b/pstl/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp
index 8b7cb517cfc..e3fec868375 100644
--- a/pstl/test/test_minmax_element.cpp
+++ b/pstl/test/std/algorithms/alg.sorting/alg.min.max/minmax_element.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_minmax_element.cpp -------------------------------------------===//
+//===-- minmax_element.pass.cpp -------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,18 @@
//
//===----------------------------------------------------------------------===//
-// Tests for min_element, max_element, minmax_element
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
#include <set>
#include <cassert>
diff --git a/pstl/test/test_includes.cpp b/pstl/test/std/algorithms/alg.sorting/alg.set.operations/includes.pass.cpp
index 5a2b51e885e..b18bb5f69f0 100644
--- a/pstl/test/test_includes.cpp
+++ b/pstl/test/std/algorithms/alg.sorting/alg.set.operations/includes.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_includes.cpp -------------------------------------------------===//
+//===-- includes.pass.cpp -------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,13 +7,20 @@
//
//===----------------------------------------------------------------------===//
-// Tests for partial_sort
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include <cmath>
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_set.cpp b/pstl/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp
index 0e59ef232d4..33b7542d4fa 100644
--- a/pstl/test/test_set.cpp
+++ b/pstl/test/std/algorithms/alg.sorting/alg.set.operations/set.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_set.cpp ------------------------------------------------------===//
+//===-- set.pass.cpp ------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,14 +7,21 @@
//
//===----------------------------------------------------------------------===//
-// Tests for partial_sort
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include <cmath>
#include <chrono>
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_is_sorted.cpp b/pstl/test/std/algorithms/alg.sorting/is_sorted.pass.cpp
index a269458438e..a5219f79669 100644
--- a/pstl/test/test_is_sorted.cpp
+++ b/pstl/test/std/algorithms/alg.sorting/is_sorted.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_is_sorted.cpp ------------------------------------------------===//
+//===-- is_sorted.pass.cpp ------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,18 @@
//
//===----------------------------------------------------------------------===//
-// Tests for is_sorted, is_sorted_until
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_partial_sort.cpp b/pstl/test/std/algorithms/alg.sorting/partial_sort.pass.cpp
index 1c28b09d714..6e9d7d21d66 100644
--- a/pstl/test/test_partial_sort.cpp
+++ b/pstl/test/std/algorithms/alg.sorting/partial_sort.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_partial_sort.cpp ---------------------------------------------===//
+//===-- partial_sort.pass.cpp ---------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,13 +7,20 @@
//
//===----------------------------------------------------------------------===//
-// Tests for partial_sort
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include <cmath>
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_partial_sort_copy.cpp b/pstl/test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp
index 11d4721f79f..8f132022c64 100644
--- a/pstl/test/test_partial_sort_copy.cpp
+++ b/pstl/test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_partial_sort_copy.cpp ----------------------------------------===//
+//===-- partial_sort_copy.pass.cpp ----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -10,11 +10,17 @@
// Tests for partial_sort_copy
#include <cmath>
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_sort.cpp b/pstl/test/std/algorithms/alg.sorting/sort.pass.cpp
index 17cae92bafb..e2eb9cecd2d 100644
--- a/pstl/test/test_sort.cpp
+++ b/pstl/test/std/algorithms/alg.sorting/sort.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_sort.cpp -----------------------------------------------------===//
+//===-- sort.pass.cpp -----------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,18 @@
//
//===----------------------------------------------------------------------===//
-// Tests for sort and stable_sort
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
#define _CRT_SECURE_NO_WARNINGS
diff --git a/pstl/test/test_adjacent_difference.cpp b/pstl/test/std/numerics/numeric.ops/adjacent_difference.pass.cpp
index e95f9d19484..83809916029 100644
--- a/pstl/test/test_adjacent_difference.cpp
+++ b/pstl/test/std/numerics/numeric.ops/adjacent_difference.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_adjacent_difference.cpp --------------------------------------===//
+//===-- adjacent_difference.pass.cpp --------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,14 +7,20 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include <iterator>
#include "pstl/execution"
#include "pstl/algorithm"
#include "pstl/numeric"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_reduce.cpp b/pstl/test/std/numerics/numeric.ops/reduce.pass.cpp
index ad8872a0a56..cd851aa0c1b 100644
--- a/pstl/test/test_reduce.cpp
+++ b/pstl/test/std/numerics/numeric.ops/reduce.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_reduce.cpp ---------------------------------------------------===//
+//===-- reduce.pass.cpp ---------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,17 @@
//
//===----------------------------------------------------------------------===//
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/numeric"
-#include "utils.h"
+#else
+#include <execution>
+#include <numeric>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_scan.cpp b/pstl/test/std/numerics/numeric.ops/scan.pass.cpp
index 9193d932333..e7283ee9ad5 100644
--- a/pstl/test/test_scan.cpp
+++ b/pstl/test/std/numerics/numeric.ops/scan.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_scan.cpp -----------------------------------------------------===//
+//===-- scan.pass.cpp -----------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,10 +7,17 @@
//
//===----------------------------------------------------------------------===//
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/numeric"
-#include "utils.h"
-#include "pstl_test_config.h"
+#else
+#include <execution>
+#include <numeric>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_transform_reduce.cpp b/pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp
index a1ec7a3ddd5..792190a9724 100644
--- a/pstl/test/test_transform_reduce.cpp
+++ b/pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_transform_reduce.cpp -----------------------------------------===//
+//===-- transform_reduce.pass.cpp -----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,11 +7,18 @@
//
//===----------------------------------------------------------------------===//
-// Tests for inner_product
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/numeric"
-#include "utils.h"
+#else
+#include <execution>
+#include <numeric>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_transform_scan.cpp b/pstl/test/std/numerics/numeric.ops/transform_scan.pass.cpp
index 00144371170..4934f7e5ca9 100644
--- a/pstl/test/test_transform_scan.cpp
+++ b/pstl/test/std/numerics/numeric.ops/transform_scan.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_transform_scan.cpp -------------------------------------------===//
+//===-- transform_scan.pass.cpp -------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,10 +7,17 @@
//
//===----------------------------------------------------------------------===//
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/numeric"
-#include "utils.h"
-#include "pstl_test_config.h"
+#else
+#include <execution>
+#include <numeric>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_uninitialized_construct.cpp b/pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_construct.pass.cpp
index 88873a384ae..ee5f309c5f4 100644
--- a/pstl/test/test_uninitialized_construct.cpp
+++ b/pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_construct.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_uninitialized_construct.cpp ----------------------------------===//
+//===-- uninitialized_construct.pass.cpp ----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -10,11 +10,17 @@
// Tests for uninitialized_default_construct, uninitialized_default_construct_n,
// uninitialized_value_construct, uninitialized_value_construct_n
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/memory"
-#include "utils.h"
+#else
+#include <execution>
+#include <memory>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_uninitialized_copy_move.cpp b/pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_copy_move.pass.cpp
index 4306511e766..f98377703aa 100644
--- a/pstl/test/test_uninitialized_copy_move.cpp
+++ b/pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_copy_move.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_uninitialized_copy_move.cpp ----------------------------------===//
+//===-- uninitialized_copy_move.pass.cpp ----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -9,11 +9,17 @@
// Tests for uninitialized_copy, uninitialized_copy_n, uninitialized_move, uninitialized_move_n
-#include "pstl_test_config.h"
+#include "support/pstl_test_config.h"
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/memory"
-#include "utils.h"
+#else
+#include <execution>
+#include <memory>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/test_uninitialized_fill_destroy.cpp b/pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_fill_destroy.pass.cpp
index d1cfa10d286..12301f014e1 100644
--- a/pstl/test/test_uninitialized_fill_destroy.cpp
+++ b/pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_fill_destroy.pass.cpp
@@ -1,5 +1,5 @@
// -*- C++ -*-
-//===-- test_uninitialized_fill_destroy.cpp -------------------------------===//
+//===-- uninitialized_fill_destroy.pass.cpp -------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,12 +7,19 @@
//
//===----------------------------------------------------------------------===//
-// Tests for the destroy, destroy_n, uninitialized_fill, uninitialized_fill_n algorithms
+#include "support/pstl_test_config.h"
+
+#ifdef PSTL_STANDALONE_TESTS
#include "pstl/execution"
#include "pstl/memory"
#include "pstl/algorithm"
-#include "utils.h"
+#else
+#include <execution>
+#include <algorithm>
+#endif // PSTL_STANDALONE_TESTS
+
+#include "support/utils.h"
using namespace TestUtils;
diff --git a/pstl/test/pstl_test_config.h b/pstl/test/support/pstl_test_config.h
index 10b872498c3..10b872498c3 100644
--- a/pstl/test/pstl_test_config.h
+++ b/pstl/test/support/pstl_test_config.h
diff --git a/pstl/test/utils.h b/pstl/test/support/utils.h
index 438d453d7be..438d453d7be 100644
--- a/pstl/test/utils.h
+++ b/pstl/test/support/utils.h
OpenPOWER on IntegriCloud