mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-23 15:26:16 +00:00
29 lines
666 B
C
29 lines
666 B
C
|
#ifndef UT_MISC_VARIABLE
|
||
|
#define UT_MISC_VARIABLE
|
||
|
|
||
|
#include <nel/misc/variable.h>
|
||
|
|
||
|
class CUTMiscVariable : public Test::Suite
|
||
|
{
|
||
|
public:
|
||
|
CUTMiscVariable ()
|
||
|
{
|
||
|
TEST_ADD(CUTMiscVariable ::declareVar)
|
||
|
}
|
||
|
|
||
|
void declareVar()
|
||
|
{
|
||
|
{
|
||
|
NLMISC::CVariable<std::string> myLocalVar("test", "myLocalVar", "no help", "");
|
||
|
|
||
|
TEST_ASSERT(myLocalVar.get() == string(""));
|
||
|
TEST_ASSERT(NLMISC::CCommandRegistry::getInstance().execute("myLocalVar foo", (*NLMISC::InfoLog)));
|
||
|
TEST_ASSERT(myLocalVar.get() == string("foo"));
|
||
|
}
|
||
|
|
||
|
TEST_ASSERT(!NLMISC::CCommandRegistry::getInstance().execute("myLocalVar foo", (*NLMISC::InfoLog)));
|
||
|
}
|
||
|
};
|
||
|
|
||
|
#endif
|