From eb777bc1ed060408ff96e590e1212901b8337962 Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 23 Jul 2014 05:31:20 +0000 Subject: [PATCH] .autotest: One git-svn-id: svn://ultimatepp.org/upp/trunk@7531 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- autotest/InetMessage/InetMessage.cpp | 15 ++++++++++++++- autotest/One/One.cpp | 25 +++++++++++++++++++++++++ autotest/One/One.upp | 9 +++++++++ autotest/One/init | 4 ++++ 4 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 autotest/One/One.cpp create mode 100644 autotest/One/One.upp create mode 100644 autotest/One/init diff --git a/autotest/InetMessage/InetMessage.cpp b/autotest/InetMessage/InetMessage.cpp index 8246c2ed6..dbd635e3c 100644 --- a/autotest/InetMessage/InetMessage.cpp +++ b/autotest/InetMessage/InetMessage.cpp @@ -5,8 +5,8 @@ using namespace Upp; void Test(const InetMessage& msg, int ii, int count, const char *txt = NULL, const char *mime = NULL) { - LOG("Testing part " << ii); String body = msg[ii].Decode(); + LOG("Testing part " << ii << ' ' << body.GetCount()); ASSERT(body.GetCount() == count); ASSERT(body.Find(txt) >= 0); if(mime) { @@ -34,6 +34,19 @@ CONSOLE_APP_MAIN Test(msg, 1, 119, "Tato zpráva neobsahuje viry ani jiný škodlivý kód - avast! Antivirus je aktivní."); Test(msg, 3, 909, "Tato zpráva neobsahuje viry ani jiný škodlivý kód - + +using namespace Upp; + +struct Base { int x; virtual ~Base() {} }; +struct Derived : Base { int y; }; + +CONSOLE_APP_MAIN +{ + One x; + x.Create(); + + One o; + + ASSERT(!o.Is()); + ASSERT(!o.Is()); + + o.Create(); + ASSERT(o.Is()); + ASSERT(!o.Is()); + + o.Create(); + ASSERT(o.Is()); + ASSERT(o.Is()); +} diff --git a/autotest/One/One.upp b/autotest/One/One.upp new file mode 100644 index 000000000..b409500a5 --- /dev/null +++ b/autotest/One/One.upp @@ -0,0 +1,9 @@ +uses + Core; + +file + One.cpp; + +mainconfig + "" = "SSE2"; + diff --git a/autotest/One/init b/autotest/One/init new file mode 100644 index 000000000..35d551a3e --- /dev/null +++ b/autotest/One/init @@ -0,0 +1,4 @@ +#ifndef _One_icpp_init_stub +#define _One_icpp_init_stub +#include "Core/init" +#endif