From d53864d32ba6172e5c56b6c042e88cda9915f572 Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 22 Jan 2020 09:23:05 +0000 Subject: [PATCH] .autotest git-svn-id: svn://ultimatepp.org/upp/trunk@13930 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- autotest/ValueIsSame/ValueIsSame.cpp | 4 ++++ autotest/ValueMapVa/ValueMapVa.cpp | 22 ++++++++++++++++++++++ autotest/ValueMapVa/ValueMapVa.upp | 9 +++++++++ 3 files changed, 35 insertions(+) create mode 100644 autotest/ValueMapVa/ValueMapVa.cpp create mode 100644 autotest/ValueMapVa/ValueMapVa.upp diff --git a/autotest/ValueIsSame/ValueIsSame.cpp b/autotest/ValueIsSame/ValueIsSame.cpp index 939eecd76..4d768ca77 100644 --- a/autotest/ValueIsSame/ValueIsSame.cpp +++ b/autotest/ValueIsSame/ValueIsSame.cpp @@ -4,6 +4,8 @@ using namespace Upp; CONSOLE_APP_MAIN { + StdLogSetup(LOG_COUT|LOG_FILE); + for(int pass = 0; pass < 3; pass++) { ValueMap a; a.Add(1, "1"); @@ -50,4 +52,6 @@ CONSOLE_APP_MAIN ASSERT(!v1.IsSame(v2)); ASSERT(!v2.IsSame(v1)); } + + LOG("========== OK"); } diff --git a/autotest/ValueMapVa/ValueMapVa.cpp b/autotest/ValueMapVa/ValueMapVa.cpp new file mode 100644 index 000000000..ad5e416a7 --- /dev/null +++ b/autotest/ValueMapVa/ValueMapVa.cpp @@ -0,0 +1,22 @@ +#include + +using namespace Upp; + +CONSOLE_APP_MAIN +{ + Value m = ValueMap{ { 1, "one" }, { 2, "two" } }; + { + String s; + for(Value v : m) + s << v; + DUMP(s); + ASSERT(s == "onetwo"); + } + { + String s; + for(int i = 0; i < m.GetCount(); i++) + s << m[i]; + DUMP(s); + ASSERT(s == "onetwo"); + } +} diff --git a/autotest/ValueMapVa/ValueMapVa.upp b/autotest/ValueMapVa/ValueMapVa.upp new file mode 100644 index 000000000..8ea221c54 --- /dev/null +++ b/autotest/ValueMapVa/ValueMapVa.upp @@ -0,0 +1,9 @@ +uses + Core; + +file + ValueMapVa.cpp; + +mainconfig + "" = ""; +