Changeset View
Changeset View
Standalone View
Standalone View
test/std/algorithms/alg.modifying.operations/generate.pass.cpp
- This file was moved from test/test_generate.cpp.
// -*- C++ -*- | // -*- C++ -*- | ||||
//===-- test_generate.cpp -------------------------------------------------===// | //===-- test_generate.cpp -------------------------------------------------===// | ||||
// | // | ||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||||
// See https://llvm.org/LICENSE.txt for license information. | // See https://llvm.org/LICENSE.txt for license information. | ||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// Tests for generate | // Tests for generate | ||||
#include <atomic> | #include "support/pstl_test_config.h" | ||||
#include <atomic> | |||||
#include <type_traits> | |||||
#ifdef PSTL_STANDALONE_TESTS | |||||
#include "pstl/execution" | #include "pstl/execution" | ||||
#include "pstl/algorithm" | #include "pstl/algorithm" | ||||
#include "utils.h" | #else | ||||
#include <execution> | |||||
#include <algorithm> | |||||
#endif // PSTL_STANDALONE_TESTS | |||||
#include "support/parallel_utils.h" | |||||
using namespace TestUtils; | using namespace Parallel_TestUtils; | ||||
template <typename T> | template <typename T> | ||||
struct Generator_count | struct Generator_count | ||||
{ | { | ||||
const T def_val = T(-1); | const T def_val = T(-1); | ||||
T | T | ||||
operator()() | operator()() | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |