diff options
author | Louis Dionne <ldionne@apple.com> | 2019-03-27 21:28:24 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2019-03-27 21:28:24 +0000 |
commit | 3b62047b8b2209bed57d239f581bdbfc91a10b94 (patch) | |
tree | e321a0dea2d7355c3eca7c9cf9ae1f2b89823c1d /pstl/test | |
parent | 4bc38cfe297746858a7159bd4a537261d628b47e (diff) | |
download | llvm-3b62047b8b2209bed57d239f581bdbfc91a10b94.zip llvm-3b62047b8b2209bed57d239f581bdbfc91a10b94.tar.gz llvm-3b62047b8b2209bed57d239f581bdbfc91a10b94.tar.bz2 |
Restructure test suite to follow libc++ standard layout
Summary: Subsumes changes requested in https://reviews.llvm.org/D59110
Reviewers: EricWF, ldionne
Subscribers: mgorny, krytarowski, jfb, jdoerfert, libcxx-commits
Differential Revision: https://reviews.llvm.org/D59856
llvm-svn: 357124
Diffstat (limited to 'pstl/test')
56 files changed, 502 insertions, 160 deletions
diff --git a/pstl/test/CMakeLists.txt b/pstl/test/CMakeLists.txt index 1b8638a..3381497 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 8bf79f5..6e89ab8 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 6b2ed4b..a80bbae 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 dba6f23..5e6ea34 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 a80a331..5d665d2 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 ad5d992..b79a27a 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 1635406..c27e51c 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 4842030..ad722df 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 1378a95..d26f41f 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 7fdf549..89de3f9 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 64f411b..19bc150 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 4a88ee9..9862f14 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 ee08df1..82b986b 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 2d62c1a..0437292 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 293de5a..5aeaac8 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 1c89422..7ebbf4c 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 5619bca..2bebc4e 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 aa800d2..7d0ec7e 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 5be0614..b53003c 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 4f5f4d2..2d680c3 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 0389aa6..e198c6e 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 ee34ebd..06639cc 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 392f8db..c948e80 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 3944014..50b01e3 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 1de6e03..f6372c4 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 0509078..70bd4b2 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 c6a7d21..38c5537 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 5cb52ba3..0e4f38c 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 956b099..60e56ae 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 0a5a44b..4059630 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 8cdb308..ee62e84 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 914ebc2..2ea8765 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 0d89cc2..cb0fa06 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 5d5c9e8..ec34af0 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 43f0da6..47a01a1 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 eb7b726..f8154d2 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 1603367..c0c6040 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 dacdd87..0c70342 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 3a98808..236e342 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 8b7cb51..e3fec86 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 5a2b51e..b18bb5f6 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 0e59ef2..33b7542 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 a2694584..a5219f7 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 1c28b09..6e9d7d2 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 11d4721..8f13202 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 17cae92..e2eb9ce 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 e95f9d1..8380991 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 ad8872a..cd851aa 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 9193d93..e7283ee 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 a1ec7a3..792190a 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 0014437..4934f7e 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 88873a3..ee5f309 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 4306511..f983777 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 d1cfa10..12301f0 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 10b8724..10b8724 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 438d453..438d453 100644 --- a/pstl/test/utils.h +++ b/pstl/test/support/utils.h |