.autotest

git-svn-id: svn://ultimatepp.org/upp/trunk@15328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-10-30 10:45:28 +00:00
parent c9db2e45d3
commit 59dbb4c475
4 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,7 @@
* C:\upp\out\autotest\MSBT19.Debug.Debug_Full\RemoveIf.exe 30.10.2020 11:37:43, user: cxl
x = [1, 4, 5, 5, 7, 5, 2, 1, 7, 9]
x = [1, 4, 5, 5, 7, 5, 2, 1, 7, 9]
x = [1, 4, 5, 5, 7, 5, 2, 1, 7]
x = [1, 4, 7, 2, 1, 7]
x = []

View file

@ -0,0 +1,22 @@
#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
StdLogSetup(LOG_COUT|LOG_FILE);
Vector<int> x { 1, 4, 5, 5, 7, 5, 2, 1, 7, 9 };
DUMP(x);
x.RemoveIf([&](int i) { return x[i] == 8; });
DUMP(x);
x.RemoveIf([&](int i) { return x[i] == 9; });
DUMP(x);
x.RemoveIf([&](int i) { return x[i] == 5; });
DUMP(x);
x.RemoveIf([&](int i) { return true; });
DUMP(x);
CheckLogEtalon();
}

View file

@ -0,0 +1,10 @@
uses
Core;
file
Etalon.log,
RemoveIf.cpp;
mainconfig
"" = "";

View file

@ -32,4 +32,6 @@ CONSOLE_APP_MAIN
} }
LOG("Less: " << less << ", Equal: " << equal); LOG("Less: " << less << ", Equal: " << equal);
} }
LOG("=================== OK");
} }