aboutsummaryrefslogtreecommitdiff
path: root/src/unitsuite.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-08-23 20:17:52 +0000
committerMike Buland <eichlan@xagasoft.com>2007-08-23 20:17:52 +0000
commit4873aad0fe15b3f46c6372b661ce926795922a6e (patch)
tree4a03079f45e39e2ed9d42f389f299f1d6dbe007a /src/unitsuite.cpp
parentda6ebe9bd659916122ee973818c3d1f98ce2e007 (diff)
downloadlibbu++-4873aad0fe15b3f46c6372b661ce926795922a6e.tar.gz
libbu++-4873aad0fe15b3f46c6372b661ce926795922a6e.tar.bz2
libbu++-4873aad0fe15b3f46c6372b661ce926795922a6e.tar.xz
libbu++-4873aad0fe15b3f46c6372b661ce926795922a6e.zip
The list now supports insertSorted, and the UnitSuite supports more options,
including StopOnError and handling/reporting of external exceptions.
Diffstat (limited to 'src/unitsuite.cpp')
-rw-r--r--src/unitsuite.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/unitsuite.cpp b/src/unitsuite.cpp
index 2a28eb5..b61f486 100644
--- a/src/unitsuite.cpp
+++ b/src/unitsuite.cpp
@@ -1,6 +1,12 @@
1#include "unitsuite.h" 1#include "unitsuite.h"
2 2
3Bu::UnitSuite::UnitSuite() 3Bu::UnitSuite::UnitSuite() :
4 iOptions( 0 )
5{
6}
7
8Bu::UnitSuite::UnitSuite( int iOptions ) :
9 iOptions( iOptions )
4{ 10{
5} 11}
6 12
@@ -35,10 +41,23 @@ int Bu::UnitSuite::run( int argc, char *argv[] )
35 e.str.getStr() 41 e.str.getStr()
36 ); 42 );
37 } 43 }
44
45 if( (iOptions & optStopOnError) )
46 return 0;
47 }
48 catch( std::exception &e )
49 {
50 printf("failed with unknown exception. what: %s\n", e.what() );
51
52 if( (iOptions & optStopOnError) )
53 return 0;
38 } 54 }
39 catch( ... ) 55 catch( ... )
40 { 56 {
41 printf("failed with external exception.\n"); 57 printf("failed with external exception.\n");
58
59 if( (iOptions & optStopOnError) )
60 return 0;
42 } 61 }
43 } 62 }
44 63