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@9985 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
30a1c1ebd9
commit
a87d322fee
3 changed files with 42 additions and 0 deletions
29
autotest/Stream/Stream.cpp
Normal file
29
autotest/Stream/Stream.cpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
StdLogSetup(LOG_COUT|LOG_FILE);
|
||||
|
||||
SizeStream ss;
|
||||
|
||||
ASSERT(ss.IsStoring());
|
||||
|
||||
ss.Put(0);
|
||||
|
||||
ASSERT(ss.GetSize() == 1);
|
||||
|
||||
int len = 1;
|
||||
|
||||
SeedRandom();
|
||||
for(int i = 0; i < 100; i++) {
|
||||
byte h[201];
|
||||
int l = Random(200);
|
||||
ss.Put(h, l);
|
||||
len += l;
|
||||
ASSERT(len == ss.GetSize());
|
||||
}
|
||||
|
||||
LOG("============= OK");
|
||||
}
|
||||
9
autotest/Stream/Stream.upp
Normal file
9
autotest/Stream/Stream.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
Stream.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "";
|
||||
|
||||
4
autotest/Stream/init
Normal file
4
autotest/Stream/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _Stream_icpp_init_stub
|
||||
#define _Stream_icpp_init_stub
|
||||
#include "Core/init"
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue