aboutsummaryrefslogtreecommitdiff
path: root/src/unitsuite.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-05-24 15:10:19 +0000
committerMike Buland <eichlan@xagasoft.com>2010-05-24 15:10:19 +0000
commitecc191f590f76584a14c9c51727412b0b7b3086e (patch)
treeb27ee434ed541ba3a386ff6a3238f66b9451ef22 /src/unitsuite.cpp
parent71191e311d949b1b7bdd74fc36a14306f492c181 (diff)
downloadlibbu++-ecc191f590f76584a14c9c51727412b0b7b3086e.tar.gz
libbu++-ecc191f590f76584a14c9c51727412b0b7b3086e.tar.bz2
libbu++-ecc191f590f76584a14c9c51727412b0b7b3086e.tar.xz
libbu++-ecc191f590f76584a14c9c51727412b0b7b3086e.zip
Changed the Bu::Stream API, setSize is now standard. There may be a few more
things that should be added. A few of them still need to be implemented. I know that truncate for Bu::File is possible on windows, I've used it before, but hell if I can find it. Myriad also needs the setSize function completed.
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;