aboutsummaryrefslogtreecommitdiff
path: root/src/tests/optparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tests/optparser.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/tests/optparser.cpp b/src/tests/optparser.cpp
new file mode 100644
index 0000000..9168af8
--- /dev/null
+++ b/src/tests/optparser.cpp
@@ -0,0 +1,27 @@
1#include <bu/optparser.h>
2#include <bu/sio.h>
3using namespace Bu;
4
5class Opts : public Bu::OptParser
6{
7public:
8 Opts() :
9 iBob( 542 )
10 {
11 callback( this, &Opts::cb );
12 }
13
14 int cb( int argc, char *argv[] )
15 {
16 sio << "Hey, cb was called, here's a class var: " << iBob << sio.nl;
17 return 5;
18 }
19
20 int iBob;
21};
22
23int main( int argc, char *argv[] )
24{
25 Opts o;
26}
27