.autotest

git-svn-id: svn://ultimatepp.org/upp/trunk@10484 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2016-11-22 18:59:48 +00:00
parent 9fd64ee55d
commit 7d3021c28b

View file

@ -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");
}