Add tests coverage report generation
[command.git] / tests / callable / TestCallableFunctionPointer.h
diff --git a/tests/callable/TestCallableFunctionPointer.h b/tests/callable/TestCallableFunctionPointer.h
new file mode 100644 (file)
index 0000000..7fea870
--- /dev/null
@@ -0,0 +1,27 @@
+#include "callable.h"
+
+using namespace command;
+
+template<typename ArgumentType>
+class TestCallable : public Callable<ArgumentType> {
+public:
+    TestCallable(void (*function)(ArgumentType))
+        : Callable<ArgumentType>(function) {
+    }
+
+    void callFunction(ArgumentType test) {
+        this->call(test);
+    }
+};
+
+template<>
+class TestCallable<void> : public Callable<void> {
+public:
+    TestCallable(void (*function)(void))
+        : Callable<void>(function) {
+    }
+
+    void callFunction() {
+        this->call();
+    }
+};