.autotest

git-svn-id: svn://ultimatepp.org/upp/trunk@11028 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2017-04-25 10:37:52 +00:00
parent 32c244a94e
commit 647b4ee789
2 changed files with 33 additions and 0 deletions

24
autotest/Bits/Bits.cpp Normal file
View file

@ -0,0 +1,24 @@
#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
StdLogSetup(LOG_COUT|LOG_FILE);
Bits h;
Vector<bool> v;
for(int i = 0; i < 100000; i++) {
int pos = Random(120000);
bool b = Random() & 1;
v.At(pos, false) = b;
h.Set(pos, b);
}
for(int i = 0; i < v.GetCount(); i++)
ASSERT(h.Get(i) == v[i]);
LOG("--------- OK");
}

9
autotest/Bits/Bits.upp Normal file
View file

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