diff options
author | Mike Buland <mike@xagasoft.com> | 2013-04-23 09:47:29 -0600 |
---|---|---|
committer | Mike Buland <mike@xagasoft.com> | 2013-04-23 09:47:29 -0600 |
commit | c234914394b4c8cdee66d7528bad3c132f90dc4d (patch) | |
tree | e2204b30d1edd0d7f45a5f8579738e8fa274c644 /src/options.cpp | |
parent | 95da25821bcbcd6a94a7fdf64da1618f5324b779 (diff) | |
download | clic-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.cpp | 24 |
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 | |||
5 | Options::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 | |||
14 | Options::~Options() | ||
15 | { | ||
16 | } | ||
17 | |||
18 | int Options::selfTest( Bu::StringArray aArgs ) | ||
19 | { | ||
20 | UnitNumber().run(); | ||
21 | |||
22 | exit( 0 ); | ||
23 | } | ||
24 | |||