--- misc/cppunit-1.8.0/AUTHORS 2002-03-26 09:29:58.000000000 +0100 +++ misc/build/cppunit-1.8.0/AUTHORS 2009-09-12 14:15:35.015625000 +0200 @@ -5,3 +5,4 @@ Baptiste Lepilleur Bastiaan Bakker Steve Robbins +Lars Langhans --- misc/cppunit-1.8.0/ChangeLog 2002-04-11 11:53:02.000000000 +0200 +++ misc/build/cppunit-1.8.0/ChangeLog 2009-09-12 14:15:35.031250000 +0200 @@ -1,3 +1,9 @@ +2008-12-09 Lars Langhans + * create with some source files a new library + * lot of source changes to build it within OOo environment. + * lot of additional code to build within OOo environment. + * Configure is no longer supported. + 2002-04-11 Baptiste Lepilleur * doc/FAQ: removed question about the Exception::operator =() problem. --- misc/cppunit-1.8.0/INSTALL 2001-07-06 19:48:28.000000000 +0200 +++ misc/build/cppunit-1.8.0/INSTALL 2009-09-12 14:15:35.062500000 +0200 @@ -1,6 +1,12 @@ Basic Installation ================== + +This is a patched Version of CppUnit and works only in a OpenOffice.org +environment. +All other information here are expired. + + These are generic installation instructions. The `configure' shell script attempts to guess correct values for --- misc/cppunit-1.8.0/include/cppunit/Asserter.h 2002-03-28 16:47:07.000000000 +0100 +++ misc/build/cppunit-1.8.0/include/cppunit/Asserter.h 2009-09-12 14:15:35.078125000 +0200 @@ -5,6 +5,7 @@ #include #include + namespace CppUnit { @@ -44,8 +45,8 @@ /*! Throws a Exception with the specified message and location. */ - void CPPUNIT_API fail( std::string message, - SourceLine sourceLine = SourceLine() ); + void CPPUNIT_API fail( std::string const& message, + SourceLine const& sourceLine = SourceLine() ); /*! Throws a Exception with the specified message and location. * \param shouldFail if \c true then the exception is thrown. Otherwise @@ -54,8 +55,14 @@ * \param sourceLine Location of the assertion. */ void CPPUNIT_API failIf( bool shouldFail, - std::string message, - SourceLine sourceLine = SourceLine() ); + std::string const& message, + SourceLine const& sourceLine = SourceLine() ); + + + // LLA: test, if it's possible to use a DEFINE twice ;-) + void CPPUNIT_API failIf( bool shouldFail, + const char* message, + SourceLine const& sourceLine = SourceLine() ); /*! Throws a NotEqualException with the specified message and location. * \param expected Text describing the expected value. @@ -64,10 +71,10 @@ * where the "difference" is located. * \param sourceLine Location of the assertion. */ - void CPPUNIT_API failNotEqual( std::string expected, - std::string actual, - SourceLine sourceLine = SourceLine(), - std::string additionalMessage ="" ); + void CPPUNIT_API failNotEqual( std::string const& expected, + std::string const& actual, + SourceLine const& sourceLine = SourceLine(), + std::string const& additionalMessage ="" ); /*! Throws a NotEqualException with the specified message and location. * \param shouldFail if \c true then the exception is thrown. Otherwise @@ -79,10 +86,18 @@ * \param sourceLine Location of the assertion. */ void CPPUNIT_API failNotEqualIf( bool shouldFail, - std::string expected, - std::string actual, - SourceLine sourceLine = SourceLine(), - std::string additionalMessage ="" ); + std::string const& expected, + std::string const& actual, + SourceLine const& sourceLine = SourceLine(), + std::string const& additionalMessage ="" ); + + + /*! Throws an Exception with the specified message and location. + * \param message Message explaining the assertion failure. + * \param sourceLine Location of the assertion. + */ + void CPPUNIT_API failStub( std::string const& message, + SourceLine const& sourceLine = SourceLine() ); } // namespace Asserter } // namespace CppUnit --- misc/cppunit-1.8.0/include/cppunit/Exception.h 2002-03-28 16:47:07.000000000 +0100 +++ misc/build/cppunit-1.8.0/include/cppunit/Exception.h 2009-09-12 14:15:35.093750000 +0200 @@ -21,7 +21,7 @@ class Type { public: - Type( std::string type ) : m_type ( type ) {} + Type( std::string const& _type ) : m_type ( _type ) {} bool operator ==( const Type &other ) const { @@ -32,13 +32,13 @@ }; - Exception( std::string message = "", - SourceLine sourceLine = SourceLine() ); + Exception( std::string const& message = "", + SourceLine const& sourceLine = SourceLine() ); #ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED - Exception( std::string message, + Exception( std::string const& message, long lineNumber, - std::string fileName ); + std::string const& fileName ); #endif Exception (const Exception& other); @@ -74,6 +74,41 @@ SourceLine m_sourceLine; }; +// ----------------------------------------------------------------------------- + +class StubException : public Exception +{ +public: + StubException( std::string const& _message = "", + SourceLine const& _sourceLine = SourceLine() ) + :Exception(_message, _sourceLine) {} + + +#ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED + StubException( std::string const& message, + long lineNumber, + std::string const& fileName ) + :Exception(message, lineNumber, fileName) {} +#endif +}; + +// ----------------------------------------------------------------------------- + +class SignalException : public Exception +{ +public: + SignalException( std::string const& _message = "", + SourceLine const& _sourceLine = SourceLine() ) + :Exception(_message, _sourceLine) {} + + +#ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED + SignalException( std::string const& message, + long lineNumber, + std::string const& fileName ) + :Exception(message, lineNumber, fileName) {} +#endif +}; } // namespace CppUnit --- misc/cppunit-1.8.0/include/cppunit/NotEqualException.h 2002-03-28 16:47:07.000000000 +0100 +++ misc/build/cppunit-1.8.0/include/cppunit/NotEqualException.h 2009-09-12 14:15:35.093750000 +0200 @@ -19,16 +19,16 @@ * \param additionalMessage Additionnal information provided to further qualify * the inequality. */ - NotEqualException( std::string expected, - std::string actual, - SourceLine sourceLine = SourceLine(), - std::string additionalMessage = "" ); + NotEqualException( std::string const& expected, + std::string const& actual, + SourceLine const& sourceLine = SourceLine(), + std::string const& additionalMessage = "" ); #ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED - NotEqualException( std::string expected, - std::string actual, + NotEqualException( std::string const& expected, + std::string const& actual, long lineNumber, - std::string fileName ); + std::string const& fileName ); #endif NotEqualException( const NotEqualException &other ); --- misc/cppunit-1.8.0/include/cppunit/Portability.h 2002-03-25 19:41:39.000000000 +0100 +++ misc/build/cppunit-1.8.0/include/cppunit/Portability.h 2009-09-12 14:15:35.109375000 +0200 @@ -28,7 +28,7 @@ #define CPPUNIT_ENABLE_CU_TEST_MACROS 0 #endif -/* Define to 1 if the preprocessor expands (#foo) to "foo" (quotes incl.) +/* Define to 1 if the preprocessor expands (#foo) to "foo" (quotes incl.) I don't think there is any C preprocess that does NOT support this! */ #ifndef CPPUNIT_HAVE_CPP_SOURCE_ANNOTATION #define CPPUNIT_HAVE_CPP_SOURCE_ANNOTATION 1 @@ -51,11 +51,11 @@ #if CPPUNIT_HAVE_SSTREAM # include namespace CppUnit { - class OStringStream : public std::ostringstream + class OStringStream : public std::ostringstream { }; } -#else +#else #if CPPUNIT_HAVE_CLASS_STRSTREAM # include # if CPPUNIT_HAVE_STRSTREAM @@ -65,7 +65,7 @@ # endif namespace CppUnit { - class OStringStream : public std::ostrstream + class OStringStream : public std::ostrstream { public: std::string str() --- misc/cppunit-1.8.0/include/cppunit/Test.h 2002-03-28 16:47:07.000000000 +0100 +++ misc/build/cppunit-1.8.0/include/cppunit/Test.h 2009-09-12 14:15:35.125000000 +0200 @@ -4,13 +4,15 @@ #include #include +typedef void* hTestResult; + namespace CppUnit { -class TestResult; +//# class TestResult; /*! \brief Base class for all test objects. * \ingroup BrowsingCollectedTestResult - * + *l- * All test objects should be a subclass of Test. Some test objects, * TestCase for example, represent one individual test. Other test * objects, such as TestSuite, are comprised of several tests. @@ -27,7 +29,7 @@ /*! \brief Run the test, collecting results. */ - virtual void run (TestResult *result) = 0; + virtual void run (hTestResult pResult) = 0; /*! \brief Return the number of test cases invoked by run(). * --- misc/cppunit-1.8.0/include/cppunit/TestAssert.h 2002-04-04 17:39:37.000000000 +0200 +++ misc/build/cppunit-1.8.0/include/cppunit/TestAssert.h 2009-09-12 14:15:35.156250000 +0200 @@ -5,9 +5,10 @@ #include #include - namespace CppUnit { + + /*! \brief Traits used by CPPUNIT_ASSERT_EQUAL(). * * Here is an example of specialization of that traits: @@ -31,83 +32,83 @@ * }; * \endcode */ - template - struct assertion_traits - { - static bool equal( const T& x, const T& y ) - { - return x == y; - } - - static std::string toString( const T& x ) - { - OStringStream ost; - ost << x; - return ost.str(); - } - }; - namespace TestAssert - { +template +struct assertion_traits +{ + static bool equal( const T& x, const T& y ) + { + return x == y; + } + + static std::string toString( const T& x ) + { + OStringStream ost; + ost << x; + return ost.str(); + } +}; + +namespace TestAssert +{ #ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED - void CPPUNIT_API assertImplementation( bool condition, - std::string conditionExpression = "", - long lineNumber, - std::string fileName ); - - void CPPUNIT_API assertNotEqualImplementation( std::string expected, - std::string actual, - long lineNumber, - std::string fileName ); - - - template - void assertEquals( const T& expected, - const T& actual, - long lineNumber, - std::string fileName ) - { - if ( !assertion_traits::equal(expected,actual) ) // lazy toString conversion... - { - assertNotEqualImplementation( assertion_traits::toString(expected), - assertion_traits::toString(actual), - lineNumber, - fileName ); - } - } - - void CPPUNIT_API assertEquals( double expected, - double actual, - double delta, - long lineNumber, - std::string fileName ); + void CPPUNIT_API assertImplementation( bool condition, + std::string conditionExpression = "", + long lineNumber, + std::string fileName ); + + void CPPUNIT_API assertNotEqualImplementation( std::string expected, + std::string actual, + long lineNumber, + std::string fileName ); + + + template + void assertEquals( const T& expected, + const T& actual, + long lineNumber, + std::string fileName ) + { + if ( !assertion_traits::equal(expected,actual) ) // lazy toString conversion... + { + assertNotEqualImplementation( assertion_traits::toString(expected), + assertion_traits::toString(actual), + lineNumber, + fileName ); + } + } + + void CPPUNIT_API assertEquals( double expected, + double actual, + double delta, + long lineNumber, + std::string fileName ); #else // using SourceLine - template - void assertEquals( const T& expected, - const T& actual, - SourceLine sourceLine, - const std::string &message ="" ) - { - if ( !assertion_traits::equal(expected,actual) ) // lazy toString conversion... - { - Asserter::failNotEqual( assertion_traits::toString(expected), - assertion_traits::toString(actual), - sourceLine, - message ); - } - } - - void CPPUNIT_API assertDoubleEquals( double expected, - double actual, - double delta, - SourceLine sourceLine ); + template + void assertEquals( const T& expected, + const T& actual, + SourceLine sourceLine, + const std::string &message ="" ) + { + if ( !assertion_traits::equal(expected,actual) ) // lazy toString conversion... + { + Asserter::failNotEqual( assertion_traits::toString(expected), + assertion_traits::toString(actual), + sourceLine, + message ); + } + } + + void CPPUNIT_API assertDoubleEquals( double expected, + double actual, + double delta, + SourceLine sourceLine ); #endif - } - +} /* A set of macros which allow us to get the line number * and file name at the point of an error. @@ -118,15 +119,22 @@ /** Assertions that a condition is \c true. * \ingroup Assertions */ -#define CPPUNIT_ASSERT(condition) \ - ( ::CppUnit::Asserter::failIf( !(condition), \ - (#condition), \ - CPPUNIT_SOURCELINE() ) ) + // LLA: due to the fact, that side effects are not wished, we create a local scope, + // assign the condition to a local variable and check this variable again and again. + +#define CPPUNIT_ASSERT(condition) \ + { bool __bLocalCondition = condition; \ + CheckBoom((__bLocalCondition), (#condition)); \ + (::CppUnit::Asserter::failIf( !(__bLocalCondition), \ + (#condition), \ + CPPUNIT_SOURCELINE() ) ); } #else -#define CPPUNIT_ASSERT(condition) \ - ( ::CppUnit::Asserter::failIf( !(condition), \ - "", \ - CPPUNIT_SOURCELINE() ) ) +#define CPPUNIT_ASSERT(condition) \ + { bool __bLocalCondition = condition; \ + CheckBoom((__bLocalCondition), ""); \ + (::CppUnit::Asserter::failIf( !(__bLocalCondition), \ + "", \ + CPPUNIT_SOURCELINE() ) ); } #endif /** Assertion with a user specified message. @@ -136,25 +144,33 @@ * \param condition If this condition evaluates to \c false then the * test failed. */ -#define CPPUNIT_ASSERT_MESSAGE(message,condition) \ - ( ::CppUnit::Asserter::failIf( !(condition), \ - (message), \ - CPPUNIT_SOURCELINE() ) ) +#define CPPUNIT_ASSERT_MESSAGE(message,condition) \ + { bool __bLocalCondition = (condition); \ + CheckBoom((__bLocalCondition), (message)); \ + (::CppUnit::Asserter::failIf( !(__bLocalCondition), \ + (message), \ + CPPUNIT_SOURCELINE() ) ); } + +#define CPPUNIT_ASSERT_STUB() \ + CheckBoom((1 == 0), ("This is only a stub.")); \ + (::CppUnit::Asserter::failStub("This is only a stub.", \ + CPPUNIT_SOURCELINE() ) ) + /** Fails with the specified message. * \ingroup Assertions * \param message Message reported in diagnostic. */ #define CPPUNIT_FAIL( message ) \ - ( ::CppUnit::Asserter::fail( message, \ - CPPUNIT_SOURCELINE() ) ) + ( ::CppUnit::Asserter::fail( message, \ + CPPUNIT_SOURCELINE() ) ) #ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED /// Generalized macro for primitive value comparisons #define CPPUNIT_ASSERT_EQUAL(expected,actual) \ - ( ::CppUnit::TestAssert::assertEquals( (expected), \ - (actual), \ - __LINE__, __FILE__ ) ) + ( ::CppUnit::TestAssert::assertEquals( (expected), \ + (actual), \ + __LINE__, __FILE__ ) ) #else /** Asserts that two values are equals. * \ingroup Assertions @@ -173,9 +189,9 @@ * removed by specializing the CppUnit::assertion_traits. */ #define CPPUNIT_ASSERT_EQUAL(expected,actual) \ - ( ::CppUnit::TestAssert::assertEquals( (expected), \ - (actual), \ - CPPUNIT_SOURCELINE() ) ) + ( ::CppUnit::TestAssert::assertEquals( (expected), \ + (actual), \ + CPPUNIT_SOURCELINE() ) ) /** Asserts that two values are equals, provides additional messafe on failure. * \ingroup Assertions @@ -196,20 +212,20 @@ * removed by specializing the CppUnit::assertion_traits. */ #define CPPUNIT_ASSERT_EQUAL_MESSAGE(message,expected,actual) \ - ( ::CppUnit::TestAssert::assertEquals( (expected), \ - (actual), \ - CPPUNIT_SOURCELINE(), \ - (message) ) ) + ( ::CppUnit::TestAssert::assertEquals( (expected), \ + (actual), \ + CPPUNIT_SOURCELINE(), \ + (message) ) ) #endif /*! \brief Macro for primitive value comparisons * \ingroup Assertions */ #define CPPUNIT_ASSERT_DOUBLES_EQUAL(expected,actual,delta) \ - ( ::CppUnit::TestAssert::assertDoubleEquals( (expected), \ - (actual), \ - (delta), \ - CPPUNIT_SOURCELINE() ) ) + ( ::CppUnit::TestAssert::assertDoubleEquals( (expected), \ + (actual), \ + (delta), \ + CPPUNIT_SOURCELINE() ) ) // Backwards compatibility @@ -223,7 +239,6 @@ #endif - } // namespace CppUnit #endif // CPPUNIT_TESTASSERT_H --- misc/cppunit-1.8.0/include/cppunit/TestCaller.h 2002-03-28 16:47:07.000000000 +0100 +++ misc/build/cppunit-1.8.0/include/cppunit/TestCaller.h 2009-09-12 14:15:35.171875000 +0200 @@ -111,7 +111,7 @@ * \param name name of this TestCaller * \param test the method this TestCaller calls in runTest() */ - TestCaller( std::string name, TestMethod test ) : + TestCaller( std::string const& name, TestMethod test ) : TestCase( name ), m_ownFixture( true ), m_fixture( new Fixture() ), @@ -128,7 +128,7 @@ * \param test the method this TestCaller calls in runTest() * \param fixture the Fixture to invoke the test method on. */ - TestCaller(std::string name, TestMethod test, Fixture& fixture) : + TestCaller(std::string const& name, TestMethod test, Fixture& fixture) : TestCase( name ), m_ownFixture( false ), m_fixture( &fixture ), @@ -145,7 +145,7 @@ * \param test the method this TestCaller calls in runTest() * \param fixture the Fixture to invoke the test method on. */ - TestCaller(std::string name, TestMethod test, Fixture* fixture) : + TestCaller(std::string const& name, TestMethod test, Fixture* fixture) : TestCase( name ), m_ownFixture( true ), m_fixture( fixture ), --- misc/cppunit-1.8.0/include/cppunit/TestCase.h 2002-03-27 18:56:45.000000000 +0100 +++ misc/build/cppunit-1.8.0/include/cppunit/TestCase.h 2009-09-12 14:15:35.187500000 +0200 @@ -3,15 +3,12 @@ #include #include -#include #include #include - namespace CppUnit { -class TestResult; - +//# class TestResult; /*! \brief A single test object. * @@ -28,25 +25,25 @@ { public: - TestCase( std::string Name ); + TestCase( std::string const& Name ); //! \internal TestCase(); ~TestCase(); - virtual void run(TestResult *result); + virtual void run(hTestResult pResult); virtual int countTestCases() const; std::string getName() const; std::string toString() const; //! FIXME: what is this for? - virtual TestResult *run(); + //# virtual TestResult *run(); protected: //! FIXME: this should probably be pure virtual. virtual void runTest(); //! Create TestResult for the run(void) method. - TestResult *defaultResult(); + //# TestResult *defaultResult(); private: TestCase( const TestCase &other ); --- misc/cppunit-1.8.0/include/cppunit/TestFailure.h 2002-03-28 16:47:07.000000000 +0100 +++ misc/build/cppunit-1.8.0/include/cppunit/TestFailure.h 2009-09-12 14:15:35.187500000 +0200 @@ -4,6 +4,16 @@ #include #include +namespace ErrorType +{ + enum num + { + ET_FAILURE = 1, + ET_ERROR = 2, + ET_SIGNAL = 4 + }; +} + namespace CppUnit { class Exception; @@ -20,12 +30,13 @@ * TestFailure assumes lifetime control for any exception * passed to it. */ + class CPPUNIT_API TestFailure { public: TestFailure( Test *failedTest, Exception *thrownException, - bool isError ); + ErrorType::num eError ); virtual ~TestFailure (); @@ -36,6 +47,7 @@ virtual SourceLine sourceLine() const; virtual bool isError() const; + virtual ErrorType::num getErrorType() const; virtual std::string failedTestName() const; @@ -46,7 +58,7 @@ protected: Test *m_failedTest; Exception *m_thrownException; - bool m_isError; + ErrorType::num m_eError; private: TestFailure( const TestFailure &other ); --- misc/cppunit-1.8.0/include/cppunit/TestFixture.h 2002-03-28 16:47:07.000000000 +0100 +++ misc/build/cppunit-1.8.0/include/cppunit/TestFixture.h 2009-09-12 14:15:35.203125000 +0200 @@ -74,11 +74,6 @@ * } * \endcode * - * A set of macros have been created for convenience. They are located in HelperMacros.h. - * - * \see TestResult, TestSuite, TestCaller, - * \see CPPUNIT_TEST_SUB_SUITE, CPPUNIT_TEST, CPPUNIT_TEST_SUITE_END, - * \see CPPUNIT_TEST_SUITE_REGISTRATION, CPPUNIT_TEST_EXCEPTION, CPPUNIT_TEST_FAIL. */ class CPPUNIT_API TestFixture { --- misc/cppunit-1.8.0/include/cppunit/TestSuite.h 2002-03-28 16:47:07.000000000 +0100 +++ misc/build/cppunit-1.8.0/include/cppunit/TestSuite.h 2009-09-12 14:15:35.218750000 +0200 @@ -4,9 +4,11 @@ #include #if CPPUNIT_NEED_DLL_DECL +#ifdef _MSC_VER #pragma warning( push ) #pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z #endif +#endif #include #include @@ -14,7 +16,7 @@ namespace CppUnit { -class TestResult; +//# class TestResult; #if CPPUNIT_NEED_DLL_DECL template class CPPUNIT_API std::vector; @@ -35,7 +37,6 @@ * Note that TestSuites assume lifetime * control for any tests added to them. * - * TestSuites do not register themselves in the TestRegistry. * \see Test * \see TestCaller */ @@ -44,10 +45,10 @@ class CPPUNIT_API TestSuite : public Test { public: - TestSuite( std::string name = "" ); + TestSuite( std::string const& name = "" ); ~TestSuite(); - void run( TestResult *result ); + void run( hTestResult pResult ); int countTestCases() const; std::string getName() const; std::string toString() const; @@ -71,7 +72,9 @@ #if CPPUNIT_NEED_DLL_DECL +#ifdef _MSC_VER #pragma warning( pop ) #endif +#endif #endif // CPPUNIT_TESTSUITE_H --- misc/cppunit-1.8.0/include/cppunit/callbackfunc_fktptr.h 2009-09-14 08:43:30.656250000 +0200 +++ misc/build/cppunit-1.8.0/include/cppunit/callbackfunc_fktptr.h 2009-09-12 15:11:06.859375000 +0200 @@ -1 +1,47 @@ -dummy +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _callbackfunc_fktptr_h +#define _callbackfunc_fktptr_h + +#ifdef __cplusplus +extern "C" { +#endif + +// these typedefs are used for the TestCase, to call the TestResult functions. +// The TestResult is only in the testshl tool, not in the test libraries. + +typedef void* hTest; +typedef void* hException; + +typedef long (* FktPtr_CallbackDispatch)(int x, ...); + +#ifdef __cplusplus +} +#endif + +#endif --- misc/cppunit-1.8.0/include/cppunit/config-auto.h 2009-09-12 15:20:48.250000000 +0200 +++ misc/build/cppunit-1.8.0/include/cppunit/config-auto.h 2009-09-12 14:15:35.234375000 +0200 @@ -1 +1,64 @@ -dummy +#ifndef _INCLUDE_CPPUNIT_CONFIG_AUTO_H +#define _INCLUDE_CPPUNIT_CONFIG_AUTO_H 1 + +/* include/cppunit/config-auto.h. Generated automatically at end of configure. */ +/* config/config.h. Generated automatically by configure. */ +/* config/config.h.in. Generated automatically from configure.in by autoheader. */ + +/* define if library uses std::string::compare(string,pos,n) */ +#ifndef CPPUNIT_FUNC_STRING_COMPARE_STRING_FIRST +#define CPPUNIT_FUNC_STRING_COMPARE_STRING_FIRST 1 +#endif + +/* define if the library defines sstream */ +#ifndef CPPUNIT_HAVE_SSTREAM +#define CPPUNIT_HAVE_SSTREAM 1 +#endif + +/* Define if you have the header file. */ +#ifndef CPPUNIT_HAVE_CMATH +#define CPPUNIT_HAVE_CMATH 1 +#endif + +/* Define if you have the header file. */ +#ifndef CPPUNIT_HAVE_DLFCN_H +#define CPPUNIT_HAVE_DLFCN_H 1 +#endif + +/* define to 1 if the compiler implements namespaces */ +#ifndef CPPUNIT_HAVE_NAMESPACES +#define CPPUNIT_HAVE_NAMESPACES 1 +#endif + +/* define if the compiler supports Run-Time Type Identification */ +#ifndef CPPUNIT_HAVE_RTTI +#define CPPUNIT_HAVE_RTTI 0 +#endif + +/* define if the compiler has stringstream */ +#ifndef CPPUNIT_HAVE_SSTREAM +#define CPPUNIT_HAVE_SSTREAM 1 +#endif + +/* Define if you have the header file. */ +#ifndef CPPUNIT_HAVE_STRSTREAM +#define CPPUNIT_HAVE_STRSTREAM 1 +#endif + +/* Name of package */ +#ifndef CPPUNIT_PACKAGE +#define CPPUNIT_PACKAGE "cppunit" +#endif + +/* Define to 1 to use type_info::name() for class names */ +#ifndef CPPUNIT_USE_TYPEINFO_NAME +#define CPPUNIT_USE_TYPEINFO_NAME CPPUNIT_HAVE_RTTI +#endif + +/* Version number of package */ +#ifndef CPPUNIT_VERSION +#define CPPUNIT_VERSION "1.8.0" +#endif + +/* _INCLUDE_CPPUNIT_CONFIG_AUTO_H */ +#endif --- misc/cppunit-1.8.0/include/cppunit/config-msvc6.h 2002-03-25 19:41:39.000000000 +0100 +++ misc/build/cppunit-1.8.0/include/cppunit/config-msvc6.h 2009-09-12 14:15:35.250000000 +0200 @@ -21,12 +21,10 @@ #define CPPUNIT_HAVE_NAMESPACES 1 #endif -/* define if the compiler supports Run-Time Type Identification */ #ifndef CPPUNIT_HAVE_RTTI -#define CPPUNIT_HAVE_RTTI 1 +#define CPPUNIT_HAVE_RTTI 0 #endif -/* Define to 1 to use type_info::name() for class names */ #ifndef CPPUNIT_USE_TYPEINFO_NAME #define CPPUNIT_USE_TYPEINFO_NAME CPPUNIT_HAVE_RTTI #endif --- misc/cppunit-1.8.0/include/cppunit/extensions/AutoRegisterSuite.h 2002-03-28 16:47:07.000000000 +0100 +++ misc/build/cppunit-1.8.0/include/cppunit/extensions/AutoRegisterSuite.h 2009-09-12 14:15:35.265625000 +0200 @@ -1,6 +1,7 @@ #ifndef CPPUNIT_EXTENSIONS_AUTOREGISTERSUITE_H #define CPPUNIT_EXTENSIONS_AUTOREGISTERSUITE_H +#include #include #include #include @@ -30,19 +31,20 @@ /** Auto-register the suite factory in the global registry. */ AutoRegisterSuite() - { - TestFactory *factory = new TestSuiteFactory(); - TestFactoryRegistry::getRegistry().registerFactory( factory ); - } - + { + TestFactory *factory = new TestSuiteFactory(); + TestFactoryRegistry::getRegistry().registerFactory( factory ); + } + /** Auto-register the suite factory in the specified registry. * \param name Name of the registry. */ AutoRegisterSuite( const std::string &name ) - { - TestFactory *factory = new TestSuiteFactory(); - TestFactoryRegistry::getRegistry( name ).registerFactory( factory ); - } + { + // printf("AutoRegisterSuite %s\n", name.c_str()); + TestFactory *factory = new TestSuiteFactory(); + TestFactoryRegistry::getRegistry( name ).registerFactory( factory ); + } }; } // namespace CppUnit --- misc/cppunit-1.8.0/include/cppunit/extensions/HelperMacros.h 2002-03-28 16:47:07.000000000 +0100 +++ misc/build/cppunit-1.8.0/include/cppunit/extensions/HelperMacros.h 2009-09-12 14:15:35.281250000 +0200 @@ -132,6 +132,14 @@ } \ }; \ public: \ + static CppUnit::TestSuite *suite() \ + { \ + CppUnit::TestSuiteBuilder<__ThisTestFixtureType> \ + builder __CPPUNIT_SUITE_CTOR_ARGS( ATestFixtureType ); \ + ThisTestFixtureFactory factory; \ + __ThisTestFixtureType::registerTests( builder.suite(), &factory ); \ + return builder.takeSuite(); \ + } \ static void \ registerTests( CppUnit::TestSuite *suite, \ CppUnit::TestFixtureFactory *factory ) \ @@ -245,14 +253,6 @@ #define CPPUNIT_TEST_SUITE_END() \ builder.takeSuite(); \ } \ - static CppUnit::TestSuite *suite() \ - { \ - CppUnit::TestSuiteBuilder<__ThisTestFixtureType> \ - builder __CPPUNIT_SUITE_CTOR_ARGS( ATestFixtureType ); \ - ThisTestFixtureFactory factory; \ - __ThisTestFixtureType::registerTests( builder.suite(), &factory ); \ - return builder.takeSuite(); \ - } \ private: /* dummy typedef so that the macro can still end with ';'*/ \ typedef ThisTestFixtureFactory __ThisTestFixtureFactory @@ -283,10 +283,12 @@ * \see CPPUNIT_TEST_SUITE, CppUnit::AutoRegisterSuite, * CppUnit::TestFactoryRegistry. */ -#define CPPUNIT_TEST_SUITE_REGISTRATION( ATestFixtureType ) \ - static CppUnit::AutoRegisterSuite< ATestFixtureType > \ - __CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite ) +/* LLA: + #define CPPUNIT_TEST_SUITE_REGISTRATION( ATestFixtureType ) \ + static CppUnit::AutoRegisterSuite< ATestFixtureType > \ + __CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite ) +*/ /** Adds the specified fixture suite to the specified registry suite. * \ingroup CreatingTestSuite @@ -325,21 +327,7 @@ */ #define CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( ATestFixtureType, suiteName ) \ static CppUnit::AutoRegisterSuite< ATestFixtureType > \ - __CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite )(suiteName) - - -// Backwards compatibility -// (Not tested!) - -#if CPPUNIT_ENABLE_CU_TEST_MACROS - -#define CU_TEST_SUITE(tc) CPPUNIT_TEST_SUITE(tc) -#define CU_TEST_SUB_SUITE(tc,sc) CPPUNIT_TEST_SUB_SUITE(tc,sc) -#define CU_TEST(tm) CPPUNIT_TEST(tm) -#define CU_TEST_SUITE_END() CPPUNIT_TEST_SUITE_END() -#define CU_TEST_SUITE_REGISTRATION(tc) CPPUNIT_TEST_SUITE_REGISTRATION(tc) - -#endif + __CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite )( suiteName ) #endif // CPPUNIT_EXTENSIONS_HELPERMACROS_H --- misc/cppunit-1.8.0/include/cppunit/extensions/TestFactoryRegistry.h 2002-03-28 16:47:07.000000000 +0100 +++ misc/build/cppunit-1.8.0/include/cppunit/extensions/TestFactoryRegistry.h 2009-09-12 14:15:35.296875000 +0200 @@ -4,13 +4,16 @@ #include #if CPPUNIT_NEED_DLL_DECL +#ifdef _MSC_VER #pragma warning( push ) #pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z #endif +#endif #include #include #include +#include namespace CppUnit { @@ -79,7 +82,7 @@ * \param name Name of the registry. It is the name of TestSuite returned by * makeTest(). */ - TestFactoryRegistry( std::string name = "All Tests" ); + TestFactoryRegistry( std::string const& name = "All Tests" ); /// Destructor. virtual ~TestFactoryRegistry(); @@ -105,6 +108,7 @@ * specified name. */ static TestFactoryRegistry &getRegistry( const std::string &name ); + static void testRegistries(hTestResult _pResult); /** Adds the registered tests to the specified suite. * \param suite Suite the tests are added to. @@ -116,9 +120,12 @@ * \param factory Factory to register. * \deprecated Use registerFactory( TestFactory *) instead. */ +protected: + void registerFactory( const std::string &name, TestFactory *factory ); - +public: + /** Adds the specified TestFactory to the registry. * * \param factory Factory to register. @@ -141,8 +148,10 @@ #if CPPUNIT_NEED_DLL_DECL +#ifdef _MSC_VER #pragma warning( pop ) #endif +#endif #endif // CPPUNIT_EXTENSIONS_TESTFACTORYREGISTRY_H --- misc/cppunit-1.8.0/include/cppunit/extensions/TestSuiteBuilder.h 2002-03-28 16:47:07.000000000 +0100 +++ misc/build/cppunit-1.8.0/include/cppunit/extensions/TestSuiteBuilder.h 2009-09-12 14:15:35.312500000 +0200 @@ -34,11 +34,11 @@ } #endif - TestSuiteBuilder( TestSuite *suite ) : m_suite( suite ) + TestSuiteBuilder( TestSuite *_suite ) : m_suite( _suite ) { } - TestSuiteBuilder(std::string name) : m_suite( new TestSuite(name) ) + TestSuiteBuilder(std::string const& name) : m_suite( new TestSuite(name) ) { } @@ -57,7 +57,7 @@ m_suite->addTest( test ); } - void addTestCaller( std::string methodName, + void addTestCaller( std::string const& methodName, TestMethod testMethod ) { Test *test = @@ -66,7 +66,7 @@ addTest( test ); } - void addTestCaller( std::string methodName, + void addTestCaller( std::string const& methodName, TestMethod testMethod, Fixture *fixture ) { @@ -78,7 +78,7 @@ } template - void addTestCallerForException( std::string methodName, + void addTestCallerForException( std::string const& methodName, TestMethod testMethod, Fixture *fixture, ExceptionType *dummyPointer ) @@ -93,7 +93,8 @@ std::string makeTestName( const std::string &methodName ) { - return m_suite->getName() + "." + methodName; + // return m_suite->getName() + "." + methodName; + return methodName; } private: --- misc/cppunit-1.8.0/include/cppunit/externcallbackfunc.hxx 2009-09-14 08:43:30.703125000 +0200 +++ misc/build/cppunit-1.8.0/include/cppunit/externcallbackfunc.hxx 2009-09-12 15:12:02.703125000 +0200 @@ -1 +1,36 @@ -dummy +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef _externcallbackfunc_hxx +#define _externcallbackfunc_hxx + +#include + +// these pointers have they origin in 'tresregister.cxx' +extern FktPtr_CallbackDispatch pCallbackFunc; + +#endif --- misc/cppunit-1.8.0/include/cppunit/tagvalues.hxx 2009-09-14 08:43:30.609375000 +0200 +++ misc/build/cppunit-1.8.0/include/cppunit/tagvalues.hxx 2009-09-12 15:14:27.812500000 +0200 @@ -1 +1,91 @@ -dummy +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * + * for a copy of the LGPLv3 License. + * + ************************************************************************/ + +#ifndef TAGVALUES_H +#define TAGVALUES_H + +typedef unsigned long Tag; + +/* constants for Tag.ti_Tag, control tag values */ +#define TAG_DONE (Tag(0L)) /* terminates array of TagItems. ti_Data unused */ +#define TAG_END (Tag(0L)) /* synonym for TAG_DONE */ +#define TAG_IGNORE (Tag(1L)) /* ignore this item, not end of array */ +#define TAG_MORE (Tag(2L)) /* ti_Data is pointer to another array of TagItems + * note that this tag terminates the current array + */ +#define TAG_SKIP (Tag(3L)) /* skip this and the next ti_Data items */ + +/* differentiates user tags from control tags */ +#define TAG_USER (Tag(1L<<31)) + + +#define TAG_TYPE (Tag(TAG_USER | (0x01L))) + +#define TAG_RESULT (TAG_USER | 0x100) + +#define RESULT_START (Tag(TAG_RESULT | (0x02L))) +#define TAG_RESULT_PTR (Tag(TAG_RESULT | (0x03L))) +#define TAG_TEST_PTR (Tag(TAG_RESULT | (0x04L))) + +#define RESULT_END (Tag(TAG_RESULT | (0x05L))) + +#define RESULT_ADD_FAILURE (Tag(TAG_RESULT | (0x06L))) +#define RESULT_ADD_ERROR (Tag(TAG_RESULT | (0x07L))) + +#define TAG_EXCEPTION (Tag(TAG_RESULT | (0x08L))) + +#define RESULT_ADD_INFO (Tag(TAG_RESULT | (0x09L))) +#define TAG_INFO (Tag(TAG_RESULT | (0x0aL))) + +#define RESULT_ENTER_NODE (Tag(TAG_RESULT | (0x0bL))) +#define RESULT_LEAVE_NODE (Tag(TAG_RESULT | (0x0cL))) +#define TAG_NODENAME (Tag(TAG_RESULT | (0x0dL))) + +#define RESULT_SHOULD_STOP (Tag(TAG_RESULT | (0x0eL))) + + +#define TAG_SIGNAL (TAG_USER | 0x200) +// #define SIGNAL_CHECK (Tag(TAG_SIGNAL | (0x01L))) +// #define INIT_SIGNAL_HANDLING (Tag(TAG_SIGNAL | (0x04L))) +// #define RELEASE_SIGNAL_HANDLING (Tag(TAG_SIGNAL | (0x05L))) + +#define SIGNAL_START_TEST (Tag(TAG_SIGNAL | (0x06L))) +#define SIGNAL_END_TEST (Tag(TAG_SIGNAL | (0x07L))) + +#define TAG_EXECUTION (TAG_USER | 0x400) +#define EXECUTION_CHECK (Tag(TAG_EXECUTION | (0x01))) +#define INIT_TEST (Tag(TAG_EXECUTION | (0x02))) +#define RELEASE_TEST (Tag(TAG_EXECUTION | (0x03))) +// #define EXECUTION_PUSH_NAME (Tag(TAG_EXECUTION | (0x04))) +// #define EXECUTION_POP_NAME (Tag(TAG_EXECUTION | (0x05))) + +#define DO_NOT_EXECUTE 666 +#define GO_EXECUTE 1 + +typedef long ReturnValue; + +#endif --- misc/cppunit-1.8.0/makefile.mk 2009-09-12 15:20:48.343750000 +0200 +++ misc/build/cppunit-1.8.0/makefile.mk 2009-09-12 14:15:35.328125000 +0200 @@ -1 +1,29 @@ -dummy +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +target: + cd src && $(MAKE) $(MFLAGS) $(CALLMACROS) --- misc/cppunit-1.8.0/src/cppunit/Asserter.cpp 2002-03-27 20:04:02.000000000 +0100 +++ misc/build/cppunit-1.8.0/src/cppunit/Asserter.cpp 2009-09-12 14:15:35.343750000 +0200 @@ -1,52 +1,72 @@ #include #include - namespace CppUnit { - + namespace Asserter { +void +fail( std::string const& message, + SourceLine const& sourceLine ) +{ + throw Exception( message, sourceLine ); +} void -fail( std::string message, - SourceLine sourceLine ) +failStub( std::string const& message, + SourceLine const& sourceLine ) { - throw Exception( message, sourceLine ); + throw StubException( message, sourceLine ); } void failIf( bool shouldFail, - std::string message, - SourceLine location ) + std::string const& message, + SourceLine const& location ) { if ( shouldFail ) - fail( message, location ); + { + fail( message, location ); + } } - +// ----------------------------------------------------------------------------- void -failNotEqual( std::string expected, - std::string actual, - SourceLine sourceLine, - std::string additionalMessage ) +failIf( bool shouldFail, + const char* _suMessage, + SourceLine const& location ) { - throw NotEqualException( expected, - actual, - sourceLine, - additionalMessage ); + if ( shouldFail ) + { + std::string message( _suMessage ); + fail( message, location ); + } +} +// ----------------------------------------------------------------------------- + +void +failNotEqual( std::string const& expected, + std::string const& actual, + SourceLine const& sourceLine, + std::string const& additionalMessage ) +{ + throw NotEqualException( expected, + actual, + sourceLine, + additionalMessage ); } void failNotEqualIf( bool shouldFail, - std::string expected, - std::string actual, - SourceLine sourceLine, - std::string additionalMessage ) + std::string const& expected, + std::string const& actual, + SourceLine const& sourceLine, + std::string const& additionalMessage ) { if ( shouldFail ) failNotEqual( expected, actual, sourceLine, additionalMessage ); --- misc/cppunit-1.8.0/src/cppunit/Exception.cpp 2001-10-19 20:37:24.000000000 +0200 +++ misc/build/cppunit-1.8.0/src/cppunit/Exception.cpp 2009-09-12 14:15:35.359375000 +0200 @@ -19,20 +19,19 @@ /// Construct the exception Exception::Exception( const Exception &other ) : - std::exception( other ) -{ - m_message = other.m_message; - m_sourceLine = other.m_sourceLine; -} + std::exception( other ), + m_message( other.m_message), + m_sourceLine(other.m_sourceLine) +{} /*! * \deprecated Use other constructor instead. */ -Exception::Exception( std::string message, - SourceLine sourceLine ) : - m_message( message ), - m_sourceLine( sourceLine ) +Exception::Exception( std::string const& _message, + SourceLine const& _sourceLine ) : + m_message( _message ), + m_sourceLine( _sourceLine ) { } @@ -41,9 +40,9 @@ /*! * \deprecated Use other constructor instead. */ -Exception::Exception( std::string message, +Exception::Exception( std::string const& message, long lineNumber, - std::string fileName ) : + std::string const& fileName ) : m_message( message ), m_sourceLine( fileName, lineNumber ) { --- misc/cppunit-1.8.0/src/cppunit/NotEqualException.cpp 2001-10-06 00:27:14.000000000 +0200 +++ misc/build/cppunit-1.8.0/src/cppunit/NotEqualException.cpp 2009-09-12 14:15:35.359375000 +0200 @@ -3,17 +3,17 @@ namespace CppUnit { -NotEqualException::NotEqualException( std::string expected, - std::string actual, - SourceLine sourceLine , - std::string additionalMessage ) : - Exception( "Expected: " + expected + - ", but was: " + actual + - "." + additionalMessage , - sourceLine), - m_expected( expected ), - m_actual( actual ), - m_additionalMessage( additionalMessage ) +NotEqualException::NotEqualException( std::string const& _expected, + std::string const& _actual, + SourceLine const& _sourceLine , + std::string const& _additionalMessage ) : + Exception( "Expected: " + _expected + + ", but was: " + _actual + + "." + _additionalMessage , + _sourceLine), + m_expected( _expected ), + m_actual( _actual ), + m_additionalMessage( _additionalMessage ) { } @@ -22,10 +22,10 @@ /*! * \deprecated Use other constructor instead. */ -NotEqualException::NotEqualException( std::string expected, - std::string actual, +NotEqualException::NotEqualException( std::string const& expected, + std::string const& actual, long lineNumber, - std::string fileName ) : + std::string const& fileName ) : Exception( "Expected: " + expected + ", but was: " + actual, lineNumber, fileName ), --- misc/cppunit-1.8.0/src/cppunit/SourceLine.cpp 2001-10-06 00:27:14.000000000 +0200 +++ misc/build/cppunit-1.8.0/src/cppunit/SourceLine.cpp 2009-09-12 14:15:35.375000000 +0200 @@ -10,10 +10,10 @@ } -SourceLine::SourceLine( const std::string &fileName, - int lineNumber ) : - m_fileName( fileName ), - m_lineNumber( lineNumber ) +SourceLine::SourceLine( const std::string &file, + int line ) : + m_fileName( file ), + m_lineNumber( line ) { } --- misc/cppunit-1.8.0/src/cppunit/TestAssert.cpp 2001-10-07 21:36:47.000000000 +0200 +++ misc/build/cppunit-1.8.0/src/cppunit/TestAssert.cpp 2009-09-12 14:15:35.390625000 +0200 @@ -1,4 +1,4 @@ -#if HAVE_CMATH +#ifdef HAVE_CMATH # include #else # include @@ -15,56 +15,56 @@ /// Check for a failed general assertion void TestAssert::assertImplementation( bool condition, - std::string conditionExpression, - long lineNumber, - std::string fileName ) + std::string conditionExpression, + long lineNumber, + std::string fileName ) { Asserter::failIf( condition, - conditionExpression, - SourceLine( fileName, lineNumber ) ); + conditionExpression, + SourceLine( fileName, lineNumber ) ); } /// Reports failed equality void TestAssert::assertNotEqualImplementation( std::string expected, - std::string actual, - long lineNumber, - std::string fileName ) + std::string actual, + long lineNumber, + std::string fileName ) { Asserter::failNotEqual( expected, - actual, - SouceLine( fileName, lineNumber ), "" ); + actual, + SouceLine( fileName, lineNumber ), "" ); } /// Check for a failed equality assertion void TestAssert::assertEquals( double expected, - double actual, - double delta, - long lineNumber, - std::string fileName ) + double actual, + double delta, + long lineNumber, + std::string fileName ) { if (fabs (expected - actual) > delta) - assertNotEqualImplementation( assertion_traits::toString(expected), - assertion_traits::toString(actual), - lineNumber, - fileName ); + assertNotEqualImplementation( assertion_traits::toString(expected), + assertion_traits::toString(actual), + lineNumber, + fileName ); } #else // CPPUNIT_ENABLE_SOURCELINE_DEPRECATED void TestAssert::assertDoubleEquals( double expected, - double actual, - double delta, - SourceLine sourceLine ) + double actual, + double delta, + SourceLine sourceLine ) { Asserter::failNotEqualIf( fabs( expected - actual ) > delta, - assertion_traits::toString(expected), - assertion_traits::toString(actual), - sourceLine ); + assertion_traits::toString(expected), + assertion_traits::toString(actual), + sourceLine ); } --- misc/cppunit-1.8.0/src/cppunit/TestCase.cpp 2002-03-25 23:35:34.000000000 +0100 +++ misc/build/cppunit-1.8.0/src/cppunit/TestCase.cpp 2009-09-12 15:14:46.515625000 +0200 @@ -1,74 +1,142 @@ +#include #include #include #include #include "cppunit/TestCase.h" #include "cppunit/Exception.h" -#include "cppunit/TestResult.h" - +#include "cppunit/tagvalues.hxx" +#include "cppunit/externcallbackfunc.hxx" namespace CppUnit { /// Create a default TestResult -CppUnit::TestResult* -TestCase::defaultResult() -{ - return new TestResult; -} - - -/// Run the test and catch any exceptions that are triggered by it -void -TestCase::run( TestResult *result ) -{ - result->startTest(this); - - try { - setUp(); - - try { - runTest(); - } - catch ( Exception &e ) { - Exception *copy = e.clone(); - result->addFailure( this, copy ); - } - catch ( std::exception &e ) { - result->addError( this, new Exception( e.what() ) ); - } - catch (...) { - Exception *e = new Exception( "caught unknown exception" ); - result->addError( this, e ); - } - - try { - tearDown(); - } - catch (...) { - result->addError( this, new Exception( "tearDown() failed" ) ); - } - } - catch (...) { - result->addError( this, new Exception( "setUp() failed" ) ); - } - - result->endTest( this ); -} - - -/// A default run method -TestResult * -TestCase::run() -{ - TestResult *result = defaultResult(); - - run (result); - return result; -} +//# CppUnit::TestResult* +//# TestCase::defaultResult() +//# { +//# return new TestResult; +//# } + + +/// Run the test and catch any exceptions that are triggered by it +//# void +//# TestCase::run( TestResult *result ) +//# { +//# result->startTest(this); +//# +//# try { +//# setUp(); +//# +//# try { +//# runTest(); +//# } +//# catch ( Exception &e ) { +//# Exception *copy = e.clone(); +//# result->addFailure( this, copy ); +//# } +//# catch ( std::exception &e ) { +//# result->addError( this, new Exception( e.what() ) ); +//# } +//# catch (...) { +//# Exception *e = new Exception( "caught unknown exception" ); +//# result->addError( this, e ); +//# } +//# +//# try { +//# tearDown(); +//# } +//# catch (...) { +//# result->addError( this, new Exception( "tearDown() failed" ) ); +//# } +//# } +//# catch (...) { +//# result->addError( this, new Exception( "setUp() failed" ) ); +//# } +//# +//# result->endTest( this ); +//# } +//# + +void +TestCase::run( hTestResult result ) +{ + CppUnit::Test* pTest = this; + + // if (signalCheck(pTest->getName()) == HAS_SIGNAL) + long nValue = (pCallbackFunc)(0 /* NULL */, TAG_TYPE, EXECUTION_CHECK, TAG_RESULT_PTR, result, TAG_NODENAME, pTest->getName().c_str(), TAG_DONE); + if (nValue == DO_NOT_EXECUTE) + { + return; + } + + // (pTestResult_StartTest)(result, pTest); + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_START, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_DONE); + + try + { + setUp(); + + try + { + runTest(); + // (pTestResult_AddInfo)(result, pTest, "PASSED"); + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_ADD_INFO, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_INFO, "PASSED", TAG_DONE); + } + catch ( CppUnit::StubException &) + { + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_ADD_INFO, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_INFO, "STUB", TAG_DONE ); + } + catch ( CppUnit::Exception &e ) + { + CppUnit::Exception *copy = e.clone(); + // (pTestResult_AddFailure)( result, pTest, copy ); + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_ADD_FAILURE, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_EXCEPTION, copy, TAG_DONE ); + } + catch ( std::exception &e ) + { + // (pTestResult_AddError)( result, pTest, new Exception( e.what() ) ); + (pCallbackFunc)( 0 /* NULL */, TAG_TYPE, RESULT_ADD_ERROR, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_EXCEPTION, new CppUnit::Exception( e.what() ), TAG_DONE ); + } + catch (...) + { + CppUnit::Exception *e = new CppUnit::Exception( "caught unknown exception" ); + // (pTestResult_AddError)( result, pTest, e ); + (pCallbackFunc)( 0 /* NULL */, TAG_TYPE, RESULT_ADD_ERROR, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_EXCEPTION, e, TAG_DONE ); + } + + try + { + tearDown(); + } + catch (...) + { + // (pTestResult_AddError)( result, pTest, new Exception( "tearDown() failed" ) ); + (pCallbackFunc)( 0 /* NULL */, TAG_TYPE, RESULT_ADD_ERROR, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_EXCEPTION, new CppUnit::Exception( "tearDown() failed" ), TAG_DONE ); + } + } + catch (...) + { + // (pTestResult_AddError)( result, pTest, new Exception( "setUp() failed" ) ); + (pCallbackFunc)( 0 /* NULL */, TAG_TYPE, RESULT_ADD_ERROR, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_EXCEPTION, new CppUnit::Exception( "setUp() failed" ), TAG_DONE ); + } + + // (pTestResult_EndTest)( result, pTest ); + (pCallbackFunc)( 0 /* NULL */, TAG_TYPE, RESULT_END, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_DONE ); +} + +/// A default run method +//# TestResult * +//# TestCase::run() +//# { +//# TestResult *result = defaultResult(); +//# +//# run (result); +//# return result; +//# } -/// All the work for runTest is deferred to subclasses -void +/// All the work for runTest is deferred to subclasses +void TestCase::runTest() { } @@ -77,7 +145,7 @@ /** Constructs a test case. * \param name the name of the TestCase. **/ -TestCase::TestCase( std::string name ) +TestCase::TestCase( std::string const& name ) : m_name(name) { } @@ -100,25 +168,25 @@ /// Returns a count of all the tests executed -int +int TestCase::countTestCases() const -{ - return 1; +{ + return 1; } /// Returns the name of the test case -std::string +std::string TestCase::getName() const -{ - return m_name; +{ + return m_name; } /// Returns the name of the test case instance -std::string +std::string TestCase::toString() const -{ +{ std::string className; #if CPPUNIT_USE_TYPEINFO_NAME @@ -128,8 +196,13 @@ className = "TestCase"; #endif - return className + "." + getName(); + return className + "." + getName(); } - + } // namespace CppUnit + +// The following sets variables for GNU EMACS +// Local Variables: +// tab-width:4 +// End: --- misc/cppunit-1.8.0/src/cppunit/TestFactoryRegistry.cpp 2002-03-28 16:47:08.000000000 +0100 +++ misc/build/cppunit-1.8.0/src/cppunit/TestFactoryRegistry.cpp 2009-09-12 15:17:54.093750000 +0200 @@ -1,12 +1,19 @@ +#include +#include #include #include -#include +#include +#include #if CPPUNIT_USE_TYPEINFO_NAME # include "cppunit/extensions/TypeInfoHelper.h" #endif +#include +#include + +#undef HELLOWORLD_DEBUGGER namespace CppUnit { @@ -26,15 +33,18 @@ static NamedRegistries &getInstance(); - TestFactoryRegistry &getRegistry( std::string name ); + TestFactoryRegistry &getRegistry( std::string const& name ); void wasDestroyed( TestFactory *factory ); bool needDestroy( TestFactory *factory ); + void testRegistries( hTestResult ); private: - typedef std::map Registries; - Registries m_registries; + typedef std::map MapRegistries; + // typedef std::pair StringTestFactoryRegistry; + // typedef std::vector< StringTestFactoryRegistry > MapRegistries; + MapRegistries m_registries; typedef std::set Factories; Factories m_factoriesToDestroy; @@ -44,13 +54,27 @@ NamedRegistries::~NamedRegistries() { - Registries::iterator it = m_registries.begin(); - while ( it != m_registries.end() ) - { - TestFactoryRegistry *registry = (it++)->second; - if ( needDestroy( registry ) ) - delete registry; - } +#ifdef HELLOWORLD_DEBUGGER + printf("~NamedRegistries.\n"); +#endif + MapRegistries::iterator it = m_registries.begin(); + while ( it != m_registries.end() ) + { + TestFactoryRegistry *registry = (it++)->second; + if ( needDestroy( registry ) ) + delete registry; + } +/* + for (MapRegistries::iterator it = m_registries.begin(); + it != m_registries.end(); + ++it) + { + StringTestFactoryRegistry stfr = *it; + TestFactoryRegistry *registry = stfr.second; + if ( needDestroy( registry ) ) + delete registry; + } +*/ } @@ -63,17 +87,55 @@ TestFactoryRegistry & -NamedRegistries::getRegistry( std::string name ) +NamedRegistries::getRegistry( std::string const& name ) { - Registries::const_iterator foundIt = m_registries.find( name ); - if ( foundIt == m_registries.end() ) +#ifdef HELLOWORLD_DEBUGGER + printf("getRegistry '%s', ", name.c_str()); +#endif + MapRegistries::const_iterator foundIt = m_registries.find( name ); + if ( foundIt == m_registries.end() ) + { + TestFactoryRegistry *factory = new TestFactoryRegistry( name ); + // m_registries.insert( std::make_pair( name, factory ) ); + m_registries[name] = factory; + m_factoriesToDestroy.insert( factory ); + +#ifdef HELLOWORLD_DEBUGGER + printf("factory not found, create.\n"); +#endif + return *factory; + } +#ifdef HELLOWORLD_DEBUGGER + printf("factory found.\n"); +#endif + return *foundIt->second; +/* + // MapRegistries::const_iterator foundIt; + TestFactoryRegistry *pFound = NULL; + for (MapRegistries::const_iterator it = m_registries.begin(); + it != m_registries.end(); + ++it) + { + StringTestFactoryRegistry stfr = *it; + if (name == stfr.first) + { + pFound = stfr.second; + break; + } + } + + // MapRegistries::const_iterator foundIt = m_registries.find( name ); + if ( pFound != NULL ) { TestFactoryRegistry *factory = new TestFactoryRegistry( name ); - m_registries.insert( std::make_pair( name, factory ) ); + // m_registries.insert( std::make_pair( name, factory ) ); + StringTestFactoryRegistry stfr = std::make_pair(name, factory); + m_registries.push_back(stfr); m_factoriesToDestroy.insert( factory ); return *factory; } - return *foundIt->second; + return *pFound; +*/ } @@ -91,9 +153,32 @@ return m_destroyedFactories.count( factory ) == 0; } +void NamedRegistries::testRegistries( hTestResult _pResult) +{ + // initialise the test handling + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, INIT_TEST, TAG_RESULT_PTR, _pResult, TAG_DONE); + + // Start signal based Check + for (MapRegistries::const_iterator it = m_registries.begin(); + it != m_registries.end(); + ++it) + { + std::string sName = (*it).first; + + CppUnit::Test* tp = CppUnit::TestFactoryRegistry::getRegistry(sName).makeTest(); + tp->run(_pResult); + } + // release test handling + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RELEASE_TEST, TAG_RESULT_PTR, _pResult, TAG_DONE); + // start normal based tests, leave signal signed tests out. -TestFactoryRegistry::TestFactoryRegistry( std::string name ) : + //! Allfunction in the inclusion list which has a flag, not found, has to call here. +} + +// ----------------------------------------------------------------------------- + +TestFactoryRegistry::TestFactoryRegistry( std::string const& name ) : m_name( name ) { } @@ -116,26 +201,38 @@ } } - +// static TestFactoryRegistry & TestFactoryRegistry::getRegistry() { return getRegistry( "All Tests" ); } - +// static TestFactoryRegistry & TestFactoryRegistry::getRegistry( const std::string &name ) { return NamedRegistries::getInstance().getRegistry( name ); } +// static +void TestFactoryRegistry::testRegistries( hTestResult _pResult ) +{ + NamedRegistries::getInstance().testRegistries( _pResult ); +} + void TestFactoryRegistry::registerFactory( const std::string &name, TestFactory *factory ) { - m_factories[name] = factory; +#ifdef HELLOWORLD_DEBUGGER + printf("registerFactory %s\n", name.c_str()); +#endif + m_factories[name] = factory; +#ifdef HELLOWORLD_DEBUGGER + printf("FactorySize: %d\n ", m_factories.size()); +#endif } @@ -144,10 +241,23 @@ { static int serialNumber = 1; - OStringStream ost; - ost << "@Dummy@" << serialNumber++; - - registerFactory( ost.str(), factory ); + std::string aStr("@Dummy@_"); + + char cBuf[20]; + char *pBuf = cBuf; + sprintf(pBuf, "%d", serialNumber++ ); + + aStr += std::string(pBuf); + + // LLA: this does not work within Solaris, could be a problem of the osl::Module::load? + // std::ostringstream ost; + // ost << "@Dummy@" << nValue; + // registerFactory( ost.str(), factory ); + +#ifdef HELLOWORLD_DEBUGGER + printf("aStr: %s\n", aStr.c_str()); +#endif + registerFactory( aStr, factory ); } @@ -163,6 +273,9 @@ void TestFactoryRegistry::addTestToSuite( TestSuite *suite ) { +#ifdef HELLOWORLD_DEBUGGER + printf("addTestToSuite %s\n", suite->getName().c_str()); +#endif for ( Factories::iterator it = m_factories.begin(); it != m_factories.end(); ++it ) --- misc/cppunit-1.8.0/src/cppunit/TestFailure.cpp 2002-02-28 11:57:20.000000000 +0100 +++ misc/build/cppunit-1.8.0/src/cppunit/TestFailure.cpp 2009-09-12 14:15:35.437500000 +0200 @@ -5,12 +5,12 @@ namespace CppUnit { /// Constructs a TestFailure with the given test and exception. -TestFailure::TestFailure( Test *failedTest, - Exception *thrownException, - bool isError ) : - m_failedTest( failedTest ), - m_thrownException( thrownException ), - m_isError( isError ) +TestFailure::TestFailure( Test *failed, + Exception *_thrownException, + ErrorType::num eError ) : + m_failedTest( failed ), + m_thrownException( _thrownException ), + m_eError( eError ) { } @@ -45,10 +45,19 @@ /// Indicates if the failure is a failed assertion or an error. -bool +bool TestFailure::isError() const { - return m_isError; + if (m_eError == ErrorType::ET_ERROR || + m_eError == ErrorType::ET_SIGNAL) + return true; + return false; +} + +ErrorType::num +TestFailure::getErrorType() const +{ + return m_eError; } @@ -71,7 +80,7 @@ TestFailure * TestFailure::clone() const { - return new TestFailure( m_failedTest, m_thrownException->clone(), m_isError ); + return new TestFailure( m_failedTest, m_thrownException->clone(), m_eError ); } } // namespace CppUnit --- misc/cppunit-1.8.0/src/cppunit/TestSuite.cpp 2002-03-24 20:39:55.000000000 +0100 +++ misc/build/cppunit-1.8.0/src/cppunit/TestSuite.cpp 2009-09-12 15:16:07.265625000 +0200 @@ -1,11 +1,13 @@ +#include #include "cppunit/TestSuite.h" -#include "cppunit/TestResult.h" +#include "cppunit/tagvalues.hxx" +#include "cppunit/externcallbackfunc.hxx" namespace CppUnit { /// Default constructor -TestSuite::TestSuite( std::string name ) - : m_name( name ) +TestSuite::TestSuite( std::string const& name ) + : m_name( name ) { } @@ -13,7 +15,7 @@ /// Destructor TestSuite::~TestSuite() { - deleteContents(); + deleteContents(); } @@ -21,28 +23,37 @@ void TestSuite::deleteContents() { - for ( std::vector::iterator it = m_tests.begin(); - it != m_tests.end(); - ++it) - delete *it; - m_tests.clear(); + for ( std::vector::iterator it = m_tests.begin(); + it != m_tests.end(); + ++it) + delete *it; + m_tests.clear(); } /// Runs the tests and collects their result in a TestResult. + void -TestSuite::run( TestResult *result ) +TestSuite::run( hTestResult result ) { - for ( std::vector::iterator it = m_tests.begin(); - it != m_tests.end(); - ++it ) - { - if ( result->shouldStop() ) - break; - - Test *test = *it; - test->run( result ); - } + // (pTestResult_EnterNode)(result, getName().c_str()); + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_ENTER_NODE, TAG_RESULT_PTR, result, TAG_NODENAME, getName().c_str(), TAG_DONE); + for ( std::vector::const_iterator it = getTests().begin(); + it != getTests().end(); + ++it ) + { + //# if ( result->shouldStop() ) + //# break; + // if ( pTestResult_ShouldStop(result) ) + if ( (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_SHOULD_STOP, TAG_RESULT_PTR, result, TAG_DONE) ) + { + break; + } + Test *test = *it; + test->run( result ); + } + // (pTestResult_LeaveNode)(result, getName().c_str()); + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_LEAVE_NODE, TAG_RESULT_PTR, result, TAG_NODENAME, getName().c_str(), TAG_DONE); } @@ -50,14 +61,14 @@ int TestSuite::countTestCases() const { - int count = 0; - - for ( std::vector::const_iterator it = m_tests.begin(); - it != m_tests.end(); - ++it ) - count += (*it)->countTestCases(); - - return count; + int count = 0; + + for ( std::vector::const_iterator it = m_tests.begin(); + it != m_tests.end(); + ++it ) + count += (*it)->countTestCases(); + + return count; } @@ -65,7 +76,7 @@ void TestSuite::addTest( Test *test ) { - m_tests.push_back( test ); + m_tests.push_back( test ); } @@ -73,7 +84,7 @@ std::string TestSuite::toString() const { - return "suite " + getName(); + return "suite " + getName(); } @@ -81,16 +92,20 @@ std::string TestSuite::getName() const { - return m_name; + return m_name; } const std::vector & TestSuite::getTests() const { - return m_tests; + return m_tests; } } // namespace CppUnit +// The following sets variables for GNU EMACS +// Local Variables: +// tab-width:4 +// End: --- misc/cppunit-1.8.0/src/cppunit/makefile.mk 2009-09-12 15:20:48.515625000 +0200 +++ misc/build/cppunit-1.8.0/src/cppunit/makefile.mk 2009-09-12 14:15:35.468750000 +0200 @@ -1 +1,86 @@ -dummy +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +PRJ=..$/..$/..$/..$/..$/.. +INCEXT=..$/..$/include + +PRJNAME=cppunit +TARGET=cppunit +LIBTARGET=NO +ENABLE_EXCEPTIONS=TRUE +# ENABLE_RTTI=TRUE + +# --- Settings ----------------------------------------------------- + +.INCLUDE : settings.mk + +# --- Files -------------------------------------------------------- + +# CXXFILES = \ +# querytemplate.cxx \ +# stringhelper.cxx + +# ENVCFLAGSCXX+=-DCPPUNIT_BUILD_DLL + +CPPUNIT_TESTSHL_SLOFILES = \ + $(SLO)$/SourceLine.obj \ + $(SLO)$/Exception.obj \ + $(SLO)$/NotEqualException.obj \ + $(SLO)$/TestFailure.obj + +CPPUNIT_STATIC_SOLFILES = \ + $(SLO)$/Asserter.obj \ + $(SLO)$/TestCase.obj \ + $(SLO)$/TestSuite.obj \ + $(SLO)$/TestAssert.obj \ + $(SLO)$/TestFactoryRegistry.obj + + +SLOFILES = \ + $(CPPUNIT_TESTSHL_SLOFILES) \ + $(CPPUNIT_STATIC_SOLFILES) +#------------------------------------------------------------------------------- +# This is statically cppunit library +LIB1TARGET= $(LB)$/$(TARGET).lib +LIB1OBJFILES= \ + $(SLOFILES) + +.IF "$(GUI)"=="WNT" +.IF "$(COM)"=="GCC" +LIB1ARCHIV=$(LB)$/lib$(TARGET)$(DLLPOSTFIX).a +.ENDIF +#LIB1FILES=$(LB)$/c5t_winstuff.lib +.ENDIF + +.IF "$(GUI)" == "UNX" +LIB1ARCHIV=$(LB)$/lib$(TARGET)$(DLLPOSTFIX).a +.ENDIF + +# --- Targets ------------------------------------------------------ + +.INCLUDE : target.mk + --- misc/cppunit-1.8.0/src/makefile.mk 2009-09-12 15:20:48.421875000 +0200 +++ misc/build/cppunit-1.8.0/src/makefile.mk 2009-09-12 14:15:35.484375000 +0200 @@ -1 +1,29 @@ -dummy +#************************************************************************* +# +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +# +# Copyright 2000, 2010 Oracle and/or its affiliates. +# +# OpenOffice.org - a multi-platform office productivity suite +# +# This file is part of OpenOffice.org. +# +# OpenOffice.org is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License version 3 +# only, as published by the Free Software Foundation. +# +# OpenOffice.org is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Lesser General Public License version 3 for more details +# (a copy is included in the LICENSE file that accompanied this code). +# +# You should have received a copy of the GNU Lesser General Public License +# version 3 along with OpenOffice.org. If not, see +# +# for a copy of the LGPLv3 License. +# +#************************************************************************* + +target: + cd cppunit && $(MAKE) $(MFLAGS) $(CALLMACROS)