aboutsummaryrefslogtreecommitdiff
path: root/test/cxxtest
diff options
context:
space:
mode:
authorEugene Sandulenko2009-01-01 15:06:43 +0000
committerEugene Sandulenko2009-01-01 15:06:43 +0000
commit696897b0583ad52ebc6f7666525277847619a8ce (patch)
tree5ac2be2991e94dce32c5bb7fdb0dcc4188221503 /test/cxxtest
parent05d3633eb32ead8e11435b85a9db1ddaa1482fcb (diff)
downloadscummvm-rg350-696897b0583ad52ebc6f7666525277847619a8ce.tar.gz
scummvm-rg350-696897b0583ad52ebc6f7666525277847619a8ce.tar.bz2
scummvm-rg350-696897b0583ad52ebc6f7666525277847619a8ce.zip
Whoa! Removing trailing spaces.
svn-id: r35648
Diffstat (limited to 'test/cxxtest')
-rw-r--r--test/cxxtest/cxxtest/Descriptions.cpp2
-rw-r--r--test/cxxtest/cxxtest/Descriptions.h14
-rw-r--r--test/cxxtest/cxxtest/DummyDescriptions.cpp14
-rw-r--r--test/cxxtest/cxxtest/DummyDescriptions.h14
-rw-r--r--test/cxxtest/cxxtest/ErrorFormatter.h6
-rw-r--r--test/cxxtest/cxxtest/ErrorPrinter.h2
-rw-r--r--test/cxxtest/cxxtest/GlobalFixture.cpp6
-rw-r--r--test/cxxtest/cxxtest/GlobalFixture.h6
-rw-r--r--test/cxxtest/cxxtest/Gui.h36
-rw-r--r--test/cxxtest/cxxtest/LinkedList.cpp22
-rw-r--r--test/cxxtest/cxxtest/LinkedList.h6
-rw-r--r--test/cxxtest/cxxtest/ParenPrinter.h2
-rw-r--r--test/cxxtest/cxxtest/QtGui.h14
-rw-r--r--test/cxxtest/cxxtest/RealDescriptions.cpp32
-rw-r--r--test/cxxtest/cxxtest/RealDescriptions.h36
-rw-r--r--test/cxxtest/cxxtest/StdValueTraits.h6
-rw-r--r--test/cxxtest/cxxtest/StdioFilePrinter.h6
-rw-r--r--test/cxxtest/cxxtest/StdioPrinter.h2
-rw-r--r--test/cxxtest/cxxtest/TeeListener.h34
-rw-r--r--test/cxxtest/cxxtest/TestListener.h2
-rw-r--r--test/cxxtest/cxxtest/TestRunner.h24
-rw-r--r--test/cxxtest/cxxtest/TestSuite.cpp10
-rw-r--r--test/cxxtest/cxxtest/TestSuite.h28
-rw-r--r--test/cxxtest/cxxtest/TestTracker.cpp26
-rw-r--r--test/cxxtest/cxxtest/TestTracker.h14
-rw-r--r--test/cxxtest/cxxtest/ValueTraits.cpp12
-rw-r--r--test/cxxtest/cxxtest/ValueTraits.h32
-rw-r--r--test/cxxtest/cxxtest/Win32Gui.h18
-rw-r--r--test/cxxtest/cxxtest/X11Gui.h18
-rw-r--r--test/cxxtest/cxxtest/YesNoRunner.h4
-rw-r--r--test/cxxtest/sample/CreatedTest.h2
-rw-r--r--test/cxxtest/sample/DeltaTest.h2
-rw-r--r--test/cxxtest/sample/ExceptionTest.h2
-rw-r--r--test/cxxtest/sample/FixtureTest.h2
-rw-r--r--test/cxxtest/sample/TraitsTest.h6
-rw-r--r--test/cxxtest/sample/mock/Dice.h2
-rw-r--r--test/cxxtest/sample/mock/MockStdlib.h2
-rw-r--r--test/cxxtest/sample/mock/TestDice.h8
-rw-r--r--test/cxxtest/sample/mock/roll.cpp2
39 files changed, 238 insertions, 238 deletions
diff --git a/test/cxxtest/cxxtest/Descriptions.cpp b/test/cxxtest/cxxtest/Descriptions.cpp
index 17637ec1bf..4325b9e799 100644
--- a/test/cxxtest/cxxtest/Descriptions.cpp
+++ b/test/cxxtest/cxxtest/Descriptions.cpp
@@ -8,7 +8,7 @@ namespace CxxTest
TestDescription::~TestDescription() {}
SuiteDescription::~SuiteDescription() {}
WorldDescription::~WorldDescription() {}
-
+
//
// Convert total tests to string
//
diff --git a/test/cxxtest/cxxtest/Descriptions.h b/test/cxxtest/cxxtest/Descriptions.h
index bd373ec762..c25b88dd99 100644
--- a/test/cxxtest/cxxtest/Descriptions.h
+++ b/test/cxxtest/cxxtest/Descriptions.h
@@ -8,7 +8,7 @@
#include <cxxtest/LinkedList.h>
-namespace CxxTest
+namespace CxxTest
{
class TestSuite;
@@ -16,28 +16,28 @@ namespace CxxTest
{
public:
virtual ~TestDescription();
-
+
virtual const char *file() const = 0;
virtual unsigned line() const = 0;
virtual const char *testName() const = 0;
virtual const char *suiteName() const = 0;
-
+
virtual void run() = 0;
virtual const TestDescription *next() const = 0;
- virtual TestDescription *next() = 0;
+ virtual TestDescription *next() = 0;
};
class SuiteDescription : public Link
{
public:
virtual ~SuiteDescription();
-
+
virtual const char *file() const = 0;
virtual unsigned line() const = 0;
virtual const char *suiteName() const = 0;
virtual TestSuite *suite() const = 0;
-
+
virtual unsigned numTests() const = 0;
virtual const TestDescription &testDescription( unsigned /*i*/ ) const = 0;
@@ -54,7 +54,7 @@ namespace CxxTest
{
public:
virtual ~WorldDescription();
-
+
virtual unsigned numSuites( void ) const = 0;
virtual unsigned numTotalTests( void ) const = 0;
virtual const SuiteDescription &suiteDescription( unsigned /*i*/ ) const = 0;
diff --git a/test/cxxtest/cxxtest/DummyDescriptions.cpp b/test/cxxtest/cxxtest/DummyDescriptions.cpp
index c862e439d8..04869bfc06 100644
--- a/test/cxxtest/cxxtest/DummyDescriptions.cpp
+++ b/test/cxxtest/cxxtest/DummyDescriptions.cpp
@@ -1,9 +1,9 @@
#include <cxxtest/DummyDescriptions.h>
-namespace CxxTest
+namespace CxxTest
{
DummyTestDescription::DummyTestDescription() {}
-
+
const char *DummyTestDescription::file() const { return "<no file>"; }
unsigned DummyTestDescription::line() const { return 0; }
const char *DummyTestDescription::testName() const { return "<no test>"; }
@@ -14,9 +14,9 @@ namespace CxxTest
TestDescription *DummyTestDescription::next() { return 0; }
const TestDescription *DummyTestDescription::next() const { return 0; }
-
+
DummySuiteDescription::DummySuiteDescription() : _test() {}
-
+
const char *DummySuiteDescription::file() const { return "<no file>"; }
unsigned DummySuiteDescription::line() const { return 0; }
const char *DummySuiteDescription::suiteName() const { return "<no suite>"; }
@@ -29,12 +29,12 @@ namespace CxxTest
const TestDescription *DummySuiteDescription::firstTest() const { return 0; }
void DummySuiteDescription::activateAllTests() {}
bool DummySuiteDescription::leaveOnly( const char * /*testName*/ ) { return false; }
-
+
bool DummySuiteDescription::setUp() { return true;}
bool DummySuiteDescription::tearDown() { return true;}
DummyWorldDescription::DummyWorldDescription() : _suite() {}
-
+
unsigned DummyWorldDescription::numSuites( void ) const { return 0; }
unsigned DummyWorldDescription::numTotalTests( void ) const { return 0; }
const SuiteDescription &DummyWorldDescription::suiteDescription( unsigned ) const { return _suite; }
@@ -42,7 +42,7 @@ namespace CxxTest
const SuiteDescription *DummyWorldDescription::firstSuite() const { return 0; }
void DummyWorldDescription::activateAllTests() {}
bool DummyWorldDescription::leaveOnly( const char * /*suiteName*/, const char * /*testName*/ ) { return false; }
-
+
bool DummyWorldDescription::setUp() { return true;}
bool DummyWorldDescription::tearDown() { return true;}
}
diff --git a/test/cxxtest/cxxtest/DummyDescriptions.h b/test/cxxtest/cxxtest/DummyDescriptions.h
index c9215d125f..69d1116f84 100644
--- a/test/cxxtest/cxxtest/DummyDescriptions.h
+++ b/test/cxxtest/cxxtest/DummyDescriptions.h
@@ -7,13 +7,13 @@
#include <cxxtest/Descriptions.h>
-namespace CxxTest
+namespace CxxTest
{
class DummyTestDescription : public TestDescription
{
public:
DummyTestDescription();
-
+
const char *file() const;
unsigned line() const;
const char *testName() const;
@@ -27,10 +27,10 @@ namespace CxxTest
};
class DummySuiteDescription : public SuiteDescription
- {
+ {
public:
DummySuiteDescription();
-
+
const char *file() const;
unsigned line() const;
const char *suiteName() const;
@@ -43,7 +43,7 @@ namespace CxxTest
const TestDescription *firstTest() const;
void activateAllTests();
bool leaveOnly( const char * /*testName*/ );
-
+
bool setUp();
bool tearDown();
@@ -55,7 +55,7 @@ namespace CxxTest
{
public:
DummyWorldDescription();
-
+
unsigned numSuites( void ) const;
unsigned numTotalTests( void ) const;
const SuiteDescription &suiteDescription( unsigned ) const;
@@ -63,7 +63,7 @@ namespace CxxTest
const SuiteDescription *firstSuite() const;
void activateAllTests();
bool leaveOnly( const char * /*suiteName*/, const char * /*testName*/ = 0 );
-
+
bool setUp();
bool tearDown();
diff --git a/test/cxxtest/cxxtest/ErrorFormatter.h b/test/cxxtest/cxxtest/ErrorFormatter.h
index dca09bc7be..3c5b2b5dbe 100644
--- a/test/cxxtest/cxxtest/ErrorFormatter.h
+++ b/test/cxxtest/cxxtest/ErrorFormatter.h
@@ -25,7 +25,7 @@ namespace CxxTest
virtual OutputStream &operator<<( const char * /*string*/ ) { return *this; }
typedef void (*Manipulator)( OutputStream & );
-
+
virtual OutputStream &operator<<( Manipulator m ) { m( *this ); return *this; }
static void endl( OutputStream &o ) { (o << "\n").flush(); }
};
@@ -213,7 +213,7 @@ namespace CxxTest
private:
ErrorFormatter( const ErrorFormatter & );
ErrorFormatter &operator=( const ErrorFormatter & );
-
+
OutputStream &stop( const char *file, unsigned line )
{
newLine();
@@ -249,7 +249,7 @@ namespace CxxTest
{
(*_o) << " (null)" << endl;
}
-
+
void dumpBuffer( const void *buffer, unsigned size )
{
unsigned dumpSize = size;
diff --git a/test/cxxtest/cxxtest/ErrorPrinter.h b/test/cxxtest/cxxtest/ErrorPrinter.h
index 53d942532b..8c95c2a1e0 100644
--- a/test/cxxtest/cxxtest/ErrorPrinter.h
+++ b/test/cxxtest/cxxtest/ErrorPrinter.h
@@ -23,7 +23,7 @@
# include <iostream>
#endif // _CXXTEST_OLD_STD
-namespace CxxTest
+namespace CxxTest
{
class ErrorPrinter : public ErrorFormatter
{
diff --git a/test/cxxtest/cxxtest/GlobalFixture.cpp b/test/cxxtest/cxxtest/GlobalFixture.cpp
index 29c6ab83a6..edcaf1efe4 100644
--- a/test/cxxtest/cxxtest/GlobalFixture.cpp
+++ b/test/cxxtest/cxxtest/GlobalFixture.cpp
@@ -3,16 +3,16 @@
#include <cxxtest/GlobalFixture.h>
-namespace CxxTest
+namespace CxxTest
{
bool GlobalFixture::setUpWorld() { return true; }
bool GlobalFixture::tearDownWorld() { return true; }
bool GlobalFixture::setUp() { return true; }
bool GlobalFixture::tearDown() { return true; }
-
+
GlobalFixture::GlobalFixture() { attach( _list ); }
GlobalFixture::~GlobalFixture() { detach( _list ); }
-
+
GlobalFixture *GlobalFixture::firstGlobalFixture() { return (GlobalFixture *)_list.head(); }
GlobalFixture *GlobalFixture::lastGlobalFixture() { return (GlobalFixture *)_list.tail(); }
GlobalFixture *GlobalFixture::nextGlobalFixture() { return (GlobalFixture *)next(); }
diff --git a/test/cxxtest/cxxtest/GlobalFixture.h b/test/cxxtest/cxxtest/GlobalFixture.h
index c8173633f6..cbecb0daf8 100644
--- a/test/cxxtest/cxxtest/GlobalFixture.h
+++ b/test/cxxtest/cxxtest/GlobalFixture.h
@@ -3,7 +3,7 @@
#include <cxxtest/LinkedList.h>
-namespace CxxTest
+namespace CxxTest
{
class GlobalFixture : public Link
{
@@ -12,10 +12,10 @@ namespace CxxTest
virtual bool tearDownWorld();
virtual bool setUp();
virtual bool tearDown();
-
+
GlobalFixture();
~GlobalFixture();
-
+
static GlobalFixture *firstGlobalFixture();
static GlobalFixture *lastGlobalFixture();
GlobalFixture *nextGlobalFixture();
diff --git a/test/cxxtest/cxxtest/Gui.h b/test/cxxtest/cxxtest/Gui.h
index f4560dedd1..2cc392a642 100644
--- a/test/cxxtest/cxxtest/Gui.h
+++ b/test/cxxtest/cxxtest/Gui.h
@@ -20,15 +20,15 @@ namespace CxxTest
{
enterGui( argc, argv );
TestRunner::runAllTests( listener );
- leaveGui();
+ leaveGui();
}
virtual void enterGui( int & /*argc*/, char ** /*argv*/ ) {}
virtual void leaveGui() {}
-
+
//
// The easy way is to implement these functions:
- //
+ //
virtual void guiEnterWorld( unsigned /*numTotalTests*/ ) {}
virtual void guiEnterSuite( const char * /*suiteName*/ ) {}
virtual void guiEnterTest( const char * /*suiteName*/, const char * /*testName*/ ) {}
@@ -44,22 +44,22 @@ namespace CxxTest
void leaveTest( const TestDescription & ) {}
void leaveSuite( const SuiteDescription & ) {}
void leaveWorld( const WorldDescription & ) {}
-
+
void warning( const char * /*file*/, unsigned /*line*/, const char * /*expression*/ )
{
yellowBarSafe();
}
-
+
void failedTest( const char * /*file*/, unsigned /*line*/, const char * /*expression*/ )
{
redBarSafe();
}
-
+
void failedAssert( const char * /*file*/, unsigned /*line*/, const char * /*expression*/ )
{
redBarSafe();
}
-
+
void failedAssertEquals( const char * /*file*/, unsigned /*line*/,
const char * /*xStr*/, const char * /*yStr*/,
const char * /*x*/, const char * /*y*/ )
@@ -74,55 +74,55 @@ namespace CxxTest
{
redBarSafe();
}
-
+
void failedAssertDelta( const char * /*file*/, unsigned /*line*/,
const char * /*xStr*/, const char * /*yStr*/, const char * /*dStr*/,
const char * /*x*/, const char * /*y*/, const char * /*d*/ )
{
redBarSafe();
}
-
+
void failedAssertDiffers( const char * /*file*/, unsigned /*line*/,
const char * /*xStr*/, const char * /*yStr*/,
const char * /*value*/ )
{
redBarSafe();
}
-
+
void failedAssertLessThan( const char * /*file*/, unsigned /*line*/,
const char * /*xStr*/, const char * /*yStr*/,
const char * /*x*/, const char * /*y*/ )
{
redBarSafe();
}
-
+
void failedAssertLessThanEquals( const char * /*file*/, unsigned /*line*/,
const char * /*xStr*/, const char * /*yStr*/,
const char * /*x*/, const char * /*y*/ )
{
redBarSafe();
}
-
+
void failedAssertPredicate( const char * /*file*/, unsigned /*line*/,
const char * /*predicate*/, const char * /*xStr*/, const char * /*x*/ )
{
redBarSafe();
}
-
+
void failedAssertRelation( const char * /*file*/, unsigned /*line*/,
const char * /*relation*/, const char * /*xStr*/, const char * /*yStr*/,
const char * /*x*/, const char * /*y*/ )
{
redBarSafe();
}
-
+
void failedAssertThrows( const char * /*file*/, unsigned /*line*/,
const char * /*expression*/, const char * /*type*/,
bool /*otherThrown*/ )
{
redBarSafe();
}
-
+
void failedAssertThrowsNot( const char * /*file*/, unsigned /*line*/,
const char * /*expression*/ )
{
@@ -145,7 +145,7 @@ namespace CxxTest
_state = RED_BAR;
}
}
-
+
private:
enum { GREEN_BAR, YELLOW_BAR, RED_BAR } _state;
};
@@ -157,12 +157,12 @@ namespace CxxTest
char **_argv;
GuiT _gui;
TuiT _tui;
-
+
public:
GuiTuiRunner( int &argc, char **argv ) :
_argc( argc ),
_argv( argv )
- {
+ {
setFirst( _gui );
setSecond( _tui );
}
diff --git a/test/cxxtest/cxxtest/LinkedList.cpp b/test/cxxtest/cxxtest/LinkedList.cpp
index c4623e91c6..1cea5028cc 100644
--- a/test/cxxtest/cxxtest/LinkedList.cpp
+++ b/test/cxxtest/cxxtest/LinkedList.cpp
@@ -12,7 +12,7 @@ namespace CxxTest
{
_head = _tail = 0;
}
-
+
Link *List::head()
{
Link *l = _head;
@@ -89,12 +89,12 @@ namespace CxxTest
Link::~Link()
{
}
-
+
bool Link::active() const
{
return _active;
}
-
+
void Link::setActive( bool value )
{
_active = value;
@@ -104,12 +104,12 @@ namespace CxxTest
{
return _next;
}
-
+
Link * Link::justPrev()
{
return _prev;
}
-
+
Link * Link::next()
{
Link *l = _next;
@@ -117,7 +117,7 @@ namespace CxxTest
l = l->_next;
return l;
}
-
+
Link * Link::prev()
{
Link *l = _prev;
@@ -125,7 +125,7 @@ namespace CxxTest
l = l->_prev;
return l;
}
-
+
const Link * Link::next() const
{
Link *l = _next;
@@ -133,7 +133,7 @@ namespace CxxTest
l = l->_next;
return l;
}
-
+
const Link * Link::prev() const
{
Link *l = _prev;
@@ -141,7 +141,7 @@ namespace CxxTest
l = l->_prev;
return l;
}
-
+
void Link::attach( List &l )
{
if ( l._tail )
@@ -149,7 +149,7 @@ namespace CxxTest
_prev = l._tail;
_next = 0;
-
+
if ( l._head == 0 )
l._head = this;
l._tail = this;
@@ -161,7 +161,7 @@ namespace CxxTest
_prev->_next = _next;
else
l._head = _next;
-
+
if ( _next )
_next->_prev = _prev;
else
diff --git a/test/cxxtest/cxxtest/LinkedList.h b/test/cxxtest/cxxtest/LinkedList.h
index 983a6e244c..bb5e842c97 100644
--- a/test/cxxtest/cxxtest/LinkedList.h
+++ b/test/cxxtest/cxxtest/LinkedList.h
@@ -3,7 +3,7 @@
#include <cxxtest/Flags.h>
-namespace CxxTest
+namespace CxxTest
{
struct List;
class Link;
@@ -29,7 +29,7 @@ namespace CxxTest
};
class Link
- {
+ {
public:
Link();
virtual ~Link();
@@ -39,7 +39,7 @@ namespace CxxTest
Link *justNext();
Link *justPrev();
-
+
Link *next();
Link *prev();
const Link *next() const;
diff --git a/test/cxxtest/cxxtest/ParenPrinter.h b/test/cxxtest/cxxtest/ParenPrinter.h
index 9ecf310532..1db54fc5a3 100644
--- a/test/cxxtest/cxxtest/ParenPrinter.h
+++ b/test/cxxtest/cxxtest/ParenPrinter.h
@@ -9,7 +9,7 @@
#include <cxxtest/ErrorPrinter.h>
-namespace CxxTest
+namespace CxxTest
{
class ParenPrinter : public ErrorPrinter
{
diff --git a/test/cxxtest/cxxtest/QtGui.h b/test/cxxtest/cxxtest/QtGui.h
index 4a8f25b5bc..0fd7bcd08e 100644
--- a/test/cxxtest/cxxtest/QtGui.h
+++ b/test/cxxtest/cxxtest/QtGui.h
@@ -4,7 +4,7 @@
//
// The QtGui displays a simple progress bar using the Qt Toolkit. It
// has been tested with versions 2.x and 3.x.
-//
+//
// Apart from normal Qt command-line arguments, it accepts the following options:
// -minimized Start minimized, pop up on error
// -keep Don't close the window at the end
@@ -63,7 +63,7 @@ namespace CxxTest
getTotalTests();
processEvents();
}
-
+
void redBar()
{
if ( _startMinimized && _mainWindow->isMinimized() )
@@ -100,7 +100,7 @@ namespace CxxTest
{
_startMinimized = _keep = false;
_title = argv[0];
-
+
for ( int i = 1; i < argc; ++ i ) {
QString arg( argv[i] );
if ( arg == "-minimized" )
@@ -115,11 +115,11 @@ namespace CxxTest
void createApplication( int &argc, char **argv )
{
_application = new QApplication( argc, argv );
- }
-
+ }
+
void createWindow( const WorldDescription &wd )
{
- getTotalTests( wd );
+ getTotalTests( wd );
createMainWindow();
createProgressBar();
createStatusBar();
@@ -236,7 +236,7 @@ namespace CxxTest
QWidget *desktop = QApplication::desktop();
int xCenter = desktop->x() + (desktop->width() / 2);
int yCenter = desktop->y() + (desktop->height() / 2);
-
+
int windowWidth = (desktop->width() * 4) / 5;
int windowHeight = _mainWindow->height();
_mainWindow->setGeometry( xCenter - (windowWidth / 2), yCenter - (windowHeight / 2), windowWidth, windowHeight );
diff --git a/test/cxxtest/cxxtest/RealDescriptions.cpp b/test/cxxtest/cxxtest/RealDescriptions.cpp
index 1e21ca7625..234622cbbf 100644
--- a/test/cxxtest/cxxtest/RealDescriptions.cpp
+++ b/test/cxxtest/cxxtest/RealDescriptions.cpp
@@ -8,12 +8,12 @@
#include <cxxtest/RealDescriptions.h>
-namespace CxxTest
+namespace CxxTest
{
RealTestDescription::RealTestDescription()
{
}
-
+
RealTestDescription::RealTestDescription( List &argList,
SuiteDescription &argSuite,
unsigned argLine,
@@ -32,7 +32,7 @@ namespace CxxTest
_testName = argTestName;
attach( argList );
}
-
+
bool RealTestDescription::setUp()
{
if ( !suite() )
@@ -97,7 +97,7 @@ namespace CxxTest
_TS_CATCH_ABORT( {} )
___TSM_CATCH( file(), line(), "Exception thrown from test" );
}
-
+
RealSuiteDescription::RealSuiteDescription() {}
RealSuiteDescription::RealSuiteDescription( const char *argFile,
unsigned argLine,
@@ -116,7 +116,7 @@ namespace CxxTest
_line = argLine;
_suiteName = argSuiteName;
_tests = &argTests;
-
+
attach( _suites );
}
@@ -128,9 +128,9 @@ namespace CxxTest
const TestDescription *RealSuiteDescription::firstTest() const { return (const RealTestDescription *)_tests->head(); }
SuiteDescription *RealSuiteDescription::next() { return (RealSuiteDescription *)Link::next(); }
const SuiteDescription *RealSuiteDescription::next() const { return (const RealSuiteDescription *)Link::next(); }
-
+
unsigned RealSuiteDescription::numTests() const { return _tests->size(); }
-
+
const TestDescription &RealSuiteDescription::testDescription( unsigned i ) const
{
return *(RealTestDescription *)_tests->nth( i );
@@ -140,7 +140,7 @@ namespace CxxTest
{
_tests->activateAll();
}
-
+
bool RealSuiteDescription::leaveOnly( const char *testName )
{
for ( TestDescription *td = firstTest(); td != 0; td = td->next() ) {
@@ -149,9 +149,9 @@ namespace CxxTest
return true;
}
}
- return false;
+ return false;
}
-
+
StaticSuiteDescription::StaticSuiteDescription() {}
StaticSuiteDescription::StaticSuiteDescription( const char *argFile, unsigned argLine,
const char *argSuiteName, TestSuite &argSuite,
@@ -168,7 +168,7 @@ namespace CxxTest
RealSuiteDescription::initialize( argFile, argLine, argSuiteName, argTests );
doInitialize( argSuite );
}
-
+
void StaticSuiteDescription::doInitialize( TestSuite &argSuite )
{
_suite = &argSuite;
@@ -204,17 +204,17 @@ namespace CxxTest
_createLine = argCreateLine;
_destroyLine = argDestroyLine;
}
-
+
List &RealWorldDescription::suites()
{
return RealSuiteDescription::_suites;
}
-
+
unsigned RealWorldDescription::numSuites( void ) const
{
return suites().size();
}
-
+
unsigned RealWorldDescription::numTotalTests( void ) const
{
unsigned count = 0;
@@ -222,7 +222,7 @@ namespace CxxTest
count += sd->numTests();
return count;
}
-
+
SuiteDescription *RealWorldDescription::firstSuite()
{
return (RealSuiteDescription *)suites().head();
@@ -258,7 +258,7 @@ namespace CxxTest
}
return false;
}
-
+
bool RealWorldDescription::setUp()
{
for ( GlobalFixture *gf = GlobalFixture::firstGlobalFixture(); gf != 0; gf = gf->nextGlobalFixture() ) {
diff --git a/test/cxxtest/cxxtest/RealDescriptions.h b/test/cxxtest/cxxtest/RealDescriptions.h
index 14c457de7e..ad455db0c2 100644
--- a/test/cxxtest/cxxtest/RealDescriptions.h
+++ b/test/cxxtest/cxxtest/RealDescriptions.h
@@ -9,7 +9,7 @@
#include <cxxtest/TestSuite.h>
#include <cxxtest/GlobalFixture.h>
-namespace CxxTest
+namespace CxxTest
{
class RealTestDescription : public TestDescription
{
@@ -17,7 +17,7 @@ namespace CxxTest
RealTestDescription();
RealTestDescription( List &argList, SuiteDescription &argSuite, unsigned argLine, const char *argTestName );
void initialize( List &argList, SuiteDescription &argSuite, unsigned argLine, const char *argTestName );
-
+
const char *file() const;
unsigned line() const;
const char *testName() const;
@@ -29,15 +29,15 @@ namespace CxxTest
TestSuite *suite() const;
bool setUp();
- void run();
+ void run();
bool tearDown();
-
+
private:
RealTestDescription( const RealTestDescription & );
RealTestDescription &operator=( const RealTestDescription & );
virtual void runTest() = 0;
-
+
SuiteDescription *_suite;
unsigned _line;
const char *_testName;
@@ -48,7 +48,7 @@ namespace CxxTest
public:
RealSuiteDescription();
RealSuiteDescription( const char *argFile, unsigned argLine, const char *argSuiteName, List &argTests );
-
+
void initialize( const char *argFile, unsigned argLine, const char *argSuiteName, List &argTests );
const char *file() const;
@@ -59,17 +59,17 @@ namespace CxxTest
const TestDescription *firstTest() const;
SuiteDescription *next();
const SuiteDescription *next() const;
-
+
unsigned numTests() const;
const TestDescription &testDescription( unsigned i ) const;
void activateAllTests();
bool leaveOnly( const char *testName );
-
+
private:
RealSuiteDescription( const RealSuiteDescription & );
RealSuiteDescription &operator=( const RealSuiteDescription & );
-
+
const char *_file;
unsigned _line;
const char *_suiteName;
@@ -91,16 +91,16 @@ namespace CxxTest
const char *argSuiteName, TestSuite &argSuite,
List &argTests );
TestSuite *suite() const;
-
+
bool setUp();
bool tearDown();
-
+
private:
StaticSuiteDescription( const StaticSuiteDescription & );
StaticSuiteDescription &operator=( const StaticSuiteDescription & );
void doInitialize( TestSuite &argSuite );
-
+
TestSuite *_suite;
};
@@ -122,7 +122,7 @@ namespace CxxTest
private:
void doInitialize( unsigned argCreateLine, unsigned argDestroyLine );
};
-
+
template<class S>
class DynamicSuiteDescription : public CommonDynamicSuiteDescription
{
@@ -152,7 +152,7 @@ namespace CxxTest
bool setUp();
bool tearDown();
-
+
private:
S *realSuite() const { return *_suite; }
void setSuite( S *s ) { *_suite = s; }
@@ -161,7 +161,7 @@ namespace CxxTest
{
setSuite( S::createSuite() );
}
-
+
void destroySuite()
{
S *s = realSuite();
@@ -189,7 +189,7 @@ namespace CxxTest
{
if ( !_suite )
return true;
-
+
_TS_TRY {
_TSM_ASSERT_THROWS_NOTHING( file(), _destroyLine, "destroySuite() failed", destroySuite() );
}
@@ -197,7 +197,7 @@ namespace CxxTest
return true;
}
-
+
class RealWorldDescription : public WorldDescription
{
public:
@@ -209,7 +209,7 @@ namespace CxxTest
const SuiteDescription &suiteDescription( unsigned i ) const;
void activateAllTests();
bool leaveOnly( const char *suiteName, const char *testName = 0 );
-
+
bool setUp();
bool tearDown();
static void reportError( const char *message );
diff --git a/test/cxxtest/cxxtest/StdValueTraits.h b/test/cxxtest/cxxtest/StdValueTraits.h
index ac1ee07e3e..70e36f504f 100644
--- a/test/cxxtest/cxxtest/StdValueTraits.h
+++ b/test/cxxtest/cxxtest/StdValueTraits.h
@@ -39,7 +39,7 @@ namespace CxxTest
private:
CXXTEST_STD(string) _s;
};
-
+
//
// std::string
//
@@ -107,7 +107,7 @@ namespace CxxTest
class ValueTraits< CXXTEST_STD(pair)<First, Second> > : public StdTraitsBase
{
public:
- ValueTraits( const CXXTEST_STD(pair)<First, Second> &p )
+ ValueTraits( const CXXTEST_STD(pair)<First, Second> &p )
{
*this << "<" << TS_AS_STRING( p.first ) << ", " << TS_AS_STRING( p.second ) << ">";
}
@@ -163,7 +163,7 @@ namespace CxxTest
{
dumpRange( *this, m.begin(), m.end() );
}
- };
+ };
//
// std::deque
diff --git a/test/cxxtest/cxxtest/StdioFilePrinter.h b/test/cxxtest/cxxtest/StdioFilePrinter.h
index 47984b69b9..33e0ca6c3a 100644
--- a/test/cxxtest/cxxtest/StdioFilePrinter.h
+++ b/test/cxxtest/cxxtest/StdioFilePrinter.h
@@ -11,7 +11,7 @@
#include <cxxtest/ErrorFormatter.h>
#include <stdio.h>
-namespace CxxTest
+namespace CxxTest
{
class StdioFilePrinter : public ErrorFormatter
{
@@ -25,9 +25,9 @@ namespace CxxTest
{
Adapter( const Adapter & );
Adapter &operator=( const Adapter & );
-
+
FILE *_o;
-
+
public:
Adapter( FILE *o ) : _o(o) {}
void flush() { fflush( _o ); }
diff --git a/test/cxxtest/cxxtest/StdioPrinter.h b/test/cxxtest/cxxtest/StdioPrinter.h
index af5bc6b639..2b89f38e8a 100644
--- a/test/cxxtest/cxxtest/StdioPrinter.h
+++ b/test/cxxtest/cxxtest/StdioPrinter.h
@@ -9,7 +9,7 @@
#include <cxxtest/StdioFilePrinter.h>
-namespace CxxTest
+namespace CxxTest
{
class StdioPrinter : public StdioFilePrinter
{
diff --git a/test/cxxtest/cxxtest/TeeListener.h b/test/cxxtest/cxxtest/TeeListener.h
index b65501a4c7..26d9e4e855 100644
--- a/test/cxxtest/cxxtest/TeeListener.h
+++ b/test/cxxtest/cxxtest/TeeListener.h
@@ -44,37 +44,37 @@ namespace CxxTest
_first->enterSuite( d );
_second->enterSuite( d );
}
-
+
void enterTest( const TestDescription &d )
{
_first->enterTest( d );
_second->enterTest( d );
}
-
+
void trace( const char *file, unsigned line, const char *expression )
{
_first->trace( file, line, expression );
_second->trace( file, line, expression );
}
-
+
void warning( const char *file, unsigned line, const char *expression )
{
_first->warning( file, line, expression );
_second->warning( file, line, expression );
}
-
+
void failedTest( const char *file, unsigned line, const char *expression )
{
_first->failedTest( file, line, expression );
_second->failedTest( file, line, expression );
}
-
+
void failedAssert( const char *file, unsigned line, const char *expression )
{
_first->failedAssert( file, line, expression );
_second->failedAssert( file, line, expression );
}
-
+
void failedAssertEquals( const char *file, unsigned line,
const char *xStr, const char *yStr,
const char *x, const char *y )
@@ -91,7 +91,7 @@ namespace CxxTest
_first->failedAssertSameData( file, line, xStr, yStr, sizeStr, x, y, size );
_second->failedAssertSameData( file, line, xStr, yStr, sizeStr, x, y, size );
}
-
+
void failedAssertDelta( const char *file, unsigned line,
const char *xStr, const char *yStr, const char *dStr,
const char *x, const char *y, const char *d )
@@ -99,7 +99,7 @@ namespace CxxTest
_first->failedAssertDelta( file, line, xStr, yStr, dStr, x, y, d );
_second->failedAssertDelta( file, line, xStr, yStr, dStr, x, y, d );
}
-
+
void failedAssertDiffers( const char *file, unsigned line,
const char *xStr, const char *yStr,
const char *value )
@@ -107,7 +107,7 @@ namespace CxxTest
_first->failedAssertDiffers( file, line, xStr, yStr, value );
_second->failedAssertDiffers( file, line, xStr, yStr, value );
}
-
+
void failedAssertLessThan( const char *file, unsigned line,
const char *xStr, const char *yStr,
const char *x, const char *y )
@@ -115,7 +115,7 @@ namespace CxxTest
_first->failedAssertLessThan( file, line, xStr, yStr, x, y );
_second->failedAssertLessThan( file, line, xStr, yStr, x, y );
}
-
+
void failedAssertLessThanEquals( const char *file, unsigned line,
const char *xStr, const char *yStr,
const char *x, const char *y )
@@ -123,14 +123,14 @@ namespace CxxTest
_first->failedAssertLessThanEquals( file, line, xStr, yStr, x, y );
_second->failedAssertLessThanEquals( file, line, xStr, yStr, x, y );
}
-
+
void failedAssertPredicate( const char *file, unsigned line,
const char *predicate, const char *xStr, const char *x )
{
_first->failedAssertPredicate( file, line, predicate, xStr, x );
_second->failedAssertPredicate( file, line, predicate, xStr, x );
}
-
+
void failedAssertRelation( const char *file, unsigned line,
const char *relation, const char *xStr, const char *yStr,
const char *x, const char *y )
@@ -138,7 +138,7 @@ namespace CxxTest
_first->failedAssertRelation( file, line, relation, xStr, yStr, x, y );
_second->failedAssertRelation( file, line, relation, xStr, yStr, x, y );
}
-
+
void failedAssertThrows( const char *file, unsigned line,
const char *expression, const char *type,
bool otherThrown )
@@ -146,26 +146,26 @@ namespace CxxTest
_first->failedAssertThrows( file, line, expression, type, otherThrown );
_second->failedAssertThrows( file, line, expression, type, otherThrown );
}
-
+
void failedAssertThrowsNot( const char *file, unsigned line,
const char *expression )
{
_first->failedAssertThrowsNot( file, line, expression );
_second->failedAssertThrowsNot( file, line, expression );
}
-
+
void leaveTest( const TestDescription &d )
{
_first->leaveTest(d);
_second->leaveTest(d);
}
-
+
void leaveSuite( const SuiteDescription &d )
{
_first->leaveSuite(d);
_second->leaveSuite(d);
}
-
+
void leaveWorld( const WorldDescription &d )
{
_first->leaveWorld(d);
diff --git a/test/cxxtest/cxxtest/TestListener.h b/test/cxxtest/cxxtest/TestListener.h
index 0eeb5234ea..982d66aa3d 100644
--- a/test/cxxtest/cxxtest/TestListener.h
+++ b/test/cxxtest/cxxtest/TestListener.h
@@ -19,7 +19,7 @@ namespace CxxTest
public:
TestListener() {}
virtual ~TestListener() {}
-
+
virtual void enterWorld( const WorldDescription & /*desc*/ ) {}
virtual void enterSuite( const SuiteDescription & /*desc*/ ) {}
virtual void enterTest( const TestDescription & /*desc*/ ) {}
diff --git a/test/cxxtest/cxxtest/TestRunner.h b/test/cxxtest/cxxtest/TestRunner.h
index cf0d856e83..b656188936 100644
--- a/test/cxxtest/cxxtest/TestRunner.h
+++ b/test/cxxtest/cxxtest/TestRunner.h
@@ -5,14 +5,14 @@
// TestRunner is the class that runs all the tests.
// To use it, create an object that implements the TestListener
// interface and call TestRunner::runAllTests( myListener );
-//
+//
#include <cxxtest/TestListener.h>
#include <cxxtest/RealDescriptions.h>
#include <cxxtest/TestSuite.h>
#include <cxxtest/TestTracker.h>
-namespace CxxTest
+namespace CxxTest
{
class TestRunner
{
@@ -31,29 +31,29 @@ namespace CxxTest
listener->warning( __FILE__, __LINE__, "Deprecated; Use runAllTests( TestListener & )" );
runAllTests( *listener );
}
- }
-
+ }
+
private:
void runWorld()
{
RealWorldDescription wd;
WorldGuard sg;
-
+
tracker().enterWorld( wd );
if ( wd.setUp() ) {
for ( SuiteDescription *sd = wd.firstSuite(); sd; sd = sd->next() )
if ( sd->active() )
runSuite( *sd );
-
+
wd.tearDown();
}
tracker().leaveWorld( wd );
}
-
+
void runSuite( SuiteDescription &sd )
{
StateGuard sg;
-
+
tracker().enterSuite( sd );
if ( sd.setUp() ) {
for ( TestDescription *td = sd.firstTest(); td; td = td->next() )
@@ -68,7 +68,7 @@ namespace CxxTest
void runTest( TestDescription &td )
{
StateGuard sg;
-
+
tracker().enterTest( td );
if ( td.setUp() ) {
td.run();
@@ -76,14 +76,14 @@ namespace CxxTest
}
tracker().leaveTest( td );
}
-
+
class StateGuard
{
#ifdef _CXXTEST_HAVE_EH
bool _abortTestOnFail;
#endif // _CXXTEST_HAVE_EH
unsigned _maxDumpSize;
-
+
public:
StateGuard()
{
@@ -92,7 +92,7 @@ namespace CxxTest
#endif // _CXXTEST_HAVE_EH
_maxDumpSize = maxDumpSize();
}
-
+
~StateGuard()
{
#ifdef _CXXTEST_HAVE_EH
diff --git a/test/cxxtest/cxxtest/TestSuite.cpp b/test/cxxtest/cxxtest/TestSuite.cpp
index 3a1c0d2c43..6810730b6d 100644
--- a/test/cxxtest/cxxtest/TestSuite.cpp
+++ b/test/cxxtest/cxxtest/TestSuite.cpp
@@ -26,7 +26,7 @@ namespace CxxTest
{
currentAbortTestOnFail = value;
}
-
+
void doAbortTest()
{
# if defined(_CXXTEST_HAVE_EH)
@@ -44,7 +44,7 @@ namespace CxxTest
{
return currentMaxDumpSize;
}
-
+
void setMaxDumpSize( unsigned value )
{
currentMaxDumpSize = value;
@@ -82,7 +82,7 @@ namespace CxxTest
{
if ( size == 0 )
return true;
-
+
if ( x == y )
return true;
@@ -119,7 +119,7 @@ namespace CxxTest
{
if ( message )
tracker().failedTest( file, line, message );
-
+
tracker().failedAssertThrows( file, line, expr, type, otherThrown );
TS_ABORT();
}
@@ -129,7 +129,7 @@ namespace CxxTest
{
if ( message )
tracker().failedTest( file, line, message );
-
+
tracker().failedAssertThrowsNot( file, line, expression );
TS_ABORT();
}
diff --git a/test/cxxtest/cxxtest/TestSuite.h b/test/cxxtest/cxxtest/TestSuite.h
index fc5a206a7d..79b7cda2e5 100644
--- a/test/cxxtest/cxxtest/TestSuite.h
+++ b/test/cxxtest/cxxtest/TestSuite.h
@@ -25,11 +25,11 @@ namespace CxxTest
virtual void setUp();
virtual void tearDown();
};
-
+
class AbortTest {};
void doAbortTest();
# define TS_ABORT() CxxTest::doAbortTest()
-
+
bool abortTestOnFail();
void setAbortTestOnFail( bool value = CXXTEST_DEFAULT_ABORT );
@@ -143,7 +143,7 @@ namespace CxxTest
template<class X, class Y, class R>
void doAssertRelation( const char *file, unsigned line,
- const char *rExpr, const R &r,
+ const char *rExpr, const R &r,
const char *xExpr, X x,
const char *yExpr, Y y,
const char *message )
@@ -172,7 +172,7 @@ namespace CxxTest
if ( !delta( x, y, d ) ) {
if ( message )
tracker().failedTest( file, line, message );
-
+
tracker().failedAssertDelta( file, line, xExpr, yExpr, dExpr,
TS_AS_STRING(x), TS_AS_STRING(y), TS_AS_STRING(d) );
TS_ABORT();
@@ -183,7 +183,7 @@ namespace CxxTest
const char *expr, const char *type,
bool otherThrown,
const char *message );
-
+
void doFailAssertThrowsNot( const char *file, unsigned line,
const char *expression, const char *message );
@@ -231,23 +231,23 @@ namespace CxxTest
// TS_ASSERT
# define ___ETS_ASSERT(f,l,e,m) { if ( !(e) ) CxxTest::doFailAssert( (f), (l), #e, (m) ); }
# define ___TS_ASSERT(f,l,e,m) { _TS_TRY { ___ETS_ASSERT(f,l,e,m); } __TS_CATCH(f,l) }
-
+
# define _ETS_ASSERT(f,l,e) ___ETS_ASSERT(f,l,e,0)
# define _TS_ASSERT(f,l,e) ___TS_ASSERT(f,l,e,0)
-
+
# define ETS_ASSERT(e) _ETS_ASSERT(__FILE__,__LINE__,e)
# define TS_ASSERT(e) _TS_ASSERT(__FILE__,__LINE__,e)
-
+
# define _ETSM_ASSERT(f,l,m,e) ___ETS_ASSERT(f,l,e,TS_AS_STRING(m) )
# define _TSM_ASSERT(f,l,m,e) ___TS_ASSERT(f,l,e,TS_AS_STRING(m) )
# define ETSM_ASSERT(m,e) _ETSM_ASSERT(__FILE__,__LINE__,m,e)
# define TSM_ASSERT(m,e) _TSM_ASSERT(__FILE__,__LINE__,m,e)
-
+
// TS_ASSERT_EQUALS
# define ___ETS_ASSERT_EQUALS(f,l,x,y,m) CxxTest::doAssertEquals( (f), (l), #x, (x), #y, (y), (m) )
# define ___TS_ASSERT_EQUALS(f,l,x,y,m) { _TS_TRY { ___ETS_ASSERT_EQUALS(f,l,x,y,m); } __TS_CATCH(f,l) }
-
+
# define _ETS_ASSERT_EQUALS(f,l,x,y) ___ETS_ASSERT_EQUALS(f,l,x,y,0)
# define _TS_ASSERT_EQUALS(f,l,x,y) ___TS_ASSERT_EQUALS(f,l,x,y,0)
@@ -263,7 +263,7 @@ namespace CxxTest
// TS_ASSERT_SAME_DATA
# define ___ETS_ASSERT_SAME_DATA(f,l,x,y,s,m) CxxTest::doAssertSameData( (f), (l), #x, (x), #y, (y), #s, (s), (m) )
# define ___TS_ASSERT_SAME_DATA(f,l,x,y,s,m) { _TS_TRY { ___ETS_ASSERT_SAME_DATA(f,l,x,y,s,m); } __TS_CATCH(f,l) }
-
+
# define _ETS_ASSERT_SAME_DATA(f,l,x,y,s) ___ETS_ASSERT_SAME_DATA(f,l,x,y,s,0)
# define _TS_ASSERT_SAME_DATA(f,l,x,y,s) ___TS_ASSERT_SAME_DATA(f,l,x,y,s,0)
@@ -365,7 +365,7 @@ namespace CxxTest
// TS_ASSERT_DELTA
# define ___ETS_ASSERT_DELTA(f,l,x,y,d,m) CxxTest::doAssertDelta( (f), (l), #x, (x), #y, (y), #d, (d), (m) )
# define ___TS_ASSERT_DELTA(f,l,x,y,d,m) { _TS_TRY { ___ETS_ASSERT_DELTA(f,l,x,y,d,m); } __TS_CATCH(f,l) }
-
+
# define _ETS_ASSERT_DELTA(f,l,x,y,d) ___ETS_ASSERT_DELTA(f,l,x,y,d,0)
# define _TS_ASSERT_DELTA(f,l,x,y,d) ___TS_ASSERT_DELTA(f,l,x,y,d,0)
@@ -494,13 +494,13 @@ namespace CxxTest
CXXTEST_COMPARISONS( signed CXXTEST_SMALL, unsigned CXXTEST_BIG, unsigned CXXTEST_BIG ) \
CXXTEST_COMPARISONS( signed CXXTEST_BIG, unsigned CXXTEST_SMALL, unsigned CXXTEST_BIG )
- CXXTEST_SMALL_BIG( char, short )
+ CXXTEST_SMALL_BIG( char, short )
CXXTEST_SMALL_BIG( char, int )
CXXTEST_SMALL_BIG( short, int )
CXXTEST_SMALL_BIG( char, long )
CXXTEST_SMALL_BIG( short, long )
CXXTEST_SMALL_BIG( int, long )
-
+
# ifdef _CXXTEST_LONGLONG
CXXTEST_SMALL_BIG( char, _CXXTEST_LONGLONG )
CXXTEST_SMALL_BIG( short, _CXXTEST_LONGLONG )
diff --git a/test/cxxtest/cxxtest/TestTracker.cpp b/test/cxxtest/cxxtest/TestTracker.cpp
index a029835e47..79fc1ced59 100644
--- a/test/cxxtest/cxxtest/TestTracker.cpp
+++ b/test/cxxtest/cxxtest/TestTracker.cpp
@@ -18,7 +18,7 @@ namespace CxxTest
TestTracker::~TestTracker()
{
}
-
+
TestTracker & TestTracker::tracker()
{
static TestTracker theTracker;
@@ -42,27 +42,27 @@ namespace CxxTest
{
return d ? d : &dummyTest();
}
-
+
const SuiteDescription *TestTracker::fixSuite( const SuiteDescription *d ) const
{
return d ? d : &dummySuite();
}
-
+
const WorldDescription *TestTracker::fixWorld( const WorldDescription *d ) const
{
return d ? d : &dummyWorld();
}
-
+
const TestDescription &TestTracker::dummyTest() const
{
return dummySuite().testDescription(0);
}
-
+
const SuiteDescription &TestTracker::dummySuite() const
{
return dummyWorld().suiteDescription(0);
}
-
+
const WorldDescription &TestTracker::dummyWorld() const
{
return _dummyWorld;
@@ -86,7 +86,7 @@ namespace CxxTest
_testFailedAsserts = _suiteFailedTests = 0;
_l->enterSuite(sd);
}
-
+
void TestTracker::enterTest( const TestDescription &td )
{
setTest( &td );
@@ -128,7 +128,7 @@ namespace CxxTest
countFailure();
_l->failedTest( file, line, expression );
}
-
+
void TestTracker::failedAssert( const char *file, unsigned line, const char *expression )
{
countFailure();
@@ -159,7 +159,7 @@ namespace CxxTest
countFailure();
_l->failedAssertDelta( file, line, xStr, yStr, dStr, x, y, d );
}
-
+
void TestTracker::failedAssertDiffers( const char *file, unsigned line,
const char *xStr, const char *yStr,
const char *value )
@@ -167,7 +167,7 @@ namespace CxxTest
countFailure();
_l->failedAssertDiffers( file, line, xStr, yStr, value );
}
-
+
void TestTracker::failedAssertLessThan( const char *file, unsigned line,
const char *xStr, const char *yStr,
const char *x, const char *y )
@@ -190,7 +190,7 @@ namespace CxxTest
countFailure();
_l->failedAssertPredicate( file, line, predicate, xStr, x );
}
-
+
void TestTracker::failedAssertRelation( const char *file, unsigned line,
const char *relation, const char *xStr, const char *yStr,
const char *x, const char *y )
@@ -198,7 +198,7 @@ namespace CxxTest
countFailure();
_l->failedAssertRelation( file, line, relation, xStr, yStr, x, y );
}
-
+
void TestTracker::failedAssertThrows( const char *file, unsigned line,
const char *expression, const char *type,
bool otherThrown )
@@ -206,7 +206,7 @@ namespace CxxTest
countFailure();
_l->failedAssertThrows( file, line, expression, type, otherThrown );
}
-
+
void TestTracker::failedAssertThrowsNot( const char *file, unsigned line, const char *expression )
{
countFailure();
diff --git a/test/cxxtest/cxxtest/TestTracker.h b/test/cxxtest/cxxtest/TestTracker.h
index 3f77ae410a..c788206be4 100644
--- a/test/cxxtest/cxxtest/TestTracker.h
+++ b/test/cxxtest/cxxtest/TestTracker.h
@@ -13,12 +13,12 @@
namespace CxxTest
{
class TestListener;
-
+
class TestTracker : public TestListener
{
public:
virtual ~TestTracker();
-
+
static TestTracker &tracker();
const TestDescription *fixTest( const TestDescription *d ) const;
@@ -28,11 +28,11 @@ namespace CxxTest
const TestDescription &test() const { return *_test; }
const SuiteDescription &suite() const { return *_suite; }
const WorldDescription &world() const { return *_world; }
-
+
bool testFailed() const { return (testFailedAsserts() > 0); }
bool suiteFailed() const { return (suiteFailedTests() > 0); }
bool worldFailed() const { return (failedSuites() > 0); }
-
+
unsigned warnings() const { return _warnings; }
unsigned failedTests() const { return _failedTests; }
unsigned testFailedAsserts() const { return _testFailedAsserts; }
@@ -77,7 +77,7 @@ namespace CxxTest
const char *expression, const char *type,
bool otherThrown );
void failedAssertThrowsNot( const char *file, unsigned line, const char *expression );
-
+
private:
TestTracker( const TestTracker & );
TestTracker &operator=( const TestTracker & );
@@ -94,7 +94,7 @@ namespace CxxTest
const TestDescription &dummyTest() const;
const SuiteDescription &dummySuite() const;
const WorldDescription &dummyWorld() const;
-
+
void setWorld( const WorldDescription *w );
void setSuite( const SuiteDescription *s );
void setTest( const TestDescription *t );
@@ -102,7 +102,7 @@ namespace CxxTest
void countFailure();
friend class TestRunner;
-
+
TestTracker();
void initialize();
void setListener( TestListener *l );
diff --git a/test/cxxtest/cxxtest/ValueTraits.cpp b/test/cxxtest/cxxtest/ValueTraits.cpp
index 5f81e386fa..fd669eecd9 100644
--- a/test/cxxtest/cxxtest/ValueTraits.cpp
+++ b/test/cxxtest/cxxtest/ValueTraits.cpp
@@ -3,12 +3,12 @@
#include <cxxtest/ValueTraits.h>
-namespace CxxTest
+namespace CxxTest
{
//
// Non-inline functions from ValueTraits.h
//
-
+
char digitToChar( unsigned digit )
{
if ( digit < 10 )
@@ -26,7 +26,7 @@ namespace CxxTest
asHex[2] = '\0';
return asHex;
}
-
+
char *copyString( char *dst, const char *src )
{
while ( (*dst = *src) != '\0' ) {
@@ -78,13 +78,13 @@ namespace CxxTest
{
return charToString( (unsigned long)(unsigned char)c, s );
}
-
+
char *bytesToString( const unsigned char *bytes, unsigned numBytes, unsigned maxBytes, char *s )
{
bool truncate = (numBytes > maxBytes);
if ( truncate )
numBytes = maxBytes;
-
+
s = copyString( s, "{ " );
for ( unsigned i = 0; i < numBytes; ++ i, ++ bytes )
s = copyString( copyString( s, byteToHex( *bytes ) ), " " );
@@ -120,7 +120,7 @@ namespace CxxTest
s = copyString( s, "E" );
s = numberToString( requiredDigitsOnLeft( t ) - 1, s );
}
-
+
void ValueTraits<const double>::normalNumber( double t )
{
char *s = doNegative( t );
diff --git a/test/cxxtest/cxxtest/ValueTraits.h b/test/cxxtest/cxxtest/ValueTraits.h
index 31035e88cc..339a345029 100644
--- a/test/cxxtest/cxxtest/ValueTraits.h
+++ b/test/cxxtest/cxxtest/ValueTraits.h
@@ -4,7 +4,7 @@
//
// ValueTraits are used by CxxTest to convert arbitrary
// values used in TS_ASSERT_EQUALS() to a string representation.
-//
+//
// This header file contains value traits for builtin integral types.
// To declare value traits for new types you should instantiate the class
// ValueTraits<YourClass>.
@@ -18,7 +18,7 @@
# define CXXTEST_TEMPLATE_INSTANTIATION template<>
#endif // _CXXTEST_OLD_TEMPLATE_SYNTAX
-namespace CxxTest
+namespace CxxTest
{
//
// This is how we use the value traits
@@ -75,11 +75,11 @@ namespace CxxTest
{
enum { MAX_BYTES = 8 };
char _asString[sizeof("{ ") + sizeof("XX ") * MAX_BYTES + sizeof("... }")];
-
+
public:
ValueTraits( const T &t ) { bytesToString( (const unsigned char *)&t, sizeof(T), MAX_BYTES, _asString ); }
const char *asString( void ) const { return _asString; }
- };
+ };
//
// traits( T t )
@@ -112,7 +112,7 @@ namespace CxxTest
# else // !_CXXTEST_NO_COPY_CONST
# define CXXTEST_COPY_CONST_TRAITS(CXXTEST_CLASS) CXXTEST_COPY_TRAITS(CXXTEST_CLASS, const CXXTEST_CLASS)
# endif // _CXXTEST_NO_COPY_CONST
-
+
//
// Avoid compiler warnings about unsigned types always >= 0
//
@@ -149,7 +149,7 @@ namespace CxxTest
*s++ = '-';
n = abs(n);
}
-
+
N digit = 1;
while ( digit <= (n / base) )
digit *= base;
@@ -167,7 +167,7 @@ namespace CxxTest
// All the specific ValueTraits follow.
// You can #define CXXTEST_USER_VALUE_TRAITS if you don't want them
//
-
+
#ifndef CXXTEST_USER_VALUE_TRAITS
//
// ValueTraits: const char * const &
@@ -178,7 +178,7 @@ namespace CxxTest
{
ValueTraits &operator=( const ValueTraits & );
const char *_asString;
-
+
public:
ValueTraits( const char * const &value ) : _asString( value ) {}
ValueTraits( const ValueTraits &other ) : _asString( other._asString ) {}
@@ -190,12 +190,12 @@ namespace CxxTest
//
// ValueTraits: bool
- //
+ //
CXXTEST_TEMPLATE_INSTANTIATION
class ValueTraits<const bool>
{
bool _value;
-
+
public:
ValueTraits( const bool value ) : _value( value ) {}
const char *asString( void ) const { return _value ? "true" : "false"; }
@@ -249,7 +249,7 @@ namespace CxxTest
};
CXXTEST_COPY_CONST_TRAITS( signed long int );
-
+
//
// ValueTraits: unsigned long
//
@@ -264,17 +264,17 @@ namespace CxxTest
};
CXXTEST_COPY_CONST_TRAITS( unsigned long int );
-
+
//
// All decimals are the same as the long version
//
-
+
CXXTEST_COPY_TRAITS( const signed int, const signed long int );
CXXTEST_COPY_TRAITS( const unsigned int, const unsigned long int );
CXXTEST_COPY_TRAITS( const signed short int, const signed long int );
CXXTEST_COPY_TRAITS( const unsigned short int, const unsigned long int );
CXXTEST_COPY_TRAITS( const unsigned char, const unsigned long int );
-
+
CXXTEST_COPY_CONST_TRAITS( signed int );
CXXTEST_COPY_CONST_TRAITS( unsigned int );
CXXTEST_COPY_CONST_TRAITS( signed short int );
@@ -310,7 +310,7 @@ namespace CxxTest
class ValueTraits<const double>
{
public:
- ValueTraits( double t )
+ ValueTraits( double t )
{
( requiredDigitsOnLeft( t ) > MAX_DIGITS_ON_LEFT ) ?
hugeNumber( t ) :
@@ -318,7 +318,7 @@ namespace CxxTest
}
const char *asString( void ) const { return _asString; }
-
+
private:
enum { MAX_DIGITS_ON_LEFT = 24, DIGITS_ON_RIGHT = 4, BASE = 10 };
char _asString[1 + MAX_DIGITS_ON_LEFT + 1 + DIGITS_ON_RIGHT + 1];
diff --git a/test/cxxtest/cxxtest/Win32Gui.h b/test/cxxtest/cxxtest/Win32Gui.h
index 7b37ceccbc..5fe38d3202 100644
--- a/test/cxxtest/cxxtest/Win32Gui.h
+++ b/test/cxxtest/cxxtest/Win32Gui.h
@@ -31,7 +31,7 @@ namespace CxxTest
{
parseCommandLine( argc, argv );
}
-
+
void enterWorld( const WorldDescription &wd )
{
getTotalTests( wd );
@@ -61,7 +61,7 @@ namespace CxxTest
setIcon( IDI_WARNING );
getTotalTests();
}
-
+
void redBar()
{
if ( _startMinimized )
@@ -90,11 +90,11 @@ namespace CxxTest
HANDLE _canStartTests;
unsigned _numTotalTests, _testsDone;
char _strTotalTests[WorldDescription::MAX_STRLEN_TOTAL_TESTS];
- enum {
+ enum {
STATUS_SUITE_NAME, STATUS_SUITE_TIME,
STATUS_TEST_NAME, STATUS_TEST_TIME,
STATUS_TESTS_DONE, STATUS_WORLD_TIME,
- STATUS_TOTAL_PARTS
+ STATUS_TOTAL_PARTS
};
int _statusWidths[STATUS_TOTAL_PARTS];
unsigned _statusOffsets[STATUS_TOTAL_PARTS];
@@ -107,7 +107,7 @@ namespace CxxTest
{
_startMinimized = _keep = false;
_title = argv[0];
-
+
for ( int i = 1; i < argc; ++ i )
{
if ( !lstrcmpA( argv[i], "-minimized" ) )
@@ -118,7 +118,7 @@ namespace CxxTest
_title = argv[++i];
}
}
-
+
void getTotalTests()
{
getTotalTests( tracker().world() );
@@ -187,7 +187,7 @@ namespace CxxTest
HMODULE dll = LoadLibraryA( "comctl32.dll" );
if ( !dll )
return;
-
+
typedef void (WINAPI *FUNC)( void );
FUNC func = (FUNC)GetProcAddress( dll, "InitCommonControls" );
if ( !func )
@@ -394,7 +394,7 @@ namespace CxxTest
progressBarMessage( PBM_SETBARCOLOR, 0, RGB( red, green, blue ) );
}
#else // !PBM_SETBARCOLOR
- void setColor( BYTE, BYTE, BYTE )
+ void setColor( BYTE, BYTE, BYTE )
{
}
#endif // PBM_SETBARCOLOR
@@ -500,7 +500,7 @@ namespace CxxTest
{
setRatios( 0, 0, 0, 0, 1, 1 );
resizeControls();
-
+
const char *tests = (_numTotalTests == 1) ? "test" : "tests";
if ( tracker().failedTests() )
wsprintfA( _statusTestsDone, "Failed %u of %s %s",
diff --git a/test/cxxtest/cxxtest/X11Gui.h b/test/cxxtest/cxxtest/X11Gui.h
index ed76db4dab..40a9e075dc 100644
--- a/test/cxxtest/cxxtest/X11Gui.h
+++ b/test/cxxtest/cxxtest/X11Gui.h
@@ -3,7 +3,7 @@
//
// X11Gui displays a simple progress bar using X11
-//
+//
// It accepts the following command-line arguments:
// -title <title> - Sets the application title
// -fn or -font <font> - Sets the font
@@ -29,7 +29,7 @@ namespace CxxTest
{
parseCommandLine( argc, argv );
}
-
+
void enterWorld( const WorldDescription &wd )
{
openDisplay();
@@ -44,7 +44,7 @@ namespace CxxTest
processEvents();
}
}
-
+
void guiEnterTest( const char *suiteName, const char *testName )
{
if ( _display ) {
@@ -53,7 +53,7 @@ namespace CxxTest
redraw();
}
}
-
+
void yellowBar()
{
if ( _display ) {
@@ -148,7 +148,7 @@ namespace CxxTest
XAllocColor( _display, _colormap, &color );
return color.pixel;
}
-
+
void createWindow()
{
_window = XCreateSimpleWindow( _display, RootWindow( _display, 0 ), 0, 0, 1, 1, 0, 0, _background );
@@ -218,7 +218,7 @@ namespace CxxTest
void centerWindow()
{
XMapWindow( _display, _window );
-
+
Screen *screen = XDefaultScreenOfDisplay( _display );
int screenWidth = WidthOfScreen( screen );
int screenHeight = HeightOfScreen( screen );
@@ -227,14 +227,14 @@ namespace CxxTest
_width = (screenWidth * 4) / 5;
_height = screenHeight / 14;
-
+
XMoveResizeWindow( _display, _window, xCenter - (_width / 2), yCenter - (_height / 2), _width, _height );
}
void processEvents()
{
redraw();
-
+
XEvent event;
while( XCheckMaskEvent( _display, _eventMask, &event ) )
redraw();
@@ -290,7 +290,7 @@ namespace CxxTest
void drawPercentage()
{
XSetForeground( _display, _gc, _foreground );
-
+
char str[sizeof("1000000000 of ") + sizeof(_strTotalTests) + sizeof(" (100%)")];
sprintf( str, "%u of %s (%u%%)", _testsDone, _strTotalTests, (_testsDone * 100) / _numTotalTests );
unsigned len = strlen( str );
diff --git a/test/cxxtest/cxxtest/YesNoRunner.h b/test/cxxtest/cxxtest/YesNoRunner.h
index e7b83b6bb8..c8e891da46 100644
--- a/test/cxxtest/cxxtest/YesNoRunner.h
+++ b/test/cxxtest/cxxtest/YesNoRunner.h
@@ -9,7 +9,7 @@
#include <cxxtest/TestRunner.h>
#include <cxxtest/TestListener.h>
-namespace CxxTest
+namespace CxxTest
{
class YesNoRunner : public TestListener
{
@@ -17,7 +17,7 @@ namespace CxxTest
YesNoRunner()
{
}
-
+
int run()
{
TestRunner::runAllTests( *this );
diff --git a/test/cxxtest/sample/CreatedTest.h b/test/cxxtest/sample/CreatedTest.h
index 53a6821a21..fe6cce4450 100644
--- a/test/cxxtest/sample/CreatedTest.h
+++ b/test/cxxtest/sample/CreatedTest.h
@@ -17,7 +17,7 @@ class CreatedTest : public CxxTest::TestSuite
public:
CreatedTest( unsigned size ) : _buffer( new char[size] ) {}
virtual ~CreatedTest() { delete[] _buffer; }
-
+
static CreatedTest *createSuite() { return new CreatedTest( 16 ); }
static void destroySuite( CreatedTest *suite ) { delete suite; }
diff --git a/test/cxxtest/sample/DeltaTest.h b/test/cxxtest/sample/DeltaTest.h
index 7223c3af25..5b2dd7c155 100644
--- a/test/cxxtest/sample/DeltaTest.h
+++ b/test/cxxtest/sample/DeltaTest.h
@@ -7,7 +7,7 @@
class DeltaTest : public CxxTest::TestSuite
{
double _pi, _delta;
-
+
public:
void setUp()
{
diff --git a/test/cxxtest/sample/ExceptionTest.h b/test/cxxtest/sample/ExceptionTest.h
index 68363c8740..47375480b1 100644
--- a/test/cxxtest/sample/ExceptionTest.h
+++ b/test/cxxtest/sample/ExceptionTest.h
@@ -42,7 +42,7 @@ private:
public:
Number( int ) {}
};
-
+
int throwThis( int i )
{
throw Number( i );
diff --git a/test/cxxtest/sample/FixtureTest.h b/test/cxxtest/sample/FixtureTest.h
index 33a119f2bd..272a90c2d5 100644
--- a/test/cxxtest/sample/FixtureTest.h
+++ b/test/cxxtest/sample/FixtureTest.h
@@ -19,7 +19,7 @@ public:
{
_buffer = new char[1024];
}
-
+
void tearDown()
{
delete[] _buffer;
diff --git a/test/cxxtest/sample/TraitsTest.h b/test/cxxtest/sample/TraitsTest.h
index 14659385d0..09957e591d 100644
--- a/test/cxxtest/sample/TraitsTest.h
+++ b/test/cxxtest/sample/TraitsTest.h
@@ -20,7 +20,7 @@ public:
Pet( const char *petName ) { strcpy( _name, petName ); }
const char *name() const { return _name; }
-
+
bool operator== ( const Pet &other ) const
{
return !strcmp( name(), other.name() );
@@ -32,13 +32,13 @@ public:
// Note: Most compilers do not require that you define both
// ValueTraits<const T> and ValueTraits<T>, but some do.
//
-namespace CxxTest
+namespace CxxTest
{
CXXTEST_TEMPLATE_INSTANTIATION
class ValueTraits<const Pet>
{
char _asString[256];
-
+
public:
ValueTraits( const Pet &pet ) { sprintf( _asString, "Pet(\"%s\")", pet.name() ); }
const char *asString() const { return _asString; }
diff --git a/test/cxxtest/sample/mock/Dice.h b/test/cxxtest/sample/mock/Dice.h
index 94271417e1..3a393ef262 100644
--- a/test/cxxtest/sample/mock/Dice.h
+++ b/test/cxxtest/sample/mock/Dice.h
@@ -5,7 +5,7 @@ class Dice
{
public:
Dice();
-
+
unsigned roll();
};
diff --git a/test/cxxtest/sample/mock/MockStdlib.h b/test/cxxtest/sample/mock/MockStdlib.h
index aee62bafe7..2434cb82cc 100644
--- a/test/cxxtest/sample/mock/MockStdlib.h
+++ b/test/cxxtest/sample/mock/MockStdlib.h
@@ -7,7 +7,7 @@ class MockStdlib :
{
public:
unsigned lastSeed;
-
+
void srand( unsigned seed )
{
lastSeed = seed;
diff --git a/test/cxxtest/sample/mock/TestDice.h b/test/cxxtest/sample/mock/TestDice.h
index 35b3b7eec9..7607ccd6f8 100644
--- a/test/cxxtest/sample/mock/TestDice.h
+++ b/test/cxxtest/sample/mock/TestDice.h
@@ -16,14 +16,14 @@ public:
{
delete stdlib;
}
-
+
void test_Randomize_uses_time()
{
stdlib->nextTime = 12345;
Dice dice;
TS_ASSERT_EQUALS( stdlib->lastSeed, 12345 );
}
-
+
void test_Roll()
{
Dice dice;
@@ -47,7 +47,7 @@ public:
stdlib->nextRand = 2;
TS_ASSERT_EQUALS( dice.roll(), 3 );
-
+
class Five : public T::Base_rand { int rand() { return 5; } };
Five *five = new Five;
@@ -55,7 +55,7 @@ public:
TS_ASSERT_EQUALS( dice.roll(), 6 );
TS_ASSERT_EQUALS( dice.roll(), 6 );
delete five;
-
+
stdlib->nextRand = 1;
TS_ASSERT_EQUALS( dice.roll(), 2 );
}
diff --git a/test/cxxtest/sample/mock/roll.cpp b/test/cxxtest/sample/mock/roll.cpp
index 20ea967af3..75ca31bedd 100644
--- a/test/cxxtest/sample/mock/roll.cpp
+++ b/test/cxxtest/sample/mock/roll.cpp
@@ -6,6 +6,6 @@ int main()
Dice dice;
printf( "First roll: %u\n", dice.roll() );
printf( "Second roll: %u\n", dice.roll() );
-
+
return 0;
}