diff --git a/autotest/Stream/Stream.cpp b/autotest/Stream/Stream.cpp new file mode 100644 index 000000000..574d0dcb1 --- /dev/null +++ b/autotest/Stream/Stream.cpp @@ -0,0 +1,29 @@ +#include + +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"); +} diff --git a/autotest/Stream/Stream.upp b/autotest/Stream/Stream.upp new file mode 100644 index 000000000..984a279cd --- /dev/null +++ b/autotest/Stream/Stream.upp @@ -0,0 +1,9 @@ +uses + Core; + +file + Stream.cpp; + +mainconfig + "" = ""; + diff --git a/autotest/Stream/init b/autotest/Stream/init new file mode 100644 index 000000000..d7013bc1b --- /dev/null +++ b/autotest/Stream/init @@ -0,0 +1,4 @@ +#ifndef _Stream_icpp_init_stub +#define _Stream_icpp_init_stub +#include "Core/init" +#endif