Thread: [Mockpp-commits] mockpp/3party/cxxtest/cxxtest Descriptions.cpp,1.4,1.5 Descriptions.h,1.2,1.3 Dummy
Brought to you by:
ewald-arnold
Update of /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12519/3party/cxxtest/cxxtest Modified Files: Descriptions.cpp Descriptions.h DummyDescriptions.cpp DummyDescriptions.h ErrorFormatter.h ErrorPrinter.h Flags.h GlobalFixture.cpp GlobalFixture.h Gui.h LinkedList.cpp LinkedList.h Mock.h ParenPrinter.h QtGui.h RealDescriptions.cpp RealDescriptions.h StdValueTraits.h StdioFilePrinter.h StdioPrinter.h TeeListener.h TestListener.h TestRunner.h TestSuite.cpp TestSuite.h TestTracker.cpp TestTracker.h ValueTraits.cpp ValueTraits.h Win32Gui.h X11Gui.h YesNoRunner.h Log Message: optionally disable CxxTest namespace Index: TestSuite.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestSuite.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TestSuite.cpp 17 Dec 2005 18:38:44 -0000 1.3 +++ TestSuite.cpp 17 Mar 2006 08:41:51 -0000 1.4 @@ -3,8 +3,7 @@ #include <cxxtest/TestSuite.h> -namespace CxxTest -{ +CXXTEST_NS_START // // TestSuite members // @@ -133,6 +132,6 @@ tracker().failedAssertThrowsNot( file, line, expression ); TS_ABORT(); } -} +CXXTEST_NS_END #endif // __cxxtest__TestSuite_cpp__ Index: QtGui.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/QtGui.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- QtGui.h 10 Dec 2005 15:13:16 -0000 1.2 +++ QtGui.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -25,8 +25,7 @@ #include <qprogressbar.h> #include <qstatusbar.h> -namespace CxxTest -{ +CXXTEST_NS_START class QtGui : public GuiListener { public: @@ -266,6 +265,6 @@ _testsDone->setText( summary ); } }; -} +CXXTEST_NS_END #endif // __cxxtest__QtGui_h__ Index: TestTracker.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestTracker.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- TestTracker.h 17 Dec 2005 18:38:44 -0000 1.4 +++ TestTracker.h 17 Mar 2006 08:41:51 -0000 1.5 @@ -11,8 +11,7 @@ #include <cxxtest/DummyDescriptions.h> #include <cxxtest/Flags.h> -namespace CxxTest -{ +CXXTEST_NS_START class TestListener; class CXXTEST_EXPORT TestTracker : public TestListener @@ -111,6 +110,6 @@ }; inline TestTracker &tracker() { return TestTracker::tracker(); } -} +CXXTEST_NS_END #endif // __cxxtest__TestTracker_h__ Index: LinkedList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/LinkedList.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- LinkedList.h 17 Dec 2005 18:38:44 -0000 1.2 +++ LinkedList.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -3,8 +3,7 @@ #include <cxxtest/Flags.h> -namespace CxxTest -{ +CXXTEST_NS_START struct List; class Link; @@ -39,7 +38,7 @@ Link *justNext(); Link *justPrev(); - + Link *next(); Link *prev(); const Link *next() const; @@ -59,7 +58,7 @@ Link( const Link & ); Link &operator=( const Link & ); }; -} +CXXTEST_NS_END #endif // __cxxtest__LinkedList_h__ Index: LinkedList.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/LinkedList.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- LinkedList.cpp 10 Dec 2005 15:13:16 -0000 1.3 +++ LinkedList.cpp 17 Mar 2006 08:41:51 -0000 1.4 @@ -3,9 +3,8 @@ #include <cxxtest/LinkedList.h> -namespace CxxTest -{ - void List::initialize() +CXXTEST_NS_START +void List::initialize() { _head = _tail = 0; } @@ -164,6 +163,6 @@ else l._tail = _prev; } -} +CXXTEST_NS_END #endif // __cxxtest__LinkedList_cpp__ Index: ErrorPrinter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ErrorPrinter.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ErrorPrinter.h 9 Dec 2005 15:57:51 -0000 1.1 +++ ErrorPrinter.h 17 Mar 2006 08:41:51 -0000 1.2 @@ -23,8 +23,7 @@ # include <iostream> #endif // _CXXTEST_OLD_STD -namespace CxxTest -{ +CXXTEST_NS_START class ErrorPrinter : public ErrorFormatter { public: @@ -50,6 +49,6 @@ } }; }; -} +CXXTEST_NS_END #endif // __cxxtest__ErrorPrinter_h__ Index: Win32Gui.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Win32Gui.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Win32Gui.h 4 Jan 2006 19:56:21 -0000 1.4 +++ Win32Gui.h 17 Mar 2006 08:41:51 -0000 1.5 @@ -22,8 +22,7 @@ #include <windows.h> #include <commctrl.h> -namespace CxxTest -{ +CXXTEST_NS_START class Win32Gui : public GuiListener { public: @@ -540,6 +539,6 @@ HeapFree( GetProcessHeap(), 0, data ); } }; -} +CXXTEST_NS_END #endif // __cxxtest__Win32Gui_h__ Index: TestRunner.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestRunner.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TestRunner.h 10 Dec 2005 21:56:05 -0000 1.3 +++ TestRunner.h 17 Mar 2006 08:41:51 -0000 1.4 @@ -12,8 +12,7 @@ #include <cxxtest/TestSuite.h> #include <cxxtest/TestTracker.h> -namespace CxxTest -{ +CXXTEST_NS_START class TestRunner { public: @@ -121,7 +120,7 @@ // For --no-static-init // void initialize(); -} +CXXTEST_NS_END #endif // __cxxtest_TestRunner_h__ Index: TestListener.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestListener.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TestListener.h 28 Dec 2005 19:43:06 -0000 1.2 +++ TestListener.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -12,14 +12,13 @@ #include <cxxtest/Descriptions.h> -namespace CxxTest -{ +CXXTEST_NS_START class CXXTEST_EXPORT TestListener { public: TestListener() {} virtual ~TestListener() {} - + virtual void enterWorld( const WorldDescription & /*desc*/ ) {} virtual void enterSuite( const SuiteDescription & /*desc*/ ) {} virtual void enterTest( const TestDescription & /*desc*/ ) {} @@ -65,6 +64,6 @@ virtual void leaveSuite( const SuiteDescription & /*desc*/ ) {} virtual void leaveWorld( const WorldDescription & /*desc*/ ) {} }; -} +CXXTEST_NS_END #endif // __cxxtest__TestListener_h__ Index: Descriptions.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Descriptions.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Descriptions.h 17 Dec 2005 18:38:44 -0000 1.2 +++ Descriptions.h 17 Mar 2006 08:41:50 -0000 1.3 @@ -9,9 +9,8 @@ #include <cxxtest/LinkedList.h> #include <cxxtest/Flags.h> -namespace CxxTest -{ - class TestSuite; +CXXTEST_NS_START +class TestSuite; class CXXTEST_EXPORT TestDescription : public Link { @@ -55,7 +54,7 @@ { public: virtual ~WorldDescription(); - + virtual unsigned numSuites( void ) const = 0; virtual unsigned numTotalTests( void ) const = 0; virtual const SuiteDescription &suiteDescription( unsigned /*i*/ ) const = 0; @@ -69,7 +68,7 @@ virtual void activateAllTests() = 0; virtual bool leaveOnly( const char * /*suiteName*/, const char * /*testName*/ = 0 ) = 0; }; -} +CXXTEST_NS_END #endif // __cxxtest__Descriptions_h__ Index: GlobalFixture.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/GlobalFixture.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- GlobalFixture.cpp 9 Dec 2005 20:40:42 -0000 1.2 +++ GlobalFixture.cpp 17 Mar 2006 08:41:51 -0000 1.3 @@ -3,9 +3,8 @@ #include <cxxtest/GlobalFixture.h> -namespace CxxTest -{ - List GlobalFixture::_list = { 0, 0 }; +CXXTEST_NS_START +List GlobalFixture::_list = { 0, 0 }; bool GlobalFixture::setUpWorld() { return true; } bool GlobalFixture::tearDownWorld() { return true; } @@ -19,7 +18,7 @@ GlobalFixture *GlobalFixture::lastGlobalFixture() { return (GlobalFixture *)_list.tail(); } GlobalFixture *GlobalFixture::nextGlobalFixture() { return (GlobalFixture *)next(); } GlobalFixture *GlobalFixture::prevGlobalFixture() { return (GlobalFixture *)prev(); } -} +CXXTEST_NS_END #endif // __cxxtest__GlobalFixture_cpp__ Index: Gui.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Gui.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Gui.h 10 Dec 2005 15:13:16 -0000 1.2 +++ Gui.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -8,9 +8,8 @@ #include <cxxtest/TeeListener.h> -namespace CxxTest -{ - class GuiListener : public TestListener +CXXTEST_NS_START +class GuiListener : public TestListener { public: GuiListener() : _state( GREEN_BAR ) {} @@ -173,6 +172,6 @@ return tracker().failedTests(); } }; -} +CXXTEST_NS_END #endif //__CXXTEST__GUI_H Index: X11Gui.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/X11Gui.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- X11Gui.h 9 Dec 2005 15:57:51 -0000 1.1 +++ X11Gui.h 17 Mar 2006 08:41:51 -0000 1.2 @@ -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 @@ -20,8 +20,7 @@ #include <stdlib.h> #include <string.h> -namespace CxxTest -{ +CXXTEST_NS_START class X11Gui : public GuiListener { public: @@ -29,7 +28,7 @@ { parseCommandLine( argc, argv ); } - + void enterWorld( const WorldDescription &wd ) { openDisplay(); @@ -44,7 +43,7 @@ processEvents(); } } - + void guiEnterTest( const char *suiteName, const char *testName ) { if ( _display ) { @@ -53,7 +52,7 @@ redraw(); } } - + void yellowBar() { if ( _display ) { @@ -148,7 +147,7 @@ XAllocColor( _display, _colormap, &color ); return color.pixel; } - + void createWindow() { _window = XCreateSimpleWindow( _display, RootWindow( _display, 0 ), 0, 0, 1, 1, 0, 0, _background ); @@ -218,7 +217,7 @@ void centerWindow() { XMapWindow( _display, _window ); - + Screen *screen = XDefaultScreenOfDisplay( _display ); int screenWidth = WidthOfScreen( screen ); int screenHeight = HeightOfScreen( screen ); @@ -227,14 +226,14 @@ _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 +289,7 @@ 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 ); @@ -322,6 +321,6 @@ XCloseDisplay( _display ); } }; -}; +CXXTEST_NS_END #endif //__cxxtest__X11Gui_h__ Index: YesNoRunner.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/YesNoRunner.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- YesNoRunner.h 9 Dec 2005 15:57:51 -0000 1.1 +++ YesNoRunner.h 17 Mar 2006 08:41:51 -0000 1.2 @@ -9,21 +9,20 @@ #include <cxxtest/TestRunner.h> #include <cxxtest/TestListener.h> -namespace CxxTest -{ +CXXTEST_NS_START class YesNoRunner : public TestListener { public: YesNoRunner() { } - + int run() { TestRunner::runAllTests( *this ); return tracker().failedTests(); } }; -} +CXXTEST_NS_END #endif // __cxxtest__YesNoRunner_h__ Index: ValueTraits.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ValueTraits.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- ValueTraits.cpp 17 Dec 2005 18:38:44 -0000 1.4 +++ ValueTraits.cpp 17 Mar 2006 08:41:51 -0000 1.5 @@ -3,8 +3,7 @@ #include <cxxtest/ValueTraits.h> -namespace CxxTest -{ +CXXTEST_NS_START // // Non-inline functions from ValueTraits.h // @@ -135,6 +134,6 @@ return numberToString<double>( t, s, BASE, skip, max ); } #endif // !CXXTEST_USER_VALUE_TRAITS -} +CXXTEST_NS_END #endif // __cxxtest__ValueTraits_cpp__ Index: ParenPrinter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ParenPrinter.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ParenPrinter.h 9 Dec 2005 15:57:51 -0000 1.1 +++ ParenPrinter.h 17 Mar 2006 08:41:51 -0000 1.2 @@ -9,13 +9,12 @@ #include <cxxtest/ErrorPrinter.h> -namespace CxxTest -{ +CXXTEST_NS_START class ParenPrinter : public ErrorPrinter { public: ParenPrinter( CXXTEST_STD(ostream) &o = CXXTEST_STD(cout) ) : ErrorPrinter( o, "(", ")" ) {} }; -} +CXXTEST_NS_END #endif // __cxxtest__ParenPrinter_h__ Index: DummyDescriptions.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/DummyDescriptions.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- DummyDescriptions.cpp 9 Dec 2005 15:57:51 -0000 1.1 +++ DummyDescriptions.cpp 17 Mar 2006 08:41:50 -0000 1.2 @@ -1,9 +1,8 @@ #include <cxxtest/DummyDescriptions.h> -namespace CxxTest -{ +CXXTEST_NS_START 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 +13,9 @@ 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 +28,12 @@ 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,8 +41,8 @@ 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;} -} +CXXTEST_NS_END Index: RealDescriptions.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/RealDescriptions.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- RealDescriptions.h 17 Dec 2005 18:38:44 -0000 1.2 +++ RealDescriptions.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -10,15 +10,14 @@ #include <cxxtest/GlobalFixture.h> #include <cxxtest/Flags.h> -namespace CxxTest -{ +CXXTEST_NS_START class CXXTEST_EXPORT RealTestDescription : public TestDescription { public: 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; @@ -30,9 +29,9 @@ TestSuite *suite() const; bool setUp(); - void run(); + void run(); bool tearDown(); - + private: RealTestDescription( const RealTestDescription & ); RealTestDescription &operator=( const RealTestDescription & ); @@ -49,7 +48,7 @@ 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; @@ -60,17 +59,17 @@ 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; @@ -95,13 +94,13 @@ bool setUp(); bool tearDown(); - + private: StaticSuiteDescription( const StaticSuiteDescription & ); StaticSuiteDescription &operator=( const StaticSuiteDescription & ); void doInitialize( TestSuite &argSuite ); - + TestSuite *_suite; }; @@ -123,7 +122,7 @@ private: void doInitialize( unsigned argCreateLine, unsigned argDestroyLine ); }; - + template<class S> class CXXTEST_EXPORT DynamicSuiteDescription : public CommonDynamicSuiteDescription { @@ -210,7 +209,7 @@ 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 ); @@ -218,7 +217,7 @@ void activateAllTests(); bool leaveOnly( const char *suiteName, const char *testName = 0 ); -} +CXXTEST_NS_END #endif // __cxxtest__RealDescriptions_h__ Index: ValueTraits.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ValueTraits.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ValueTraits.h 10 Dec 2005 15:13:16 -0000 1.3 +++ ValueTraits.h 17 Mar 2006 08:41:51 -0000 1.4 @@ -18,8 +18,7 @@ # define CXXTEST_TEMPLATE_INSTANTIATION template<> #endif // _CXXTEST_OLD_TEMPLATE_SYNTAX -namespace CxxTest -{ +CXXTEST_NS_START // // This is how we use the value traits // @@ -338,7 +337,7 @@ CXXTEST_COPY_TRAITS( const float, const double ); CXXTEST_COPY_CONST_TRAITS( float ); #endif // !CXXTEST_USER_VALUE_TRAITS -} +CXXTEST_NS_END #ifdef _CXXTEST_HAVE_STD # include <cxxtest/StdValueTraits.h> @@ -348,8 +347,7 @@ // CXXTEST_ENUM_TRAITS // #define CXXTEST_ENUM_TRAITS( TYPE, VALUES ) \ - namespace CxxTest \ - { \ + CXXTEST_NS_START \ CXXTEST_TEMPLATE_INSTANTIATION \ class ValueTraits<TYPE> \ { \ @@ -369,7 +367,7 @@ } \ } \ }; \ - } + CXXTEST_NS_END #define CXXTEST_ENUM_MEMBER( MEMBER ) \ case MEMBER: return #MEMBER; Index: TeeListener.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TeeListener.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TeeListener.h 10 Dec 2005 15:13:16 -0000 1.2 +++ TeeListener.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -8,8 +8,7 @@ #include <cxxtest/TestListener.h> #include <cxxtest/TestListener.h> -namespace CxxTest -{ +CXXTEST_NS_START class TeeListener : public TestListener { public: @@ -176,7 +175,7 @@ TestListener *_first, *_second; TestListener _dummy; }; -} +CXXTEST_NS_END #endif // __cxxtest__TeeListener_h__ Index: Mock.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Mock.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Mock.h 9 Dec 2005 15:57:51 -0000 1.1 +++ Mock.h 17 Mar 2006 08:41:51 -0000 1.2 @@ -12,15 +12,14 @@ // MockTraits: What to return when no mock object has been created // #define __CXXTEST_MOCK__TRAITS \ - namespace CXXTEST_MOCK_NAMESPACE \ - { \ + CXXTEST_NS_START \ template<class T> \ class MockTraits \ { \ public: \ static T defaultValue() { return 0; } \ }; \ - }; + CXXTEST_NS_END // // extern "C" when needed @@ -35,7 +34,7 @@ // Prototypes: For "normal" headers // #define __CXXTEST_MOCK__PROTOTYPE( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ - namespace CXXTEST_MOCK_NAMESPACE { TYPE NAME ARGS; } + CXXTEST_NS_START TYPE NAME ARGS; CXXTEST_NS_END #define __CXXTEST_MOCK_VOID__PROTOTYPE( MOCK, NAME, ARGS, REAL, CALL ) \ __CXXTEST_MOCK__PROTOTYPE( MOCK, void, NAME, ARGS, REAL, CALL ) @@ -50,7 +49,7 @@ // Class declarations: For test files // #define __CXXTEST_MOCK__CLASS_DECLARATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ - namespace CXXTEST_MOCK_NAMESPACE { \ + CXXTEST_NS_START \ class Base_##MOCK : public CxxTest::Link \ { \ public: \ @@ -78,13 +77,13 @@ public: \ TYPE NAME ARGS; \ }; \ - } + CXXTEST_NS_END #define __CXXTEST_MOCK_VOID__CLASS_DECLARATION( MOCK, NAME, ARGS, REAL, CALL ) \ __CXXTEST_MOCK__CLASS_DECLARATION( MOCK, void, NAME, ARGS, REAL, CALL ) #define __CXXTEST_SUPPLY__CLASS_DECLARATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ - namespace CXXTEST_MOCK_NAMESPACE { \ + CXXTEST_NS_START \ class Base_##MOCK : public CxxTest::Link \ { \ public: \ @@ -106,7 +105,7 @@ public: \ TYPE NAME ARGS; \ }; \ - } + CXXTEST_NS_END #define __CXXTEST_SUPPLY_VOID__CLASS_DECLARATION( MOCK, NAME, ARGS, REAL, CALL ) \ __CXXTEST_SUPPLY__CLASS_DECLARATION( MOCK, void, NAME, ARGS, REAL, CALL ) @@ -115,7 +114,7 @@ // Class implementation: For test source files // #define __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ - namespace CXXTEST_MOCK_NAMESPACE { \ + CXXTEST_NS_START \ \ CxxTest::List Base_##MOCK::_list = { 0, 0 }; \ \ @@ -130,11 +129,11 @@ static _Unimplemented_##MOCK unimplemented; \ return *(Base_##MOCK *)_list.tail(); \ } \ - } + CXXTEST_NS_END #define __CXXTEST_MOCK__CLASS_IMPLEMENTATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ - namespace CXXTEST_MOCK_NAMESPACE { \ + CXXTEST_NS_START \ TYPE Real_##MOCK::NAME ARGS \ { \ return REAL CALL; \ @@ -152,11 +151,11 @@ { \ return Base_##MOCK::current().NAME CALL; \ } \ - } + CXXTEST_NS_END #define __CXXTEST_MOCK_VOID__CLASS_IMPLEMENTATION( MOCK, NAME, ARGS, REAL, CALL ) \ __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ - namespace CXXTEST_MOCK_NAMESPACE { \ + CXXTEST_NS_START \ void Real_##MOCK::NAME ARGS \ { \ REAL CALL; \ @@ -173,11 +172,11 @@ { \ Base_##MOCK::current().NAME CALL; \ } \ - } + CXXTEST_NS_END #define __CXXTEST_SUPPLY__CLASS_IMPLEMENTATION( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ - namespace CXXTEST_MOCK_NAMESPACE { \ + CXXTEST_NS_START \ TYPE _Unimplemented_##MOCK::NAME ARGS \ { \ while ( false ) \ @@ -185,7 +184,7 @@ __CXXTEST_MOCK_UNIMPLEMENTED( NAME, ARGS ); \ return MockTraits<TYPE>::defaultValue(); \ } \ - } \ + CXXTEST_NS_END \ \ TYPE REAL ARGS \ { \ @@ -194,14 +193,14 @@ #define __CXXTEST_SUPPLY_VOID__CLASS_IMPLEMENTATION( MOCK, NAME, ARGS, REAL, CALL ) \ __CXXTEST_MOCK__COMMON_CLASS_IMPLEMENTATION( MOCK, NAME ) \ - namespace CXXTEST_MOCK_NAMESPACE { \ + CXXTEST_NS_START \ void _Unimplemented_##MOCK::NAME ARGS \ { \ while ( false ) \ NAME CALL; \ __CXXTEST_MOCK_UNIMPLEMENTED( NAME, ARGS ); \ } \ - } \ + CXXTEST_NS_END \ \ void REAL ARGS \ { \ @@ -276,10 +275,10 @@ // Real source file: "Real" implementations // #define CXXTEST_MOCK( MOCK, TYPE, NAME, ARGS, REAL, CALL ) \ - namespace CXXTEST_MOCK_NAMESPACE { TYPE NAME ARGS { return REAL CALL; } } + CXXTEST_NS_START TYPE NAME ARGS { return REAL CALL; } CXXTEST_NS_END #define CXXTEST_MOCK_VOID( MOCK, NAME, ARGS, REAL, CALL ) \ - namespace CXXTEST_MOCK_NAMESPACE { void NAME ARGS { REAL CALL; } } + CXXTEST_NS_START void NAME ARGS { REAL CALL; } CXXTEST_NS_END #else // @@ -337,14 +336,13 @@ // The default value of 0 usually works, but some cases may need this. // #define CXXTEST_MOCK_DEFAULT_VALUE( TYPE, VALUE ) \ - namespace CXXTEST_MOCK_NAMESPACE \ - { \ + CXXTEST_NS_START \ template<> \ class MockTraits<TYPE> \ { \ public: \ static TYPE defaultValue() { return VALUE; } \ }; \ - } + CXXTEST_NS_END #endif // __cxxtest__Mock_h__ Index: StdioFilePrinter.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/StdioFilePrinter.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- StdioFilePrinter.h 10 Dec 2005 15:13:16 -0000 1.2 +++ StdioFilePrinter.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -11,8 +11,7 @@ #include <cxxtest/ErrorFormatter.h> #include <stdio.h> -namespace CxxTest -{ +CXXTEST_NS_START class StdioFilePrinter : public ErrorFormatter { public: @@ -36,6 +35,6 @@ OutputStream &operator<<( Manipulator m ) { return OutputStream::operator<<( m ); } }; }; -} +CXXTEST_NS_END #endif // __cxxtest__StdioFilePrinter_h__ Index: StdValueTraits.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/StdValueTraits.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- StdValueTraits.h 18 Dec 2005 16:56:22 -0000 1.3 +++ StdValueTraits.h 17 Mar 2006 08:41:51 -0000 1.4 @@ -18,8 +18,7 @@ #ifndef CXXTEST_USER_VALUE_TRAITS -namespace CxxTest -{ +CXXTEST_NS_START // // NOTE: This should have been // template<class Char, class Traits, class Allocator> @@ -226,7 +225,7 @@ } }; #endif // _CXXTEST_PARTIAL_TEMPLATE_SPECIALIZATION -} +CXXTEST_NS_END #endif // CXXTEST_USER_VALUE_TRAITS Index: TestSuite.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestSuite.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TestSuite.h 17 Dec 2005 18:38:44 -0000 1.2 +++ TestSuite.h 17 Mar 2006 08:41:51 -0000 1.3 @@ -16,8 +16,7 @@ # include <stdexcept> #endif // _CXXTEST_HAVE_STD -namespace CxxTest -{ +CXXTEST_NS_START class CXXTEST_EXPORT TestSuite { public: @@ -143,7 +142,7 @@ 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 +171,7 @@ if ( !delta( x, y, d ) ) { if ( message ) tracker().failedTest( file, line, message ); - + tracker().failedAssertDelta( file, line, xExpr, yExpr, dExpr, ... [truncated message content] |