diff --git a/tests/core/proc/control/test-dummy-commands.cpp b/tests/core/proc/control/test-dummy-commands.cpp index 64e4aaa67..138855f82 100644 --- a/tests/core/proc/control/test-dummy-commands.cpp +++ b/tests/core/proc/control/test-dummy-commands.cpp @@ -22,6 +22,7 @@ #include "proc/control/test-dummy-commands.hpp" +#include "proc/control/command-def.hpp" @@ -48,4 +49,37 @@ namespace test { } + /* ==== global static prototype definitions for these commands ==== */ + + /** + * @remark The following definition(s) will be evaluated automatically ON_GLOBAL_INIT + * They result in "prototype" definitions of these dummy commands to be + * registered under the names as used here in the macro invocation. + * Thus `test_Dummy_command1` will invoke command1::operate(int) etc. + * @see CommandSetup_test + */ + + COMMAND_DEFINITION (test_Dummy_command1) + { + def.operation(command1::operate) + .captureUndo(command1::capture) + .undoOperation(command1::undoIt); + }; + + COMMAND_DEFINITION (test_Dummy_command2) + { + def.operation(command2::operate) + .captureUndo(command2::capture) + .undoOperation(command2::undoIt); + }; + + COMMAND_DEFINITION (test_Dummy_command3) + { + def.operation(command3::operate) + .captureUndo(command3::capture) + .undoOperation(command3::undoIt); + }; + + + }}} // namespace proc::control::test diff --git a/tests/core/proc/control/test-dummy-commands.hpp b/tests/core/proc/control/test-dummy-commands.hpp index ef90c0873..6f02ff0cd 100644 --- a/tests/core/proc/control/test-dummy-commands.hpp +++ b/tests/core/proc/control/test-dummy-commands.hpp @@ -40,6 +40,7 @@ #include "lib/error.hpp" #include "lib/test/test-helper.hpp" +#include "proc/control/command-setup.hpp" #include #include @@ -151,5 +152,18 @@ namespace test { } + /* ==== global static prototype definitions for these commands ==== */ + + /** test dummy command to add the argument to a global variable */ + extern CommandSetup test_Dummy_command1; + + /** test dummy command to invoke the given functor and + * append the result onto a global log string buffer */ + extern CommandSetup test_Dummy_command2; + + /** test dummy command to increment a global variable; no arguments */ + extern CommandSetup test_Dummy_command3; + + }}} // namespace proc::control::test #endif