add test case covering the string representation of commands
This commit is contained in:
parent
ae01f85452
commit
36d615dd3a
1 changed files with 22 additions and 0 deletions
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue