diff options
Diffstat (limited to 'pstl/test/std/algorithms/alg.nonmodifying')
4 files changed, 9 insertions, 9 deletions
diff --git a/pstl/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp index 1bccb530254..b2ae5416497 100644 --- a/pstl/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp +++ b/pstl/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp @@ -39,12 +39,12 @@ test_adjacent_find_by_type() { size_t counts[] = {2, 3, 500}; - for (int32_t c = 0; c < const_size(counts); ++c) + for (size_t c = 0; c < const_size(counts); ++c) { - for (int32_t e = 0; e < (counts[c] >= 64 ? 64 : (counts[c] == 2 ? 1 : 2)); ++e) + for (size_t e = 0; e < (counts[c] >= 64 ? 64 : (counts[c] == 2 ? 1 : 2)); ++e) { - Sequence<T> in(counts[c], [](int32_t v) -> T { return T(v); }); //fill 0...n + Sequence<T> in(counts[c], [](size_t v) -> T { return T(v); }); //fill 0...n in[e] = in[e + 1] = -1; //make an adjacent pair auto i = std::adjacent_find(in.cbegin(), in.cend(), std::equal_to<T>()); @@ -56,9 +56,9 @@ test_adjacent_find_by_type() } //special cases: size=0, size=1; - for (int32_t expect = 0; expect < 1; ++expect) + for (size_t expect = 0; expect < 1; ++expect) { - Sequence<T> in(expect, [](int32_t v) -> T { return T(v); }); //fill 0...n + Sequence<T> in(expect, [](size_t v) -> T { return T(v); }); //fill 0...n auto i = std::adjacent_find(in.cbegin(), in.cend(), std::equal_to<T>()); EXPECT_TRUE(i == in.cbegin() + expect, "std::adjacent_find returned wrong result"); diff --git a/pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp index ea4c09ec18d..192babb29e0 100644 --- a/pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp +++ b/pstl/test/std/algorithms/alg.nonmodifying/equal.pass.cpp @@ -20,10 +20,10 @@ using namespace TestUtils; struct UserType { + size_t key; float32_t f; float64_t d; int32_t i; - size_t key; bool operator()(UserType a, UserType b) diff --git a/pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp index dfe499c3d1e..466314e643d 100644 --- a/pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp +++ b/pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp @@ -68,8 +68,8 @@ test(const std::size_t bits) const std::size_t max_n1 = 1000; const std::size_t max_n2 = (max_n1 * 10) / 8; - Sequence<T> in(max_n1, [max_n1, bits](std::size_t k) { return T(2 * HashBits(max_n1, bits - 1) ^ 1); }); - Sequence<T> sub(max_n2, [max_n1, bits](std::size_t k) { return T(2 * HashBits(max_n1, bits - 1)); }); + Sequence<T> in(max_n1, [bits](std::size_t k) { return T(2 * HashBits(max_n1, bits - 1) ^ 1); }); + Sequence<T> sub(max_n2, [bits](std::size_t k) { return T(2 * HashBits(max_n1, bits - 1)); }); for (std::size_t n1 = 0; n1 <= max_n1; n1 = n1 <= 16 ? n1 + 1 : size_t(3.1415 * n1)) { std::size_t sub_n[] = {0, 1, 3, n1, (n1 * 10) / 8}; diff --git a/pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp b/pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp index 28fcb36ad80..ac8a422698c 100644 --- a/pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp +++ b/pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp @@ -67,7 +67,7 @@ test() } for (auto r : res) { - Sequence<T> in(n1, [n1](std::size_t k) { return T(0); }); + Sequence<T> in(n1, [](std::size_t k) { return T(0); }); std::size_t i = r, isub = 0; for (; i < n1 & isub < n2; ++i, ++isub) in[i] = value; |