mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
.autotest
git-svn-id: svn://ultimatepp.org/upp/trunk@15328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
c9db2e45d3
commit
59dbb4c475
4 changed files with 41 additions and 0 deletions
7
autotest/RemoveIf/Etalon.log
Normal file
7
autotest/RemoveIf/Etalon.log
Normal 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 = []
|
||||
22
autotest/RemoveIf/RemoveIf.cpp
Normal file
22
autotest/RemoveIf/RemoveIf.cpp
Normal 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();
|
||||
}
|
||||
10
autotest/RemoveIf/RemoveIf.upp
Normal file
10
autotest/RemoveIf/RemoveIf.upp
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
Etalon.log,
|
||||
RemoveIf.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "";
|
||||
|
||||
|
|
@ -32,4 +32,6 @@ CONSOLE_APP_MAIN
|
|||
}
|
||||
LOG("Less: " << less << ", Equal: " << equal);
|
||||
}
|
||||
|
||||
LOG("=================== OK");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue