mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-18 13:21:40 +00:00
28 lines
666 B
C++
28 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
|