forked from organicmaps/organicmaps-tmp
Add more 'RemoveIfKeepValid' tests.
This commit is contained in:
parent
a1d59a2e67
commit
500cb74fbd
1 changed files with 18 additions and 0 deletions
|
@ -1,7 +1,12 @@
|
|||
#include "../../testing/testing.hpp"
|
||||
|
||||
#include "../macros.hpp"
|
||||
|
||||
#include "../stl_add.hpp"
|
||||
|
||||
#include "../../std/deque.hpp"
|
||||
|
||||
|
||||
UNIT_TEST(STLAdd_IsSorted)
|
||||
{
|
||||
TEST(IsSorted(static_cast<int*>(0), static_cast<int*>(0)), ());
|
||||
|
@ -66,4 +71,17 @@ UNIT_TEST(STLAdd_RemoveIfKeepValid)
|
|||
CheckNoZero(v, RemoveIfKeepValid(v.begin(), v.end(), EqualZero()));
|
||||
TEST_EQUAL(v.size(), 4, ());
|
||||
}
|
||||
|
||||
{
|
||||
deque<int> v;
|
||||
v.push_back(1);
|
||||
v.push_back(0);
|
||||
v.push_back(1);
|
||||
v.push_back(0);
|
||||
v.push_back(1);
|
||||
v.push_back(0);
|
||||
v.push_back(1);
|
||||
CheckNoZero(v, RemoveIfKeepValid(v.begin(), v.end(), EqualZero()));
|
||||
TEST_EQUAL(v.size(), 4, ());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue