Possibility to pass class method reference
[command.git] / tests / callable / invokes_void_function.cpp
1 #include <cstring>
2 #include <iostream>
3
4 #include "TestCallable.h"
5 #include "callable.h"
6
7 using namespace std;
8 using namespace command;
9
10 bool test = false;
11
12 void _function(void) {
13     test = true;
14 };
15
16 int main() {
17     TestCallable<void> callable(_function);
18     callable.callFunction();
19
20     if (test == true) {
21         cout << "Callable class calls provided function\n";
22         return 0;
23     }
24
25     cout << "Callable class does not call provided function\n";
26
27     return 1;
28 }
29