ultimatepp/upptst/IdCtrls/main.cpp
cxl b3995f4d5f .upptst
git-svn-id: svn://ultimatepp.org/upp/trunk@11374 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2017-10-12 08:06:42 +00:00

29 lines
429 B
C++

#include <CtrlLib/CtrlLib.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
StdLogSetup(LOG_COUT|LOG_FILE);
EditString a, b;
IdCtrls idctrls;
idctrls("A", a)("B", b);
a <<= "Hello";
b <<= "world";
ValueMap m = ~idctrls;
DUMP(m);
ASSERT(m["A"] == "Hello");
ASSERT(m["B"] == "world");
m("A") = "Test";
idctrls <<= m;
DUMP(~a);
ASSERT(~a == "Test");
LOG("=============== OK");
}