mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.autotest
git-svn-id: svn://ultimatepp.org/upp/trunk@10484 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
9fd64ee55d
commit
7d3021c28b
1 changed files with 4 additions and 1 deletions
|
|
@ -9,7 +9,7 @@ CONSOLE_APP_MAIN
|
|||
SeedRandom(0);
|
||||
|
||||
Vector<int> h;
|
||||
for(int i = 0; i < 10000; i++)
|
||||
for(int i = 0; i < 100000; i++)
|
||||
h << Random(5000);
|
||||
|
||||
ASSERT(CoSum(h) == Sum(h));
|
||||
|
|
@ -20,5 +20,8 @@ CONSOLE_APP_MAIN
|
|||
for(int i = 0; i < h.GetCount(); i++)
|
||||
ASSERT(FindIndex(h, h[i]) == FindIndex(h, h[i]));
|
||||
|
||||
ASSERT(Count(h, 200) == CoCount(h, 200));
|
||||
ASSERT(CountIf(h, [](auto x) { return x % 17 == 0; }) == CoCountIf(h, [](auto x) { return x % 17 == 0; }));
|
||||
|
||||
LOG("============ OK");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue