From c234914394b4c8cdee66d7528bad3c132f90dc4d Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 23 Apr 2013 09:47:29 -0600 Subject: Added cli params & a unit test. --- src/options.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/options.cpp (limited to 'src/options.cpp') 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 @@ +#include "options.h" + +#include "unitnumber.h" + +Options::Options( int argc, char *argv[] ) +{ + addOption( Bu::slot(this, &Options::selfTest), "self-test", + "Run a series of tests to ensure everything is working correctly."); + addHelpOption('h', "help", "This help"); + + parse( argc, argv ); +} + +Options::~Options() +{ +} + +int Options::selfTest( Bu::StringArray aArgs ) +{ + UnitNumber().run(); + + exit( 0 ); +} + -- cgit v1.2.3