Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added to tests the file unit-algorithm.cpp (c++ 11) functions from algorithm library #4044

Merged
merged 10 commits into from
Jun 11, 2023
Prev Previous commit
Next Next commit
formated the file using tests/src/unit-algorithms.cpp
make amalgamat
  • Loading branch information
Tomerkm committed Jun 10, 2023
commit e3b114ecab8e156928d0f29db4b72903981d91c7
10 changes: 5 additions & 5 deletions tests/src/unit-algorithms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,12 @@ TEST_CASE("algorithms")
{
json dest_arr;
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) {
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")
{
Expand All @@ -336,10 +336,10 @@ TEST_CASE("algorithms")
const unsigned char numToCopy = 2;

std::copy_n(source_arr.begin(), numToCopy, std::back_inserter(dest_arr));
CHECK(dest_arr == json{0, 1});
CHECK(dest_arr == json{0, 1});

}

}
*/

Expand Down