summaryrefslogtreecommitdiff
path: root/src/options.cpp
diff options
context:
space:
mode:
authorMike Buland <mike@xagasoft.com>2013-04-23 09:47:29 -0600
committerMike Buland <mike@xagasoft.com>2013-04-23 09:47:29 -0600
commitc234914394b4c8cdee66d7528bad3c132f90dc4d (patch)
treee2204b30d1edd0d7f45a5f8579738e8fa274c644 /src/options.cpp
parent95da25821bcbcd6a94a7fdf64da1618f5324b779 (diff)
downloadclic-c234914394b4c8cdee66d7528bad3c132f90dc4d.tar.gz
clic-c234914394b4c8cdee66d7528bad3c132f90dc4d.tar.bz2
clic-c234914394b4c8cdee66d7528bad3c132f90dc4d.tar.xz
clic-c234914394b4c8cdee66d7528bad3c132f90dc4d.zip
Added cli params & a unit test.
Diffstat (limited to '')
-rw-r--r--src/options.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/options.cpp b/src/options.cpp
new file mode 100644
index 0000000..ef46e82
--- /dev/null
+++ b/src/options.cpp
@@ -0,0 +1,24 @@
1#include "options.h"
2
3#include "unitnumber.h"
4
5Options::Options( int argc, char *argv[] )
6{
7 addOption( Bu::slot(this, &Options::selfTest), "self-test",
8 "Run a series of tests to ensure everything is working correctly.");
9 addHelpOption('h', "help", "This help");
10
11 parse( argc, argv );
12}
13
14Options::~Options()
15{
16}
17
18int Options::selfTest( Bu::StringArray aArgs )
19{
20 UnitNumber().run();
21
22 exit( 0 );
23}
24