mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.autotest
git-svn-id: svn://ultimatepp.org/upp/trunk@11028 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
32c244a94e
commit
647b4ee789
2 changed files with 33 additions and 0 deletions
24
autotest/Bits/Bits.cpp
Normal file
24
autotest/Bits/Bits.cpp
Normal 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
9
autotest/Bits/Bits.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
Bits.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "";
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue