Thread: [Mockpp-commits] mockpp/3party/cxxtest/cxxtest Descriptions.h,1.1,1.2 DummyDescriptions.h,1.1,1.2 Fl
Brought to you by:
ewald-arnold
From: Ewald A. <ewa...@us...> - 2005-12-17 18:39:24
|
Update of /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11686/3party/cxxtest/cxxtest Modified Files: Descriptions.h DummyDescriptions.h Flags.h GlobalFixture.h LinkedList.h RealDescriptions.h TestSuite.cpp TestSuite.h TestTracker.h ValueTraits.cpp Win32Gui.h Log Message: fixes/ports with bcb5 Index: TestSuite.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestSuite.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- TestSuite.h 9 Dec 2005 15:57:51 -0000 1.1 +++ TestSuite.h 17 Dec 2005 18:38:44 -0000 1.2 @@ -18,18 +18,18 @@ namespace CxxTest { - class TestSuite + class CXXTEST_EXPORT TestSuite { public: virtual ~TestSuite(); virtual void setUp(); virtual void tearDown(); }; - + class AbortTest {}; void doAbortTest(); # define TS_ABORT() CxxTest::doAbortTest() - + bool abortTestOnFail(); void setAbortTestOnFail( bool value = CXXTEST_DEFAULT_ABORT ); @@ -42,7 +42,7 @@ void doFailAssert( const char *file, unsigned line, const char *expression, const char *message ); template<class X, class Y> - bool equals( X x, Y y ) + bool CXXTEST_EXPORT equals( X x, Y y ) { return (x == y); } Index: TestSuite.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestSuite.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TestSuite.cpp 10 Dec 2005 15:13:16 -0000 1.2 +++ TestSuite.cpp 17 Dec 2005 18:38:44 -0000 1.3 @@ -17,17 +17,17 @@ // static bool currentAbortTestOnFail = false; - bool abortTestOnFail() + bool CXXTEST_EXPORT abortTestOnFail() { return currentAbortTestOnFail; } - void setAbortTestOnFail( bool value ) + void CXXTEST_EXPORT setAbortTestOnFail( bool value ) { currentAbortTestOnFail = value; } - void doAbortTest() + void CXXTEST_EXPORT doAbortTest() { # if defined(_CXXTEST_HAVE_EH) if ( currentAbortTestOnFail ) @@ -40,12 +40,12 @@ // static unsigned currentMaxDumpSize = CXXTEST_MAX_DUMP_SIZE; - unsigned maxDumpSize() + unsigned CXXTEST_EXPORT maxDumpSize() { return currentMaxDumpSize; } - void setMaxDumpSize( unsigned value ) + void CXXTEST_EXPORT setMaxDumpSize( unsigned value ) { currentMaxDumpSize = value; } @@ -53,23 +53,23 @@ // // Some non-template functions // - void doTrace( const char *file, unsigned line, const char *message ) + void CXXTEST_EXPORT doTrace( const char *file, unsigned line, const char *message ) { tracker().trace( file, line, message ); } - void doWarn( const char *file, unsigned line, const char *message ) + void CXXTEST_EXPORT doWarn( const char *file, unsigned line, const char *message ) { tracker().warning( file, line, message ); } - void doFailTest( const char *file, unsigned line, const char *message ) + void CXXTEST_EXPORT doFailTest( const char *file, unsigned line, const char *message ) { tracker().failedTest( file, line, message ); TS_ABORT(); } - void doFailAssert( const char *file, unsigned line, + void CXXTEST_EXPORT doFailAssert( const char *file, unsigned line, const char *expression, const char *message ) { if ( message ) @@ -78,7 +78,7 @@ TS_ABORT(); } - bool sameData( const void *x, const void *y, unsigned size ) + bool CXXTEST_EXPORT sameData( const void *x, const void *y, unsigned size ) { if ( size == 0 ) return true; @@ -98,7 +98,7 @@ return true; } - void doAssertSameData( const char *file, unsigned line, + void CXXTEST_EXPORT doAssertSameData( const char *file, unsigned line, const char *xExpr, const void *x, const char *yExpr, const void *y, const char *sizeExpr, unsigned size, @@ -112,7 +112,7 @@ } } - void doFailAssertThrows( const char *file, unsigned line, + void CXXTEST_EXPORT doFailAssertThrows( const char *file, unsigned line, const char *expr, const char *type, bool otherThrown, const char *message ) @@ -124,7 +124,7 @@ TS_ABORT(); } - void doFailAssertThrowsNot( const char *file, unsigned line, + void CXXTEST_EXPORT doFailAssertThrowsNot( const char *file, unsigned line, const char *expression, const char *message ) { if ( message ) Index: Descriptions.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Descriptions.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Descriptions.h 9 Dec 2005 15:57:51 -0000 1.1 +++ Descriptions.h 17 Dec 2005 18:38:44 -0000 1.2 @@ -7,37 +7,38 @@ // #include <cxxtest/LinkedList.h> +#include <cxxtest/Flags.h> -namespace CxxTest +namespace CxxTest { class TestSuite; - class TestDescription : public Link + class CXXTEST_EXPORT TestDescription : public Link { 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 + class CXXTEST_EXPORT 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; @@ -50,7 +51,7 @@ virtual bool leaveOnly( const char * /*testName*/ ) = 0; }; - class WorldDescription : public Link + class CXXTEST_EXPORT WorldDescription : public Link { public: virtual ~WorldDescription(); Index: DummyDescriptions.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/DummyDescriptions.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- DummyDescriptions.h 9 Dec 2005 15:57:51 -0000 1.1 +++ DummyDescriptions.h 17 Dec 2005 18:38:44 -0000 1.2 @@ -6,10 +6,11 @@ // #include <cxxtest/Descriptions.h> +#include <cxxtest/Flags.h> namespace CxxTest { - class DummyTestDescription : public TestDescription + class CXXTEST_EXPORT DummyTestDescription : public TestDescription { public: DummyTestDescription(); @@ -26,11 +27,11 @@ const TestDescription *next() const; }; - class DummySuiteDescription : public SuiteDescription - { + class CXXTEST_EXPORT DummySuiteDescription : public SuiteDescription + { public: DummySuiteDescription(); - + const char *file() const; unsigned line() const; const char *suiteName() const; @@ -51,7 +52,7 @@ DummyTestDescription _test; }; - class DummyWorldDescription : public WorldDescription + class CXXTEST_EXPORT DummyWorldDescription : public WorldDescription { public: DummyWorldDescription(); Index: RealDescriptions.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/RealDescriptions.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- RealDescriptions.h 9 Dec 2005 15:57:51 -0000 1.1 +++ RealDescriptions.h 17 Dec 2005 18:38:44 -0000 1.2 @@ -8,10 +8,11 @@ #include <cxxtest/Descriptions.h> #include <cxxtest/TestSuite.h> #include <cxxtest/GlobalFixture.h> +#include <cxxtest/Flags.h> namespace CxxTest { - class RealTestDescription : public TestDescription + class CXXTEST_EXPORT RealTestDescription : public TestDescription { public: RealTestDescription(); @@ -37,13 +38,13 @@ RealTestDescription &operator=( const RealTestDescription & ); virtual void runTest() = 0; - + SuiteDescription *_suite; unsigned _line; const char *_testName; }; - class RealSuiteDescription : public SuiteDescription + class CXXTEST_EXPORT RealSuiteDescription : public SuiteDescription { public: RealSuiteDescription(); @@ -79,7 +80,7 @@ friend class RealWorldDescription; }; - class StaticSuiteDescription : public RealSuiteDescription + class CXXTEST_EXPORT StaticSuiteDescription : public RealSuiteDescription { public: StaticSuiteDescription(); @@ -91,7 +92,7 @@ const char *argSuiteName, TestSuite &argSuite, List &argTests ); TestSuite *suite() const; - + bool setUp(); bool tearDown(); @@ -104,7 +105,7 @@ TestSuite *_suite; }; - class CommonDynamicSuiteDescription : public RealSuiteDescription + class CXXTEST_EXPORT CommonDynamicSuiteDescription : public RealSuiteDescription { public: CommonDynamicSuiteDescription(); @@ -124,7 +125,7 @@ }; template<class S> - class DynamicSuiteDescription : public CommonDynamicSuiteDescription + class CXXTEST_EXPORT DynamicSuiteDescription : public CommonDynamicSuiteDescription { public: DynamicSuiteDescription() {} @@ -152,7 +153,7 @@ bool setUp(); bool tearDown(); - + private: S *realSuite() const { return *_suite; } void setSuite( S *s ) { *_suite = s; } @@ -161,7 +162,7 @@ { setSuite( S::createSuite() ); } - + void destroySuite() { S *s = realSuite(); @@ -173,7 +174,7 @@ }; template<class S> - bool DynamicSuiteDescription<S>::setUp() + bool CXXTEST_EXPORT DynamicSuiteDescription<S>::setUp() { _TS_TRY { _TSM_ASSERT_THROWS_NOTHING( file(), _createLine, "Exception thrown from createSuite()", createSuite() ); @@ -185,11 +186,11 @@ } template<class S> - bool DynamicSuiteDescription<S>::tearDown() + bool CXXTEST_EXPORT DynamicSuiteDescription<S>::tearDown() { if ( !_suite ) return true; - + _TS_TRY { _TSM_ASSERT_THROWS_NOTHING( file(), _destroyLine, "destroySuite() failed", destroySuite() ); } @@ -197,8 +198,8 @@ return true; } - - class RealWorldDescription : public WorldDescription + + class CXXTEST_EXPORT RealWorldDescription : public WorldDescription { public: static List &suites(); Index: LinkedList.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/LinkedList.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- LinkedList.h 9 Dec 2005 15:57:51 -0000 1.1 +++ LinkedList.h 17 Dec 2005 18:38:44 -0000 1.2 @@ -8,7 +8,7 @@ struct List; class Link; - struct List + struct CXXTEST_EXPORT List { Link *_head; Link *_tail; @@ -28,8 +28,8 @@ void leaveOnly( const Link &link ); }; - class Link - { + class CXXTEST_EXPORT Link + { public: Link(); virtual ~Link(); Index: TestTracker.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/TestTracker.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TestTracker.h 10 Dec 2005 21:56:37 -0000 1.3 +++ TestTracker.h 17 Dec 2005 18:38:44 -0000 1.4 @@ -9,12 +9,13 @@ #include <cxxtest/TestListener.h> #include <cxxtest/DummyDescriptions.h> +#include <cxxtest/Flags.h> namespace CxxTest { class TestListener; - class TestTracker : public TestListener + class CXXTEST_EXPORT TestTracker : public TestListener { public: virtual ~TestTracker(); Index: Flags.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Flags.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Flags.h 9 Dec 2005 15:57:51 -0000 1.1 +++ Flags.h 17 Dec 2005 18:38:44 -0000 1.2 @@ -5,6 +5,12 @@ // These are the flags that control CxxTest // +#ifdef __WIN32__ +#define CXXTEST_EXPORT __declspec(dllexport) +#else +#define CXXTEST_EXPORT +#endif + #if !defined(CXXTEST_FLAGS) # define CXXTEST_FLAGS #endif // !CXXTEST_FLAGS Index: ValueTraits.cpp =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/ValueTraits.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ValueTraits.cpp 10 Dec 2005 15:13:16 -0000 1.3 +++ ValueTraits.cpp 17 Dec 2005 18:38:44 -0000 1.4 @@ -9,7 +9,7 @@ // Non-inline functions from ValueTraits.h // - char digitToChar( unsigned digit ) + char CXXTEST_EXPORT digitToChar( unsigned digit ) { if ( digit < 10 ) return (char)('0' + digit); @@ -18,7 +18,7 @@ return '?'; } - const char *byteToHex( unsigned char byte ) + const char * CXXTEST_EXPORT byteToHex( unsigned char byte ) { static char asHex[3]; asHex[0] = digitToChar( byte >> 4 ); @@ -27,7 +27,7 @@ return asHex; } - char *copyString( char *dst, const char *src ) + char * CXXTEST_EXPORT copyString( char *dst, const char *src ) { while ( (*dst = *src) != '\0' ) { ++ dst; @@ -36,7 +36,7 @@ return dst; } - bool stringsEqual( const char *s1, const char *s2 ) + bool CXXTEST_EXPORT stringsEqual( const char *s1, const char *s2 ) { char c; while ( (c = *s1++) == *s2++ ) @@ -45,7 +45,7 @@ return false; } - char *charToString( unsigned long c, char *s ) + char * CXXTEST_EXPORT charToString( unsigned long c, char *s ) { switch( c ) { case '\\': return copyString( s, "\\\\" ); @@ -74,12 +74,12 @@ } } - char *charToString( char c, char *s ) + char * CXXTEST_EXPORT charToString( char c, char *s ) { return charToString( (unsigned long)(unsigned char)c, s ); } - char *bytesToString( const unsigned char *bytes, unsigned numBytes, unsigned maxBytes, char *s ) + char * CXXTEST_EXPORT bytesToString( const unsigned char *bytes, unsigned numBytes, unsigned maxBytes, char *s ) { bool truncate = (numBytes > maxBytes); if ( truncate ) @@ -94,7 +94,7 @@ } #ifndef CXXTEST_USER_VALUE_TRAITS - unsigned ValueTraits<const double>::requiredDigitsOnLeft( double t ) + unsigned CXXTEST_EXPORT ValueTraits<const double>::requiredDigitsOnLeft( double t ) { unsigned digits = 1; for ( t = (t < 0.0) ? -t : t; t > 1.0; t /= BASE ) @@ -102,7 +102,7 @@ return digits; } - char *ValueTraits<const double>::doNegative( double &t ) + char * CXXTEST_EXPORT ValueTraits<const double>::doNegative( double &t ) { if ( t >= 0 ) return _asString; @@ -111,7 +111,7 @@ return _asString + 1; } - void ValueTraits<const double>::hugeNumber( double t ) + void CXXTEST_EXPORT ValueTraits<const double>::hugeNumber( double t ) { char *s = doNegative( t ); s = doubleToString( t, s, 0, 1 ); @@ -121,7 +121,7 @@ s = numberToString( requiredDigitsOnLeft( t ) - 1, s ); } - void ValueTraits<const double>::normalNumber( double t ) + void CXXTEST_EXPORT ValueTraits<const double>::normalNumber( double t ) { char *s = doNegative( t ); s = doubleToString( t, s ); @@ -130,7 +130,7 @@ s = numberToString( (unsigned)(t *= BASE) % BASE, s ); } - char *ValueTraits<const double>::doubleToString( double t, char *s, unsigned skip, unsigned max ) + char * CXXTEST_EXPORT ValueTraits<const double>::doubleToString( double t, char *s, unsigned skip, unsigned max ) { return numberToString<double>( t, s, BASE, skip, max ); } Index: GlobalFixture.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/GlobalFixture.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- GlobalFixture.h 9 Dec 2005 15:57:51 -0000 1.1 +++ GlobalFixture.h 17 Dec 2005 18:38:44 -0000 1.2 @@ -2,20 +2,21 @@ #define __cxxtest__GlobalFixture_h__ #include <cxxtest/LinkedList.h> +#include <cxxtest/Flags.h> namespace CxxTest { - class GlobalFixture : public Link + class CXXTEST_EXPORT GlobalFixture : public Link { public: virtual bool setUpWorld(); virtual bool tearDownWorld(); virtual bool setUp(); virtual bool tearDown(); - + GlobalFixture(); ~GlobalFixture(); - + static GlobalFixture *firstGlobalFixture(); static GlobalFixture *lastGlobalFixture(); GlobalFixture *nextGlobalFixture(); Index: Win32Gui.h =================================================================== RCS file: /cvsroot/mockpp/mockpp/3party/cxxtest/cxxtest/Win32Gui.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Win32Gui.h 10 Dec 2005 15:13:16 -0000 1.2 +++ Win32Gui.h 17 Dec 2005 18:38:44 -0000 1.3 @@ -19,7 +19,7 @@ #include <cxxtest/Gui.h> -#include <windows.h> +#include <windows.h> #include <commctrl.h> namespace CxxTest |