dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
command.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Fix github's markdown display of README file
[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