Commands: some unit test coverage for unbinding arguments
...just to make sure it is properly integrated with the state predicates
This commit is contained in:
parent
bb7bba5dc2
commit
cfe192f8c6
2 changed files with 16 additions and 0 deletions
|
|
@ -192,6 +192,11 @@ namespace test {
|
|||
CHECK ( Command::defined("test.command1.2"));
|
||||
CHECK ( Command::canExec("test.command1.2"));
|
||||
CHECK ( Command::canUndo("test.command1.2"));
|
||||
|
||||
com.unbind(); // revert to pristine state
|
||||
CHECK ( Command::defined("test.command1.2"));
|
||||
CHECK (!Command::canExec("test.command1.2"));
|
||||
CHECK (!Command::canUndo("test.command1.2"));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -283,6 +288,13 @@ namespace test {
|
|||
CHECK (23 == command1::check_);
|
||||
c2.undo();
|
||||
CHECK (0 == command1::check_);
|
||||
|
||||
// remove argument bindings per instance and return to pristine state
|
||||
c4.unbind();
|
||||
CHECK (c2.canExec());
|
||||
CHECK (c2.canUndo());
|
||||
CHECK (not c4.canExec());
|
||||
CHECK (not c4.canUndo());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,9 @@ lumiera_error_get (void);
|
|||
lumiera_err
|
||||
lumiera_error_set (lumiera_err, const char*);
|
||||
|
||||
lumiera_err
|
||||
lumiera_error (void);
|
||||
|
||||
|
||||
int
|
||||
main ()
|
||||
|
|
@ -58,6 +61,7 @@ main ()
|
|||
/* lumiera_error_get() mallocs a LumieraErrorcontext for each thread */
|
||||
lumiera_error_get();
|
||||
lumiera_error_set("dummy","dummy");
|
||||
lumiera_error();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue