aboutsummaryrefslogtreecommitdiff
path: root/src/unitsuite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/unitsuite.cpp')
-rw-r--r--src/unitsuite.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/unitsuite.cpp b/src/unitsuite.cpp
index a66160e..51cca10 100644
--- a/src/unitsuite.cpp
+++ b/src/unitsuite.cpp
@@ -6,6 +6,9 @@
6 */ 6 */
7 7
8#include "bu/unitsuite.h" 8#include "bu/unitsuite.h"
9#include "bu/file.h"
10
11#include <unistd.h>
9 12
10Bu::UnitSuite::UnitSuite() : 13Bu::UnitSuite::UnitSuite() :
11 iOptions( 0 ) 14 iOptions( 0 )
@@ -102,9 +105,20 @@ int Bu::UnitSuite::run( int /*argc*/, char * /*argv */ [] )
102 if( iUPass == 0 && iUFail == 0 ) 105 if( iUPass == 0 && iUFail == 0 )
103 printf("\tNothing unexpected.\n\n"); 106 printf("\tNothing unexpected.\n\n");
104 107
108 for( StrList::iterator i = lFileCleanup.begin(); i; i++ )
109 {
110 unlink( (*i).getStr() );
111 }
112
105 return 0; 113 return 0;
106} 114}
107 115
116void Bu::UnitSuite::tempFile( Bu::FString &sFileName )
117{
118 Bu::File::tempFile( sFileName );
119 lFileCleanup.append( sFileName );
120}
121
108void Bu::UnitSuite::add( Test fTest, const Bu::FString &sName, Expect e ) 122void Bu::UnitSuite::add( Test fTest, const Bu::FString &sName, Expect e )
109{ 123{
110 TestInfo ti; 124 TestInfo ti;