.autotest

git-svn-id: svn://ultimatepp.org/upp/trunk@13930 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2020-01-22 09:23:05 +00:00
parent 59b57a90cd
commit d53864d32b
3 changed files with 35 additions and 0 deletions

View file

@ -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");
}

View file

@ -0,0 +1,22 @@
#include <Core/Core.h>
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");
}
}

View file

@ -0,0 +1,9 @@
uses
Core;
file
ValueMapVa.cpp;
mainconfig
"" = "";