diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/guy.cpp | 22 | ||||
| -rwxr-xr-x | tests/makeplugin.sh | 3 |
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/guy.cpp b/tests/guy.cpp new file mode 100644 index 0000000..6510771 --- /dev/null +++ b/tests/guy.cpp | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #include "stdio.h" | ||
| 2 | #include "plugin.h" | ||
| 3 | #include "plugger.h" | ||
| 4 | |||
| 5 | class Guy : public Plugin | ||
| 6 | { | ||
| 7 | public: | ||
| 8 | Guy() | ||
| 9 | { | ||
| 10 | printf("I'm guy!\n"); | ||
| 11 | } | ||
| 12 | |||
| 13 | virtual ~Guy() | ||
| 14 | { | ||
| 15 | printf("Guy is dead...\n"); | ||
| 16 | } | ||
| 17 | |||
| 18 | private: | ||
| 19 | }; | ||
| 20 | |||
| 21 | PluginInterface( Guy, Plugin, "Mike", 0, 1 ) | ||
| 22 | |||
diff --git a/tests/makeplugin.sh b/tests/makeplugin.sh new file mode 100755 index 0000000..086fefd --- /dev/null +++ b/tests/makeplugin.sh | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | g++ -fPIC -shared -Wl,-soname,guy.so -o guy.so -I../src -I../src/test/plugin guy.cpp ../src/test/plugin/plugin.cpp | ||
