canceled comments
This commit is contained in:
parent
e3b114ecab
commit
6706a8919c
@ -306,7 +306,7 @@ TEST_CASE("algorithms")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
SECTION("copy")
|
SECTION("copy")
|
||||||
{
|
{
|
||||||
SECTION("copy without if")
|
SECTION("copy without if")
|
||||||
@ -321,12 +321,13 @@ TEST_CASE("algorithms")
|
|||||||
SECTION("copy if")
|
SECTION("copy if")
|
||||||
{
|
{
|
||||||
json dest_arr;
|
json dest_arr;
|
||||||
const json source_arr = {0,3,6,9,12,15,20};
|
const json source_arr = {0, 3, 6, 9, 12, 15, 20};
|
||||||
|
|
||||||
|
|
||||||
std::copy_if(source_arr.begin(), source_arr.end(), std::back_inserter(dest_arr), [](const json& _value) {
|
std::copy_if(source_arr.begin(), source_arr.end(), std::back_inserter(dest_arr), [](const json & _value)
|
||||||
|
{
|
||||||
return _value.get<int>() % 3 == 0;
|
return _value.get<int>() % 3 == 0;
|
||||||
});
|
});
|
||||||
CHECK(dest_arr == json({0, 3, 6, 9, 12, 15}));
|
CHECK(dest_arr == json({0, 3, 6, 9, 12, 15}));
|
||||||
}
|
}
|
||||||
SECTION("copy n")
|
SECTION("copy n")
|
||||||
@ -341,7 +342,6 @@ TEST_CASE("algorithms")
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user