From a0952427976bcff3c577de6fdc904b44b6cb8fbe Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 10 May 2017 20:49:53 +0000 Subject: [PATCH] .autotest git-svn-id: svn://ultimatepp.org/upp/trunk@11065 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- autotest/Bits/Bits.cpp | 15 ++++++++++++++- autotest/HttpRequest/HttpRequest.cpp | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/autotest/Bits/Bits.cpp b/autotest/Bits/Bits.cpp index 2fd7f2eba..1ff07500d 100644 --- a/autotest/Bits/Bits.cpp +++ b/autotest/Bits/Bits.cpp @@ -20,8 +20,15 @@ CONSOLE_APP_MAIN h.Set(pos, b); } - for(int i = 0; i < v.GetCount(); i++) + Bits hh; + String s = StoreAsString(h); + LoadFromString(hh, s); + LoadFromString(h, s); + + for(int i = 0; i < v.GetCount(); i++) { ASSERT(h.Get(i) == v[i]); + ASSERT(hh.Get(i) == v[i]); + } } { @@ -59,5 +66,11 @@ CONSOLE_APP_MAIN DUMP(n); } + { + Bits x; + x.Set(4, 1); + DUMP(x); + } + LOG("--------- OK"); } diff --git a/autotest/HttpRequest/HttpRequest.cpp b/autotest/HttpRequest/HttpRequest.cpp index 915d2026f..4d874f64b 100644 --- a/autotest/HttpRequest/HttpRequest.cpp +++ b/autotest/HttpRequest/HttpRequest.cpp @@ -74,5 +74,23 @@ CONSOLE_APP_MAIN ASSERT(r.Execute().GetCount() == 0); ASSERT(r.IsSuccess()); } + + { + HttpRequest h("https://journeyman.cz/"); + String s = h.Execute(); + DUMP(h.GetReasonPhrase()); + DUMP(h.GetContent()); + ASSERT(s.Find("") >= 0); + } + + { + HttpRequest h("https://journeyman.cz/"); + h.Timeout(0); + String s = h.Execute(); + DUMP(h.GetReasonPhrase()); + DUMP(h.GetContent()); + ASSERT(s.Find("") >= 0); + } + LLOG("*********** Everything is OK"); }