summaryrefslogtreecommitdiffstats
path: root/pstl/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pstl/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp')
-rw-r--r--pstl/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp10
1 files changed, 5 insertions, 5 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");
OpenPOWER on IntegriCloud