add test case covering the string representation of commands

This commit is contained in:
Fischlurch 2009-10-10 06:23:51 +02:00
parent ae01f85452
commit 36d615dd3a

View file

@ -74,6 +74,7 @@ namespace test {
definePrototype();
usePrototype();
preventDuplicates();
stringRepresentation();
undef();
ASSERT (0 == command1::check_);
@ -295,6 +296,27 @@ namespace test {
}
void
stringRepresentation()
{
cout << string (Command::get("test.command1.1")) << endl;
cout << string (Command::get("test.command1.2")) << endl;
cout << string (Command::get("test.command1.3")) << endl;
cout << string (Command::get("test.command1.4")) << endl;
cout << string (Command() ) << endl;
Command com = Command::get("test.command1.4").newInstance();
cout << string (com) << endl;
com.bind(123);
cout << string (com) << endl;
com();
cout << string (com) << endl;
com.undo();
cout << string (com) << endl;
}
void
undef()
{