From 7d3021c28b6d0e2ca9f1328638ac7a335e1a7ad3 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 22 Nov 2016 18:59:48 +0000 Subject: [PATCH] .autotest git-svn-id: svn://ultimatepp.org/upp/trunk@10484 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- autotest/CoAlgo/CoAlgo.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autotest/CoAlgo/CoAlgo.cpp b/autotest/CoAlgo/CoAlgo.cpp index 81c501c59..42e1f4b01 100644 --- a/autotest/CoAlgo/CoAlgo.cpp +++ b/autotest/CoAlgo/CoAlgo.cpp @@ -9,7 +9,7 @@ CONSOLE_APP_MAIN SeedRandom(0); Vector 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"); }