ultimatepp/autotest/Maps/Maps.cpp
cxl d02fe7d7c7 Creating the *real* autotest nest
git-svn-id: svn://ultimatepp.org/upp/trunk@7141 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2014-04-02 18:36:01 +00:00

35 lines
634 B
C++

#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN{
StdLogSetup(LOG_FILE|LOG_COUT);
VectorMap<int, String> m;
m(1, "one")(2, "two");
DDUMPM(m);
ASSERT(m.Get(1) == "one");
ASSERT(m.Get(2) == "two");
{
SortedVectorMap<int, String> m;
m(2, "two")(1, "one");
DDUMPM(m);
ASSERT(m.Get(1) == "one");
ASSERT(m.Get(2) == "two");
}
{
SortedArrayMap<int, String> m;
m(1, "one")(2, "two");
DDUMPM(m);
ASSERT(m.Get(1) == "one");
ASSERT(m.Get(2) == "two");
}
{
ValueMap m;
m(1, "one")(2, "two");
DDUMP(m);
ASSERT(m[1] == "one");
ASSERT(m[2] == "two");
}
}