mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.autotest
This commit is contained in:
parent
6eebadd788
commit
a8f3ab257f
2 changed files with 39 additions and 0 deletions
30
autotest/VectorSet/VectorSet.cpp
Normal file
30
autotest/VectorSet/VectorSet.cpp
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
Vector<String> h;
|
||||
Vector<String> H;
|
||||
|
||||
for(int i = 0; i < 10000; i++) {
|
||||
if(Random(100) == 0) {
|
||||
h.Clear();
|
||||
H.Clear();
|
||||
}
|
||||
int from = Random(h.GetCount() + 10);
|
||||
String what = AsString(i);
|
||||
int count = Random(20);
|
||||
|
||||
h.Set(from, what, count);
|
||||
for(int i = 0; i < count; i++)
|
||||
H.At(i + from) = what;
|
||||
|
||||
if(i < 100) {
|
||||
DDUMP(h);
|
||||
DDUMP(H);
|
||||
}
|
||||
|
||||
ASSERT(H == h);
|
||||
}
|
||||
}
|
||||
9
autotest/VectorSet/VectorSet.upp
Normal file
9
autotest/VectorSet/VectorSet.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
VectorSet.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "";
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue