.autotest

This commit is contained in:
Mirek Fidler 2024-02-12 12:13:56 +01:00
parent 6eebadd788
commit a8f3ab257f
2 changed files with 39 additions and 0 deletions

View 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);
}
}

View file

@ -0,0 +1,9 @@
uses
Core;
file
VectorSet.cpp;
mainconfig
"" = "";