.autotest

git-svn-id: svn://ultimatepp.org/upp/trunk@11755 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2018-02-01 17:04:55 +00:00
parent c89d25bde6
commit 8baaf29eec
2 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,28 @@
#include <Core/Core.h>
using namespace Upp;
template <class T>
void Test()
{
T x;
DDUMP(x.Get(0, "321"));
ASSERT(x.Get(0, "321") == "321");
x.Add("123");
DDUMP(x.Get(0, "321"));
ASSERT(x.Get(0, "321") == "123");
String h = "test";
x.Set(1, pick(h));
DDUMP(h);
ASSERT(h.GetCount() == 0);
DDUMP(x);
ASSERT(x.GetCount() == 2);
ASSERT(x[0] == "123");
ASSERT(x[1] == "test");
}
CONSOLE_APP_MAIN
{
Test<Vector<String>>();
Test<Array<String>>();
}

View file

@ -0,0 +1,11 @@
description "Vector/Array Get Set tests\377";
uses
Core;
file
GetSet.cpp;
mainconfig
"" = "";