update dev300-m57
[ooovba.git] / cppunit / cppunit-1.8.0-r1.patch
blob426051d6288dea9176dbb03c72b86ba3f82e13ca
1 --- misc/cppunit-1.8.0/AUTHORS 2002-03-26 09:29:58.000000000 +0100
2 +++ misc/build/cppunit-1.8.0/AUTHORS 2008-12-09 08:01:30.000000000 +0100
3 @@ -5,3 +5,4 @@
4 Baptiste Lepilleur <gaiacrtn@free.fr> <blep@sourceforge.net>
5 Bastiaan Bakker <bastiaan.bakker@lifeline.nl>
6 Steve Robbins <smr99@sourceforge.net>
7 +Lars Langhans <lla@openoffice.org>
8 --- misc/cppunit-1.8.0/ChangeLog 2002-04-11 11:53:02.000000000 +0200
9 +++ misc/build/cppunit-1.8.0/ChangeLog 2008-12-09 08:08:42.000000000 +0100
10 @@ -1,3 +1,9 @@
11 +2008-12-09 Lars Langhans <lla@openoffice.org>
12 + * create with some source files a new library
13 + * lot of source changes to build it within OOo environment.
14 + * lot of additional code to build within OOo environment.
15 + * Configure is no longer supported.
17 2002-04-11 Baptiste Lepilleur <gaiacrtn@free.fr>
19 * doc/FAQ: removed question about the Exception::operator =() problem.
20 --- misc/cppunit-1.8.0/INSTALL 2001-07-06 19:48:28.000000000 +0200
21 +++ misc/build/cppunit-1.8.0/INSTALL 2008-12-09 09:39:09.000000000 +0100
22 @@ -1,6 +1,12 @@
23 Basic Installation
24 ==================
26 +<IMPORTANT>
27 +This is a patched Version of CppUnit and works only in a OpenOffice.org
28 +environment.
29 +All other information here are expired.
30 +</IMPORTANT>
32 These are generic installation instructions.
34 The `configure' shell script attempts to guess correct values for
35 --- misc/cppunit-1.8.0/include/cppunit/Asserter.h 2002-03-28 16:47:07.000000000 +0100
36 +++ misc/build/cppunit-1.8.0/include/cppunit/Asserter.h 2008-02-27 17:09:30.000000000 +0100
37 @@ -4,6 +4,7 @@
38 #include <cppunit/Portability.h>
39 #include <cppunit/SourceLine.h>
40 #include <string>
41 +#include <rtl/ustring.hxx>
43 namespace CppUnit
45 @@ -44,8 +45,8 @@
47 /*! Throws a Exception with the specified message and location.
49 - void CPPUNIT_API fail( std::string message,
50 - SourceLine sourceLine = SourceLine() );
51 + void CPPUNIT_API fail( std::string const& message,
52 + SourceLine const& sourceLine = SourceLine() );
54 /*! Throws a Exception with the specified message and location.
55 * \param shouldFail if \c true then the exception is thrown. Otherwise
56 @@ -54,8 +55,14 @@
57 * \param sourceLine Location of the assertion.
59 void CPPUNIT_API failIf( bool shouldFail,
60 - std::string message,
61 - SourceLine sourceLine = SourceLine() );
62 + std::string const& message,
63 + SourceLine const& sourceLine = SourceLine() );
66 + // LLA: test, if it's possible to use a DEFINE twice ;-)
67 + void CPPUNIT_API failIf( bool shouldFail,
68 + rtl::OUString const& message,
69 + SourceLine const& sourceLine = SourceLine() );
71 /*! Throws a NotEqualException with the specified message and location.
72 * \param expected Text describing the expected value.
73 @@ -64,10 +71,10 @@
74 * where the "difference" is located.
75 * \param sourceLine Location of the assertion.
77 - void CPPUNIT_API failNotEqual( std::string expected,
78 - std::string actual,
79 - SourceLine sourceLine = SourceLine(),
80 - std::string additionalMessage ="" );
81 + void CPPUNIT_API failNotEqual( std::string const& expected,
82 + std::string const& actual,
83 + SourceLine const& sourceLine = SourceLine(),
84 + std::string const& additionalMessage ="" );
86 /*! Throws a NotEqualException with the specified message and location.
87 * \param shouldFail if \c true then the exception is thrown. Otherwise
88 @@ -79,10 +86,18 @@
89 * \param sourceLine Location of the assertion.
91 void CPPUNIT_API failNotEqualIf( bool shouldFail,
92 - std::string expected,
93 - std::string actual,
94 - SourceLine sourceLine = SourceLine(),
95 - std::string additionalMessage ="" );
96 + std::string const& expected,
97 + std::string const& actual,
98 + SourceLine const& sourceLine = SourceLine(),
99 + std::string const& additionalMessage ="" );
102 + /*! Throws an Exception with the specified message and location.
103 + * \param message Message explaining the assertion failure.
104 + * \param sourceLine Location of the assertion.
105 + */
106 + void CPPUNIT_API failStub( std::string const& message,
107 + SourceLine const& sourceLine = SourceLine() );
109 } // namespace Asserter
110 } // namespace CppUnit
111 --- misc/cppunit-1.8.0/include/cppunit/Exception.h 2002-03-28 16:47:07.000000000 +0100
112 +++ misc/build/cppunit-1.8.0/include/cppunit/Exception.h 2008-02-27 17:10:36.000000000 +0100
113 @@ -21,7 +21,7 @@
114 class Type
116 public:
117 - Type( std::string type ) : m_type ( type ) {}
118 + Type( std::string const& _type ) : m_type ( _type ) {}
120 bool operator ==( const Type &other ) const
122 @@ -32,13 +32,13 @@
126 - Exception( std::string message = "",
127 - SourceLine sourceLine = SourceLine() );
128 + Exception( std::string const& message = "",
129 + SourceLine const& sourceLine = SourceLine() );
131 #ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED
132 - Exception( std::string message,
133 + Exception( std::string const& message,
134 long lineNumber,
135 - std::string fileName );
136 + std::string const& fileName );
137 #endif
139 Exception (const Exception& other);
140 @@ -74,6 +74,41 @@
141 SourceLine m_sourceLine;
144 +// -----------------------------------------------------------------------------
146 +class StubException : public Exception
148 +public:
149 + StubException( std::string const& _message = "",
150 + SourceLine const& _sourceLine = SourceLine() )
151 + :Exception(_message, _sourceLine) {}
154 +#ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED
155 + StubException( std::string const& message,
156 + long lineNumber,
157 + std::string const& fileName )
158 + :Exception(message, lineNumber, fileName) {}
159 +#endif
162 +// -----------------------------------------------------------------------------
164 +class SignalException : public Exception
166 +public:
167 + SignalException( std::string const& _message = "",
168 + SourceLine const& _sourceLine = SourceLine() )
169 + :Exception(_message, _sourceLine) {}
172 +#ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED
173 + SignalException( std::string const& message,
174 + long lineNumber,
175 + std::string const& fileName )
176 + :Exception(message, lineNumber, fileName) {}
177 +#endif
180 } // namespace CppUnit
182 --- misc/cppunit-1.8.0/include/cppunit/NotEqualException.h 2002-03-28 16:47:07.000000000 +0100
183 +++ misc/build/cppunit-1.8.0/include/cppunit/NotEqualException.h 2008-02-27 17:11:12.000000000 +0100
184 @@ -19,16 +19,16 @@
185 * \param additionalMessage Additionnal information provided to further qualify
186 * the inequality.
188 - NotEqualException( std::string expected,
189 - std::string actual,
190 - SourceLine sourceLine = SourceLine(),
191 - std::string additionalMessage = "" );
192 + NotEqualException( std::string const& expected,
193 + std::string const& actual,
194 + SourceLine const& sourceLine = SourceLine(),
195 + std::string const& additionalMessage = "" );
197 #ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED
198 - NotEqualException( std::string expected,
199 - std::string actual,
200 + NotEqualException( std::string const& expected,
201 + std::string const& actual,
202 long lineNumber,
203 - std::string fileName );
204 + std::string const& fileName );
205 #endif
207 NotEqualException( const NotEqualException &other );
208 --- misc/cppunit-1.8.0/include/cppunit/Portability.h 2002-03-25 19:41:39.000000000 +0100
209 +++ misc/build/cppunit-1.8.0/include/cppunit/Portability.h 2008-02-27 17:12:24.000000000 +0100
210 @@ -3,11 +3,11 @@
212 /* include platform specific config */
213 #if defined(__BORLANDC__)
214 -# include <cppunit/config-bcb5.h>
215 +# include <cppunit/portability/config-bcb5.h>
216 #elif defined (_MSC_VER)
217 -# include <cppunit/config-msvc6.h>
218 +# include <cppunit/portability/config-msvc6.h>
219 #else
220 -# include <cppunit/config-auto.h>
221 +# include <cppunit/portability/config-auto.h>
222 #endif
225 --- misc/cppunit-1.8.0/include/cppunit/Test.h 2002-03-28 16:47:07.000000000 +0100
226 +++ misc/build/cppunit-1.8.0/include/cppunit/Test.h 2008-02-27 17:09:20.000000000 +0100
227 @@ -3,14 +3,15 @@
229 #include <cppunit/Portability.h>
230 #include <string>
231 +#include <cppunit/autoregister/htestresult.h>
233 namespace CppUnit {
235 -class TestResult;
236 +//# class TestResult;
238 /*! \brief Base class for all test objects.
239 * \ingroup BrowsingCollectedTestResult
241 + *l-
242 * All test objects should be a subclass of Test. Some test objects,
243 * TestCase for example, represent one individual test. Other test
244 * objects, such as TestSuite, are comprised of several tests.
245 @@ -27,7 +28,7 @@
247 /*! \brief Run the test, collecting results.
249 - virtual void run (TestResult *result) = 0;
250 + virtual void run (hTestResult pResult) = 0;
252 /*! \brief Return the number of test cases invoked by run().
254 --- misc/cppunit-1.8.0/include/cppunit/TestAssert.h 2002-04-04 17:39:37.000000000 +0200
255 +++ misc/build/cppunit-1.8.0/include/cppunit/TestAssert.h 2008-02-27 17:12:12.000000000 +0100
256 @@ -5,9 +5,12 @@
257 #include <cppunit/Exception.h>
258 #include <cppunit/Asserter.h>
260 +#include <cppunit/checkboom.hxx>
262 namespace CppUnit {
266 /*! \brief Traits used by CPPUNIT_ASSERT_EQUAL().
268 * Here is an example of specialization of that traits:
269 @@ -31,83 +34,83 @@
270 * };
271 * \endcode
273 - template <class T>
274 - struct assertion_traits
275 - {
276 - static bool equal( const T& x, const T& y )
278 - return x == y;
281 - static std::string toString( const T& x )
283 - OStringStream ost;
284 - ost << x;
285 - return ost.str();
287 - };
290 - namespace TestAssert
292 +template <class T>
293 +struct assertion_traits
295 + static bool equal( const T& x, const T& y )
297 + return x == y;
300 + static std::string toString( const T& x )
302 + OStringStream ost;
303 + ost << x;
304 + return ost.str();
308 +namespace TestAssert
310 #ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED
311 - void CPPUNIT_API assertImplementation( bool condition,
312 - std::string conditionExpression = "",
313 - long lineNumber,
314 - std::string fileName );
316 - void CPPUNIT_API assertNotEqualImplementation( std::string expected,
317 - std::string actual,
318 - long lineNumber,
319 - std::string fileName );
322 - template <class T>
323 - void assertEquals( const T& expected,
324 - const T& actual,
325 - long lineNumber,
326 - std::string fileName )
328 - if ( !assertion_traits<T>::equal(expected,actual) ) // lazy toString conversion...
330 - assertNotEqualImplementation( assertion_traits<T>::toString(expected),
331 - assertion_traits<T>::toString(actual),
332 - lineNumber,
333 - fileName );
337 - void CPPUNIT_API assertEquals( double expected,
338 - double actual,
339 - double delta,
340 - long lineNumber,
341 - std::string fileName );
342 + void CPPUNIT_API assertImplementation( bool condition,
343 + std::string conditionExpression = "",
344 + long lineNumber,
345 + std::string fileName );
347 + void CPPUNIT_API assertNotEqualImplementation( std::string expected,
348 + std::string actual,
349 + long lineNumber,
350 + std::string fileName );
353 + template <class T>
354 + void assertEquals( const T& expected,
355 + const T& actual,
356 + long lineNumber,
357 + std::string fileName )
359 + if ( !assertion_traits<T>::equal(expected,actual) ) // lazy toString conversion...
361 + assertNotEqualImplementation( assertion_traits<T>::toString(expected),
362 + assertion_traits<T>::toString(actual),
363 + lineNumber,
364 + fileName );
368 + void CPPUNIT_API assertEquals( double expected,
369 + double actual,
370 + double delta,
371 + long lineNumber,
372 + std::string fileName );
374 #else // using SourceLine
376 - template <class T>
377 - void assertEquals( const T& expected,
378 - const T& actual,
379 - SourceLine sourceLine,
380 - const std::string &message ="" )
382 - if ( !assertion_traits<T>::equal(expected,actual) ) // lazy toString conversion...
384 - Asserter::failNotEqual( assertion_traits<T>::toString(expected),
385 - assertion_traits<T>::toString(actual),
386 - sourceLine,
387 - message );
391 - void CPPUNIT_API assertDoubleEquals( double expected,
392 - double actual,
393 - double delta,
394 - SourceLine sourceLine );
395 + template <class T>
396 + void assertEquals( const T& expected,
397 + const T& actual,
398 + SourceLine sourceLine,
399 + const std::string &message ="" )
401 + if ( !assertion_traits<T>::equal(expected,actual) ) // lazy toString conversion...
403 + Asserter::failNotEqual( assertion_traits<T>::toString(expected),
404 + assertion_traits<T>::toString(actual),
405 + sourceLine,
406 + message );
410 + void CPPUNIT_API assertDoubleEquals( double expected,
411 + double actual,
412 + double delta,
413 + SourceLine sourceLine );
415 #endif
420 /* A set of macros which allow us to get the line number
421 * and file name at the point of an error.
422 @@ -118,15 +121,22 @@
423 /** Assertions that a condition is \c true.
424 * \ingroup Assertions
426 -#define CPPUNIT_ASSERT(condition) \
427 - ( ::CppUnit::Asserter::failIf( !(condition), \
428 - (#condition), \
429 - CPPUNIT_SOURCELINE() ) )
430 + // LLA: due to the fact, that side effects are not wished, we create a local scope,
431 + // assign the condition to a local variable and check this variable again and again.
433 +#define CPPUNIT_ASSERT(condition) \
434 + { bool __bLocalCondition = condition; \
435 + CheckBoom((__bLocalCondition), (#condition)); \
436 + (::CppUnit::Asserter::failIf( !(__bLocalCondition), \
437 + (#condition), \
438 + CPPUNIT_SOURCELINE() ) ); }
439 #else
440 -#define CPPUNIT_ASSERT(condition) \
441 - ( ::CppUnit::Asserter::failIf( !(condition), \
442 - "", \
443 - CPPUNIT_SOURCELINE() ) )
444 +#define CPPUNIT_ASSERT(condition) \
445 + { bool __bLocalCondition = condition; \
446 + CheckBoom((__bLocalCondition), ""); \
447 + (::CppUnit::Asserter::failIf( !(__bLocalCondition), \
448 + "", \
449 + CPPUNIT_SOURCELINE() ) ); }
450 #endif
452 /** Assertion with a user specified message.
453 @@ -136,25 +146,33 @@
454 * \param condition If this condition evaluates to \c false then the
455 * test failed.
457 -#define CPPUNIT_ASSERT_MESSAGE(message,condition) \
458 - ( ::CppUnit::Asserter::failIf( !(condition), \
459 - (message), \
460 - CPPUNIT_SOURCELINE() ) )
461 +#define CPPUNIT_ASSERT_MESSAGE(message,condition) \
462 + { bool __bLocalCondition = (condition); \
463 + CheckBoom((__bLocalCondition), (message)); \
464 + (::CppUnit::Asserter::failIf( !(__bLocalCondition), \
465 + (message), \
466 + CPPUNIT_SOURCELINE() ) ); }
468 +#define CPPUNIT_ASSERT_STUB() \
469 + CheckBoom((1 == 0), ("This is only a stub.")); \
470 + (::CppUnit::Asserter::failStub("This is only a stub.", \
471 + CPPUNIT_SOURCELINE() ) )
474 /** Fails with the specified message.
475 * \ingroup Assertions
476 * \param message Message reported in diagnostic.
478 #define CPPUNIT_FAIL( message ) \
479 - ( ::CppUnit::Asserter::fail( message, \
480 - CPPUNIT_SOURCELINE() ) )
481 + ( ::CppUnit::Asserter::fail( message, \
482 + CPPUNIT_SOURCELINE() ) )
484 #ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED
485 /// Generalized macro for primitive value comparisons
486 #define CPPUNIT_ASSERT_EQUAL(expected,actual) \
487 - ( ::CppUnit::TestAssert::assertEquals( (expected), \
488 - (actual), \
489 - __LINE__, __FILE__ ) )
490 + ( ::CppUnit::TestAssert::assertEquals( (expected), \
491 + (actual), \
492 + __LINE__, __FILE__ ) )
493 #else
494 /** Asserts that two values are equals.
495 * \ingroup Assertions
496 @@ -173,9 +191,9 @@
497 * removed by specializing the CppUnit::assertion_traits.
499 #define CPPUNIT_ASSERT_EQUAL(expected,actual) \
500 - ( ::CppUnit::TestAssert::assertEquals( (expected), \
501 - (actual), \
502 - CPPUNIT_SOURCELINE() ) )
503 + ( ::CppUnit::TestAssert::assertEquals( (expected), \
504 + (actual), \
505 + CPPUNIT_SOURCELINE() ) )
507 /** Asserts that two values are equals, provides additional messafe on failure.
508 * \ingroup Assertions
509 @@ -196,20 +214,20 @@
510 * removed by specializing the CppUnit::assertion_traits.
512 #define CPPUNIT_ASSERT_EQUAL_MESSAGE(message,expected,actual) \
513 - ( ::CppUnit::TestAssert::assertEquals( (expected), \
514 - (actual), \
515 - CPPUNIT_SOURCELINE(), \
516 - (message) ) )
517 + ( ::CppUnit::TestAssert::assertEquals( (expected), \
518 + (actual), \
519 + CPPUNIT_SOURCELINE(), \
520 + (message) ) )
521 #endif
523 /*! \brief Macro for primitive value comparisons
524 * \ingroup Assertions
526 #define CPPUNIT_ASSERT_DOUBLES_EQUAL(expected,actual,delta) \
527 - ( ::CppUnit::TestAssert::assertDoubleEquals( (expected), \
528 - (actual), \
529 - (delta), \
530 - CPPUNIT_SOURCELINE() ) )
531 + ( ::CppUnit::TestAssert::assertDoubleEquals( (expected), \
532 + (actual), \
533 + (delta), \
534 + CPPUNIT_SOURCELINE() ) )
536 // Backwards compatibility
538 @@ -223,7 +241,6 @@
540 #endif
543 } // namespace CppUnit
545 #endif // CPPUNIT_TESTASSERT_H
546 --- misc/cppunit-1.8.0/include/cppunit/TestCaller.h 2002-03-28 16:47:07.000000000 +0100
547 +++ misc/build/cppunit-1.8.0/include/cppunit/TestCaller.h 2008-02-27 17:09:40.000000000 +0100
548 @@ -111,7 +111,7 @@
549 * \param name name of this TestCaller
550 * \param test the method this TestCaller calls in runTest()
552 - TestCaller( std::string name, TestMethod test ) :
553 + TestCaller( std::string const& name, TestMethod test ) :
554 TestCase( name ),
555 m_ownFixture( true ),
556 m_fixture( new Fixture() ),
557 @@ -128,7 +128,7 @@
558 * \param test the method this TestCaller calls in runTest()
559 * \param fixture the Fixture to invoke the test method on.
561 - TestCaller(std::string name, TestMethod test, Fixture& fixture) :
562 + TestCaller(std::string const& name, TestMethod test, Fixture& fixture) :
563 TestCase( name ),
564 m_ownFixture( false ),
565 m_fixture( &fixture ),
566 @@ -145,7 +145,7 @@
567 * \param test the method this TestCaller calls in runTest()
568 * \param fixture the Fixture to invoke the test method on.
570 - TestCaller(std::string name, TestMethod test, Fixture* fixture) :
571 + TestCaller(std::string const& name, TestMethod test, Fixture* fixture) :
572 TestCase( name ),
573 m_ownFixture( true ),
574 m_fixture( fixture ),
575 --- misc/cppunit-1.8.0/include/cppunit/TestCase.h 2002-03-27 18:56:45.000000000 +0100
576 +++ misc/build/cppunit-1.8.0/include/cppunit/TestCase.h 2008-02-27 17:11:00.000000000 +0100
577 @@ -3,15 +3,13 @@
579 #include <cppunit/Portability.h>
580 #include <cppunit/Test.h>
581 -#include <cppunit/TestAssert.h>
582 #include <cppunit/TestFixture.h>
583 #include <string>
585 +#include <cppunit/autoregister/htestresult.h>
587 namespace CppUnit {
589 -class TestResult;
591 +//# class TestResult;
593 /*! \brief A single test object.
595 @@ -28,25 +26,25 @@
597 public:
599 - TestCase( std::string Name );
600 + TestCase( std::string const& Name );
601 //! \internal
602 TestCase();
603 ~TestCase();
605 - virtual void run(TestResult *result);
606 + virtual void run(hTestResult pResult);
607 virtual int countTestCases() const;
608 std::string getName() const;
609 std::string toString() const;
611 //! FIXME: what is this for?
612 - virtual TestResult *run();
613 + //# virtual TestResult *run();
615 protected:
616 //! FIXME: this should probably be pure virtual.
617 virtual void runTest();
619 //! Create TestResult for the run(void) method.
620 - TestResult *defaultResult();
621 + //# TestResult *defaultResult();
623 private:
624 TestCase( const TestCase &other );
625 --- misc/cppunit-1.8.0/include/cppunit/TestFailure.h 2002-03-28 16:47:07.000000000 +0100
626 +++ misc/build/cppunit-1.8.0/include/cppunit/TestFailure.h 2008-02-27 17:09:50.000000000 +0100
627 @@ -4,6 +4,16 @@
628 #include <cppunit/Portability.h>
629 #include <string>
631 +namespace ErrorType
633 + enum num
635 + ET_FAILURE = 1,
636 + ET_ERROR = 2,
637 + ET_SIGNAL = 4
638 + };
641 namespace CppUnit {
643 class Exception;
644 @@ -20,12 +30,13 @@
645 * TestFailure assumes lifetime control for any exception
646 * passed to it.
649 class CPPUNIT_API TestFailure
651 public:
652 TestFailure( Test *failedTest,
653 Exception *thrownException,
654 - bool isError );
655 + ErrorType::num eError );
657 virtual ~TestFailure ();
659 @@ -36,6 +47,7 @@
660 virtual SourceLine sourceLine() const;
662 virtual bool isError() const;
663 + virtual ErrorType::num getErrorType() const;
665 virtual std::string failedTestName() const;
667 @@ -46,7 +58,7 @@
668 protected:
669 Test *m_failedTest;
670 Exception *m_thrownException;
671 - bool m_isError;
672 + ErrorType::num m_eError;
674 private:
675 TestFailure( const TestFailure &other );
676 --- misc/cppunit-1.8.0/include/cppunit/TestFixture.h 2002-03-28 16:47:07.000000000 +0100
677 +++ misc/build/cppunit-1.8.0/include/cppunit/TestFixture.h 2008-02-27 17:10:26.000000000 +0100
678 @@ -74,11 +74,6 @@
680 * \endcode
682 - * A set of macros have been created for convenience. They are located in HelperMacros.h.
684 - * \see TestResult, TestSuite, TestCaller,
685 - * \see CPPUNIT_TEST_SUB_SUITE, CPPUNIT_TEST, CPPUNIT_TEST_SUITE_END,
686 - * \see CPPUNIT_TEST_SUITE_REGISTRATION, CPPUNIT_TEST_EXCEPTION, CPPUNIT_TEST_FAIL.
688 class CPPUNIT_API TestFixture
690 --- misc/cppunit-1.8.0/include/cppunit/TestSuite.h 2002-03-28 16:47:07.000000000 +0100
691 +++ misc/build/cppunit-1.8.0/include/cppunit/TestSuite.h 2008-02-27 17:11:24.000000000 +0100
692 @@ -4,17 +4,20 @@
693 #include <cppunit/Portability.h>
695 #if CPPUNIT_NEED_DLL_DECL
696 +#ifdef _MSC_VER
697 #pragma warning( push )
698 #pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z
699 #endif
700 +#endif
702 #include <cppunit/Test.h>
703 #include <vector>
704 #include <string>
705 +#include <cppunit/autoregister/htestresult.h>
707 namespace CppUnit {
709 -class TestResult;
710 +//# class TestResult;
712 #if CPPUNIT_NEED_DLL_DECL
713 template class CPPUNIT_API std::vector<Test *>;
714 @@ -35,7 +38,6 @@
715 * Note that TestSuites assume lifetime
716 * control for any tests added to them.
718 - * TestSuites do not register themselves in the TestRegistry.
719 * \see Test
720 * \see TestCaller
722 @@ -44,10 +46,10 @@
723 class CPPUNIT_API TestSuite : public Test
725 public:
726 - TestSuite( std::string name = "" );
727 + TestSuite( std::string const& name = "" );
728 ~TestSuite();
730 - void run( TestResult *result );
731 + void run( hTestResult pResult );
732 int countTestCases() const;
733 std::string getName() const;
734 std::string toString() const;
735 @@ -71,7 +73,9 @@
738 #if CPPUNIT_NEED_DLL_DECL
739 +#ifdef _MSC_VER
740 #pragma warning( pop )
741 #endif
742 +#endif
744 #endif // CPPUNIT_TESTSUITE_H
745 --- misc/cppunit-1.8.0/include/cppunit/additionalfunc.hxx 2008-12-10 20:46:05.823290260 +0100
746 +++ misc/build/cppunit-1.8.0/include/cppunit/additionalfunc.hxx 2008-07-14 07:25:14.000000000 +0200
747 @@ -1 +1,61 @@
748 -dummy
749 +#ifndef ADDITIONALFUNC_HXX
750 +#define ADDITIONALFUNC_HXX
752 +#include "cppunit/autoregister/registertestfunction.h"
753 +#include "sal/types.h"
755 +extern "C" void SAL_CALL RegisterAdditionalFunctions(FktRegFuncPtr _pFunc);
757 +#define NOADDITIONAL \
758 +void RegisterAdditionalFunctions(FktRegFuncPtr){}
760 +namespace {
762 +enum T2_OSType {
763 + T2_OS_WNT32 = 1,
764 + T2_OS_UNIX,
765 + T2_OS_OS2
768 +inline T2_OSType getOSType()
770 +#if defined WNT
771 + return T2_OS_WNT32;
772 +#elif defined OS2
773 + return T2_OS_OS2;
774 +#else
775 + return T2_OS_UNIX;
776 +#endif
781 +#define TESTSHL2_UNO_BOOTSTRAP(file) \
782 +void RegisterAdditionalFunctions(FktRegFuncPtr _pFunc) \
783 +{ \
784 + com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory> xMS; \
785 + com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > xComponentContext; \
786 + try { \
787 + if (strlen(#file) > 0) { \
788 + ::rtl::OUString iniFile(rtl::OUString::createFromAscii(#file)); \
789 + if (getOSType() == T2_OS_WNT32 || getOSType() == T2_OS_OS2) { \
790 + iniFile += ::rtl::OUString::createFromAscii(".ini"); \
791 + } else { \
792 + iniFile += ::rtl::OUString::createFromAscii("rc"); \
793 + } \
794 + xComponentContext = cppu::defaultBootstrap_InitialComponentContext(iniFile); \
795 + } else { \
796 + xComponentContext = cppu::defaultBootstrap_InitialComponentContext(); \
797 + } \
798 + xMS.set(xComponentContext->getServiceManager(), com::sun::star::uno::UNO_QUERY); \
799 + comphelper::setProcessServiceFactory(xMS); \
800 + } \
801 + catch (::com::sun::star::uno::Exception e ) { \
802 + rtl::OString aError; \
803 + aError = rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); \
804 + printf("Error at UNO bootstrap time caught: %s\nMust quit.\n", aError.getStr()); \
805 + exit(1); \
806 + } \
809 +#endif
810 Nur in misc/build/cppunit-1.8.0/include/cppunit: additionalfunc.hxx.dummy.
811 --- misc/cppunit-1.8.0/include/cppunit/autoregister/callbackfunc_fktptr.h 2008-12-10 20:46:05.931077489 +0100
812 +++ misc/build/cppunit-1.8.0/include/cppunit/autoregister/callbackfunc_fktptr.h 2008-07-14 07:25:14.000000000 +0200
813 @@ -1 +1,63 @@
814 -dummy
815 +/*************************************************************************
817 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
819 + * Copyright 2008 by Sun Microsystems, Inc.
821 + * OpenOffice.org - a multi-platform office productivity suite
823 + * $RCSfile$
824 + * $Revision$
826 + * This file is part of OpenOffice.org.
828 + * OpenOffice.org is free software: you can redistribute it and/or modify
829 + * it under the terms of the GNU Lesser General Public License version 3
830 + * only, as published by the Free Software Foundation.
832 + * OpenOffice.org is distributed in the hope that it will be useful,
833 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
834 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
835 + * GNU Lesser General Public License version 3 for more details
836 + * (a copy is included in the LICENSE file that accompanied this code).
838 + * You should have received a copy of the GNU Lesser General Public License
839 + * version 3 along with OpenOffice.org. If not, see
840 + * <http://www.openoffice.org/license.html>
841 + * for a copy of the LGPLv3 License.
843 + ************************************************************************/
845 +#ifndef _callbackfunc_fktptr_h
846 +#define _callbackfunc_fktptr_h
848 +#include <sal/types.h>
850 +#ifdef __cplusplus
851 +extern "C" {
852 +#endif
854 +// these typedefs are used for the TestCase, to call the TestResult functions.
855 +// The TestResult is only in the testshl tool, not in the test libraries.
857 +typedef void* hTest;
858 +typedef void* hException;
860 +typedef sal_Int32 (* FktPtr_CallbackDispatch)(int x, ...);
862 +//# typedef void (* FktPtr_TestResult_startTest)(hTestResult, hTest );
863 +//# typedef void (* FktPtr_TestResult_addFailure)( hTestResult, hTest , hException pException );
864 +//# typedef void (* FktPtr_TestResult_addError)( hTestResult, hTest , hException pException );
865 +//# typedef void (* FktPtr_TestResult_endTest)( hTestResult, hTest );
866 +//# typedef bool (* FktPtr_TestResult_shouldStop)(hTestResult);
867 +//#
868 +//# // Additional functions
869 +//# typedef void (* FktPtr_TestResult_addInfo)( hTestResult, hTest, const char* );
870 +//# typedef void (* FktPtr_TestResult_enterNode)( hTestResult, const char* );
871 +//# typedef void (* FktPtr_TestResult_leaveNode)( hTestResult, const char* );
873 +#ifdef __cplusplus
875 +#endif
877 +#endif
878 Nur in misc/build/cppunit-1.8.0/include/cppunit/autoregister: callbackfunc_fktptr.h.dummy.
879 --- misc/cppunit-1.8.0/include/cppunit/autoregister/callbackstructure.h 2008-12-10 20:46:06.013912039 +0100
880 +++ misc/build/cppunit-1.8.0/include/cppunit/autoregister/callbackstructure.h 2008-07-14 07:25:14.000000000 +0200
881 @@ -1 +1,89 @@
882 -dummy
883 +/*************************************************************************
885 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
887 + * Copyright 2008 by Sun Microsystems, Inc.
889 + * OpenOffice.org - a multi-platform office productivity suite
891 + * $RCSfile$
892 + * $Revision$
894 + * This file is part of OpenOffice.org.
896 + * OpenOffice.org is free software: you can redistribute it and/or modify
897 + * it under the terms of the GNU Lesser General Public License version 3
898 + * only, as published by the Free Software Foundation.
900 + * OpenOffice.org is distributed in the hope that it will be useful,
901 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
902 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
903 + * GNU Lesser General Public License version 3 for more details
904 + * (a copy is included in the LICENSE file that accompanied this code).
906 + * You should have received a copy of the GNU Lesser General Public License
907 + * version 3 along with OpenOffice.org. If not, see
908 + * <http://www.openoffice.org/license.html>
909 + * for a copy of the LGPLv3 License.
911 + ************************************************************************/
913 +#ifndef _callbackstructure_h
914 +#define _callbackstructure_h
916 +#include <sal/types.h>
917 +#include <cppunit/autoregister/callbackfunc_fktptr.h>
918 +#include <cppunit/autoregister/registerfunc.h>
919 +#include <cppunit/autoregister/registertestfunction.h>
920 +#include <cppunit/cmdlinebits.hxx>
922 +// this structure will filled by the testshl tool and hand to the testdll
924 +struct CallbackStructure
926 + // a version number, if we want to change/expand this struct
927 + sal_Int32 nVersion;
928 + sal_Int64 nMagic;
930 + FktRegFuncPtr aRegisterFunction;
932 + FktPtr_CallbackDispatch aCallbackDispatch;
934 + //# FktPtr_TestResult_startTest aStartTest;
935 + //# FktPtr_TestResult_addFailure aAddFailure;
936 + //# FktPtr_TestResult_addError aAddError;
937 + //# FktPtr_TestResult_endTest aEndTest;
938 + //# FktPtr_TestResult_shouldStop aShouldStop;
939 + //#
940 + //# FktPtr_TestResult_addInfo aAddInfo;
941 + //# FktPtr_TestResult_enterNode aEnterNode;
942 + //# FktPtr_TestResult_leaveNode aLeaveNode;
944 + const char* psForward;
945 + CmdLineBits nBits;
947 + // void* pJobList;
949 + sal_Int64 nMagic2;
951 + CallbackStructure()
952 + :nVersion(1),
953 + nMagic(SAL_CONST_INT64(0x0123456789abcdef)),
954 + aRegisterFunction(NULL),
955 + aCallbackDispatch(NULL),
956 + /* aStartTest(NULL),
957 + aAddFailure(NULL),
958 + aAddError(NULL),
959 + aEndTest(NULL),
960 + aShouldStop(NULL),
961 + aAddInfo(NULL),
962 + aEnterNode(NULL),
963 + aLeaveNode(NULL), */
964 + psForward(NULL),
965 + nBits(0),
966 + /* pJobList(NULL), */
967 + nMagic2(0)
968 + {}
971 +#endif
972 Nur in misc/build/cppunit-1.8.0/include/cppunit/autoregister: callbackstructure.h.dummy.
973 --- misc/cppunit-1.8.0/include/cppunit/autoregister/htestresult.h 2008-12-10 20:46:06.090738039 +0100
974 +++ misc/build/cppunit-1.8.0/include/cppunit/autoregister/htestresult.h 2008-02-27 17:17:34.000000000 +0100
975 @@ -1 +1,6 @@
976 -dummy
977 +#ifndef _htestresult_h
978 +#define _htestresult_h
980 +typedef void* hTestResult;
982 +#endif
983 Nur in misc/build/cppunit-1.8.0/include/cppunit/autoregister: htestresult.h.dummy.
984 --- misc/cppunit-1.8.0/include/cppunit/autoregister/registerfunc.h 2008-12-10 20:46:06.135034318 +0100
985 +++ misc/build/cppunit-1.8.0/include/cppunit/autoregister/registerfunc.h 2008-07-14 07:25:14.000000000 +0200
986 @@ -1 +1,50 @@
987 -dummy
988 +/*************************************************************************
990 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
992 + * Copyright 2008 by Sun Microsystems, Inc.
994 + * OpenOffice.org - a multi-platform office productivity suite
996 + * $RCSfile$
997 + * $Revision$
999 + * This file is part of OpenOffice.org.
1001 + * OpenOffice.org is free software: you can redistribute it and/or modify
1002 + * it under the terms of the GNU Lesser General Public License version 3
1003 + * only, as published by the Free Software Foundation.
1005 + * OpenOffice.org is distributed in the hope that it will be useful,
1006 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1007 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1008 + * GNU Lesser General Public License version 3 for more details
1009 + * (a copy is included in the LICENSE file that accompanied this code).
1011 + * You should have received a copy of the GNU Lesser General Public License
1012 + * version 3 along with OpenOffice.org. If not, see
1013 + * <http://www.openoffice.org/license.html>
1014 + * for a copy of the LGPLv3 License.
1016 + ************************************************************************/
1018 +#ifndef _registerfunc_h
1019 +#define _registerfunc_h
1021 +#include <sal/types.h>
1022 +#include <cppunit/autoregister/htestresult.h>
1023 +#include <cppunit/autoregister/callbackfunc_fktptr.h>
1024 +#include <cppunit/autoregister/testfunc.h>
1026 +struct CallbackStructure;
1028 +// this function is used to register one function into a Container in the testshl tool.
1029 +extern "C" void SAL_CALL registerFunction(FktPtr aFunc, const char* aFuncName);
1031 +// this function is the register function for auto registering
1033 +extern "C" void SAL_CALL registerAllTestFunction(CallbackStructure* );
1034 +typedef void (* FktRegAllPtr)(CallbackStructure*);
1037 +#endif
1038 Nur in misc/build/cppunit-1.8.0/include/cppunit/autoregister: registerfunc.h.dummy.
1039 --- misc/cppunit-1.8.0/include/cppunit/autoregister/registertestfunction.h 2008-12-10 20:46:06.214882818 +0100
1040 +++ misc/build/cppunit-1.8.0/include/cppunit/autoregister/registertestfunction.h 2008-07-14 07:25:14.000000000 +0200
1041 @@ -1 +1,54 @@
1042 -dummy
1043 +/*************************************************************************
1045 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1047 + * Copyright 2008 by Sun Microsystems, Inc.
1049 + * OpenOffice.org - a multi-platform office productivity suite
1051 + * $RCSfile$
1052 + * $Revision$
1054 + * This file is part of OpenOffice.org.
1056 + * OpenOffice.org is free software: you can redistribute it and/or modify
1057 + * it under the terms of the GNU Lesser General Public License version 3
1058 + * only, as published by the Free Software Foundation.
1060 + * OpenOffice.org is distributed in the hope that it will be useful,
1061 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1062 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1063 + * GNU Lesser General Public License version 3 for more details
1064 + * (a copy is included in the LICENSE file that accompanied this code).
1066 + * You should have received a copy of the GNU Lesser General Public License
1067 + * version 3 along with OpenOffice.org. If not, see
1068 + * <http://www.openoffice.org/license.html>
1069 + * for a copy of the LGPLv3 License.
1071 + ************************************************************************/
1073 +#ifndef _registertestfunction_h
1074 +#define _registertestfunction_h
1076 +#include <sal/types.h>
1077 +#include <cppunit/autoregister/testfunc.h>
1079 +#ifdef __cplusplus
1080 +extern "C" {
1081 +#endif
1083 +// function ptr, to register a function
1084 +typedef void (* FktRegFuncPtr)(FktPtr aFunc, const char* aFuncName);
1086 +// this function is used in the testdll to register the given function
1087 +// into the testshl
1088 +extern "C" void SAL_CALL RegisterTestFunctions(FktRegFuncPtr aFunc);
1090 +#ifdef __cplusplus
1092 +#endif
1094 +#endif
1097 Nur in misc/build/cppunit-1.8.0/include/cppunit/autoregister: registertestfunction.h.dummy.
1098 --- misc/cppunit-1.8.0/include/cppunit/autoregister/testfunc.h 2008-12-10 20:46:06.292344601 +0100
1099 +++ misc/build/cppunit-1.8.0/include/cppunit/autoregister/testfunc.h 2008-07-14 07:25:14.000000000 +0200
1100 @@ -1 +1,47 @@
1101 -dummy
1102 +/*************************************************************************
1104 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1106 + * Copyright 2008 by Sun Microsystems, Inc.
1108 + * OpenOffice.org - a multi-platform office productivity suite
1110 + * $RCSfile$
1111 + * $Revision$
1113 + * This file is part of OpenOffice.org.
1115 + * OpenOffice.org is free software: you can redistribute it and/or modify
1116 + * it under the terms of the GNU Lesser General Public License version 3
1117 + * only, as published by the Free Software Foundation.
1119 + * OpenOffice.org is distributed in the hope that it will be useful,
1120 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1121 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1122 + * GNU Lesser General Public License version 3 for more details
1123 + * (a copy is included in the LICENSE file that accompanied this code).
1125 + * You should have received a copy of the GNU Lesser General Public License
1126 + * version 3 along with OpenOffice.org. If not, see
1127 + * <http://www.openoffice.org/license.html>
1128 + * for a copy of the LGPLv3 License.
1130 + ************************************************************************/
1132 +#ifndef _testfunc_h
1133 +#define _testfunc_h
1135 +#include <cppunit/autoregister/htestresult.h>
1137 +#ifdef __cplusplus
1138 +extern "C" {
1139 +#endif
1141 +// typedef for a testfunction
1142 +typedef void (* FktPtr)(hTestResult);
1144 +#ifdef __cplusplus
1146 +#endif
1148 +#endif
1149 Nur in misc/build/cppunit-1.8.0/include/cppunit/autoregister: testfunc.h.dummy.
1150 --- misc/cppunit-1.8.0/include/cppunit/checkboom.hxx 2008-12-10 20:46:06.371034174 +0100
1151 +++ misc/build/cppunit-1.8.0/include/cppunit/checkboom.hxx 2008-07-14 07:25:14.000000000 +0200
1152 @@ -1 +1,40 @@
1153 -dummy
1154 +/*************************************************************************
1156 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1158 + * Copyright 2008 by Sun Microsystems, Inc.
1160 + * OpenOffice.org - a multi-platform office productivity suite
1162 + * $RCSfile$
1163 + * $Revision$
1165 + * This file is part of OpenOffice.org.
1167 + * OpenOffice.org is free software: you can redistribute it and/or modify
1168 + * it under the terms of the GNU Lesser General Public License version 3
1169 + * only, as published by the Free Software Foundation.
1171 + * OpenOffice.org is distributed in the hope that it will be useful,
1172 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1173 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1174 + * GNU Lesser General Public License version 3 for more details
1175 + * (a copy is included in the LICENSE file that accompanied this code).
1177 + * You should have received a copy of the GNU Lesser General Public License
1178 + * version 3 along with OpenOffice.org. If not, see
1179 + * <http://www.openoffice.org/license.html>
1180 + * for a copy of the LGPLv3 License.
1182 + ************************************************************************/
1184 +#ifndef CHECKBOOM_HXX
1185 +#define CHECKBOOM_HXX
1187 +#include <string>
1188 +#include <rtl/ustring.hxx>
1190 +void CheckBoom(bool bCondition, std::string const& msg);
1191 +void CheckBoom(bool bCondition, rtl::OUString const& msg);
1193 +#endif
1194 Nur in misc/build/cppunit-1.8.0/include/cppunit: checkboom.hxx.dummy.
1195 --- misc/cppunit-1.8.0/include/cppunit/cmdlinebits.hxx 2008-12-10 20:46:06.465888459 +0100
1196 +++ misc/build/cppunit-1.8.0/include/cppunit/cmdlinebits.hxx 2008-07-14 07:25:14.000000000 +0200
1197 @@ -1 +1,52 @@
1198 -dummy
1199 +/*************************************************************************
1201 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1203 + * Copyright 2008 by Sun Microsystems, Inc.
1205 + * OpenOffice.org - a multi-platform office productivity suite
1207 + * $RCSfile$
1208 + * $Revision$
1210 + * This file is part of OpenOffice.org.
1212 + * OpenOffice.org is free software: you can redistribute it and/or modify
1213 + * it under the terms of the GNU Lesser General Public License version 3
1214 + * only, as published by the Free Software Foundation.
1216 + * OpenOffice.org is distributed in the hope that it will be useful,
1217 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1218 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1219 + * GNU Lesser General Public License version 3 for more details
1220 + * (a copy is included in the LICENSE file that accompanied this code).
1222 + * You should have received a copy of the GNU Lesser General Public License
1223 + * version 3 along with OpenOffice.org. If not, see
1224 + * <http://www.openoffice.org/license.html>
1225 + * for a copy of the LGPLv3 License.
1227 + ************************************************************************/
1229 +#ifndef CMDLINEBITS_HXX
1230 +#define CMDLINEBITS_HXX
1232 +#include <sal/types.h>
1234 +typedef sal_uInt32 CmdLineBits;
1235 +const char* getForwardString();
1237 +#include <stdarg.h>
1239 +enum T_Print_Params {
1240 + T_INFO = 1,
1241 + T_VERBOSE,
1242 + T_DEBUG,
1243 + T_ERROR
1246 +// void t_print(const char*);
1247 +void t_print(const char*, ...);
1248 +void t_print(T_Print_Params, const char*, ...);
1250 +#endif
1251 Nur in misc/build/cppunit-1.8.0/include/cppunit: cmdlinebits.hxx.dummy.
1252 --- misc/cppunit-1.8.0/include/cppunit/extensions/AutoRegisterSuite.h 2002-03-28 16:47:07.000000000 +0100
1253 +++ misc/build/cppunit-1.8.0/include/cppunit/extensions/AutoRegisterSuite.h 2008-02-27 17:16:16.000000000 +0100
1254 @@ -1,6 +1,7 @@
1255 #ifndef CPPUNIT_EXTENSIONS_AUTOREGISTERSUITE_H
1256 #define CPPUNIT_EXTENSIONS_AUTOREGISTERSUITE_H
1258 +#include <stdio.h>
1259 #include <string>
1260 #include <cppunit/extensions/TestSuiteFactory.h>
1261 #include <cppunit/extensions/TestFactoryRegistry.h>
1262 @@ -30,19 +31,20 @@
1263 /** Auto-register the suite factory in the global registry.
1265 AutoRegisterSuite()
1267 - TestFactory *factory = new TestSuiteFactory<TestCaseType>();
1268 - TestFactoryRegistry::getRegistry().registerFactory( factory );
1272 + TestFactory *factory = new TestSuiteFactory<TestCaseType>();
1273 + TestFactoryRegistry::getRegistry().registerFactory( factory );
1276 /** Auto-register the suite factory in the specified registry.
1277 * \param name Name of the registry.
1279 AutoRegisterSuite( const std::string &name )
1281 - TestFactory *factory = new TestSuiteFactory<TestCaseType>();
1282 - TestFactoryRegistry::getRegistry( name ).registerFactory( factory );
1285 + // printf("AutoRegisterSuite %s\n", name.c_str());
1286 + TestFactory *factory = new TestSuiteFactory<TestCaseType>();
1287 + TestFactoryRegistry::getRegistry( name ).registerFactory( factory );
1291 } // namespace CppUnit
1292 --- misc/cppunit-1.8.0/include/cppunit/extensions/HelperMacros.h 2002-03-28 16:47:07.000000000 +0100
1293 +++ misc/build/cppunit-1.8.0/include/cppunit/extensions/HelperMacros.h 2008-02-27 17:17:12.000000000 +0100
1294 @@ -132,6 +132,14 @@
1296 }; \
1297 public: \
1298 + static CppUnit::TestSuite *suite() \
1299 + { \
1300 + CppUnit::TestSuiteBuilder<__ThisTestFixtureType> \
1301 + builder __CPPUNIT_SUITE_CTOR_ARGS( ATestFixtureType ); \
1302 + ThisTestFixtureFactory factory; \
1303 + __ThisTestFixtureType::registerTests( builder.suite(), &factory ); \
1304 + return builder.takeSuite(); \
1305 + } \
1306 static void \
1307 registerTests( CppUnit::TestSuite *suite, \
1308 CppUnit::TestFixtureFactory *factory ) \
1309 @@ -245,14 +253,6 @@
1310 #define CPPUNIT_TEST_SUITE_END() \
1311 builder.takeSuite(); \
1313 - static CppUnit::TestSuite *suite() \
1314 - { \
1315 - CppUnit::TestSuiteBuilder<__ThisTestFixtureType> \
1316 - builder __CPPUNIT_SUITE_CTOR_ARGS( ATestFixtureType ); \
1317 - ThisTestFixtureFactory factory; \
1318 - __ThisTestFixtureType::registerTests( builder.suite(), &factory ); \
1319 - return builder.takeSuite(); \
1320 - } \
1321 private: /* dummy typedef so that the macro can still end with ';'*/ \
1322 typedef ThisTestFixtureFactory __ThisTestFixtureFactory
1324 @@ -283,10 +283,12 @@
1325 * \see CPPUNIT_TEST_SUITE, CppUnit::AutoRegisterSuite,
1326 * CppUnit::TestFactoryRegistry.
1328 -#define CPPUNIT_TEST_SUITE_REGISTRATION( ATestFixtureType ) \
1329 - static CppUnit::AutoRegisterSuite< ATestFixtureType > \
1330 - __CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite )
1332 +/* LLA:
1333 + #define CPPUNIT_TEST_SUITE_REGISTRATION( ATestFixtureType ) \
1334 + static CppUnit::AutoRegisterSuite< ATestFixtureType > \
1335 + __CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite )
1338 /** Adds the specified fixture suite to the specified registry suite.
1339 * \ingroup CreatingTestSuite
1340 @@ -325,21 +327,7 @@
1342 #define CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( ATestFixtureType, suiteName ) \
1343 static CppUnit::AutoRegisterSuite< ATestFixtureType > \
1344 - __CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite )(suiteName)
1347 -// Backwards compatibility
1348 -// (Not tested!)
1350 -#if CPPUNIT_ENABLE_CU_TEST_MACROS
1352 -#define CU_TEST_SUITE(tc) CPPUNIT_TEST_SUITE(tc)
1353 -#define CU_TEST_SUB_SUITE(tc,sc) CPPUNIT_TEST_SUB_SUITE(tc,sc)
1354 -#define CU_TEST(tm) CPPUNIT_TEST(tm)
1355 -#define CU_TEST_SUITE_END() CPPUNIT_TEST_SUITE_END()
1356 -#define CU_TEST_SUITE_REGISTRATION(tc) CPPUNIT_TEST_SUITE_REGISTRATION(tc)
1358 -#endif
1359 + __CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite )( suiteName )
1362 #endif // CPPUNIT_EXTENSIONS_HELPERMACROS_H
1363 --- misc/cppunit-1.8.0/include/cppunit/extensions/TestFactoryRegistry.h 2002-03-28 16:47:07.000000000 +0100
1364 +++ misc/build/cppunit-1.8.0/include/cppunit/extensions/TestFactoryRegistry.h 2008-02-27 17:16:38.000000000 +0100
1365 @@ -4,14 +4,18 @@
1366 #include <cppunit/Portability.h>
1368 #if CPPUNIT_NEED_DLL_DECL
1369 +#ifdef _MSC_VER
1370 #pragma warning( push )
1371 #pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z
1372 #endif
1373 +#endif
1375 #include <cppunit/extensions/TestFactory.h>
1376 #include <map>
1377 #include <string>
1379 +#include <cppunit/autoregister/htestresult.h>
1381 namespace CppUnit {
1383 class TestSuite;
1384 @@ -79,7 +83,7 @@
1385 * \param name Name of the registry. It is the name of TestSuite returned by
1386 * makeTest().
1388 - TestFactoryRegistry( std::string name = "All Tests" );
1389 + TestFactoryRegistry( std::string const& name = "All Tests" );
1391 /// Destructor.
1392 virtual ~TestFactoryRegistry();
1393 @@ -105,6 +109,7 @@
1394 * specified name.
1396 static TestFactoryRegistry &getRegistry( const std::string &name );
1397 + static void testRegistries(hTestResult _pResult);
1399 /** Adds the registered tests to the specified suite.
1400 * \param suite Suite the tests are added to.
1401 @@ -116,9 +121,12 @@
1402 * \param factory Factory to register.
1403 * \deprecated Use registerFactory( TestFactory *) instead.
1405 +protected:
1407 void registerFactory( const std::string &name,
1408 TestFactory *factory );
1410 +public:
1412 /** Adds the specified TestFactory to the registry.
1414 * \param factory Factory to register.
1415 @@ -141,8 +149,10 @@
1418 #if CPPUNIT_NEED_DLL_DECL
1419 +#ifdef _MSC_VER
1420 #pragma warning( pop )
1421 #endif
1422 +#endif
1425 #endif // CPPUNIT_EXTENSIONS_TESTFACTORYREGISTRY_H
1426 --- misc/cppunit-1.8.0/include/cppunit/extensions/TestSuiteBuilder.h 2002-03-28 16:47:07.000000000 +0100
1427 +++ misc/build/cppunit-1.8.0/include/cppunit/extensions/TestSuiteBuilder.h 2008-02-27 17:17:22.000000000 +0100
1428 @@ -34,11 +34,11 @@
1430 #endif
1432 - TestSuiteBuilder( TestSuite *suite ) : m_suite( suite )
1433 + TestSuiteBuilder( TestSuite *_suite ) : m_suite( _suite )
1437 - TestSuiteBuilder(std::string name) : m_suite( new TestSuite(name) )
1438 + TestSuiteBuilder(std::string const& name) : m_suite( new TestSuite(name) )
1442 @@ -57,7 +57,7 @@
1443 m_suite->addTest( test );
1446 - void addTestCaller( std::string methodName,
1447 + void addTestCaller( std::string const& methodName,
1448 TestMethod testMethod )
1450 Test *test =
1451 @@ -66,7 +66,7 @@
1452 addTest( test );
1455 - void addTestCaller( std::string methodName,
1456 + void addTestCaller( std::string const& methodName,
1457 TestMethod testMethod,
1458 Fixture *fixture )
1460 @@ -78,7 +78,7 @@
1463 template<typename ExceptionType>
1464 - void addTestCallerForException( std::string methodName,
1465 + void addTestCallerForException( std::string const& methodName,
1466 TestMethod testMethod,
1467 Fixture *fixture,
1468 ExceptionType *dummyPointer )
1469 @@ -93,7 +93,8 @@
1471 std::string makeTestName( const std::string &methodName )
1473 - return m_suite->getName() + "." + methodName;
1474 + // return m_suite->getName() + "." + methodName;
1475 + return methodName;
1478 private:
1479 --- misc/cppunit-1.8.0/include/cppunit/externcallbackfunc.hxx 2008-12-10 20:46:06.550085206 +0100
1480 +++ misc/build/cppunit-1.8.0/include/cppunit/externcallbackfunc.hxx 2008-07-14 07:25:14.000000000 +0200
1481 @@ -1 +1,58 @@
1482 -dummy
1483 +/*************************************************************************
1485 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1487 + * Copyright 2008 by Sun Microsystems, Inc.
1489 + * OpenOffice.org - a multi-platform office productivity suite
1491 + * $RCSfile$
1492 + * $Revision$
1494 + * This file is part of OpenOffice.org.
1496 + * OpenOffice.org is free software: you can redistribute it and/or modify
1497 + * it under the terms of the GNU Lesser General Public License version 3
1498 + * only, as published by the Free Software Foundation.
1500 + * OpenOffice.org is distributed in the hope that it will be useful,
1501 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1502 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1503 + * GNU Lesser General Public License version 3 for more details
1504 + * (a copy is included in the LICENSE file that accompanied this code).
1506 + * You should have received a copy of the GNU Lesser General Public License
1507 + * version 3 along with OpenOffice.org. If not, see
1508 + * <http://www.openoffice.org/license.html>
1509 + * for a copy of the LGPLv3 License.
1511 + ************************************************************************/
1513 +#ifndef _externcallbackfunc_hxx
1514 +#define _externcallbackfunc_hxx
1516 +#include <cppunit/autoregister/callbackfunc_fktptr.h>
1518 +// these pointers have they origin in 'tresregister.cxx'
1519 +extern FktPtr_CallbackDispatch pCallbackFunc;
1521 +//# extern FktPtr_TestResult_startTest pTestResult_StartTest;
1522 +//# extern FktPtr_TestResult_addFailure pTestResult_AddFailure;
1523 +//# extern FktPtr_TestResult_addError pTestResult_AddError;
1524 +//# extern FktPtr_TestResult_endTest pTestResult_EndTest;
1525 +//# extern FktPtr_TestResult_addInfo pTestResult_AddInfo;
1527 +// these pointers have they origin in 'tresregister.cxx'
1528 +// extern FktPtr_TestResult_Starter pTestResult_Starter;
1530 +//# extern FktPtr_TestResult_startTest pTestResult_StartTest;
1531 +//# extern FktPtr_TestResult_addFailure pTestResult_AddFailure;
1532 +//# extern FktPtr_TestResult_addError pTestResult_AddError;
1533 +//# extern FktPtr_TestResult_endTest pTestResult_EndTest;
1534 +//# extern FktPtr_TestResult_addInfo pTestResult_AddInfo;
1535 +//#
1536 +//# extern FktPtr_TestResult_enterNode pTestResult_EnterNode;
1537 +//# extern FktPtr_TestResult_leaveNode pTestResult_LeaveNode;
1538 +//#
1540 +#endif
1541 Nur in misc/build/cppunit-1.8.0/include/cppunit: externcallbackfunc.hxx.dummy.
1542 --- misc/cppunit-1.8.0/include/cppunit/joblist.hxx 2008-12-10 20:46:06.643901729 +0100
1543 +++ misc/build/cppunit-1.8.0/include/cppunit/joblist.hxx 2008-07-14 07:25:14.000000000 +0200
1544 @@ -1 +1,99 @@
1545 -dummy
1546 +/*************************************************************************
1548 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1550 + * Copyright 2008 by Sun Microsystems, Inc.
1552 + * OpenOffice.org - a multi-platform office productivity suite
1554 + * $RCSfile$
1555 + * $Revision$
1557 + * This file is part of OpenOffice.org.
1559 + * OpenOffice.org is free software: you can redistribute it and/or modify
1560 + * it under the terms of the GNU Lesser General Public License version 3
1561 + * only, as published by the Free Software Foundation.
1563 + * OpenOffice.org is distributed in the hope that it will be useful,
1564 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1565 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1566 + * GNU Lesser General Public License version 3 for more details
1567 + * (a copy is included in the LICENSE file that accompanied this code).
1569 + * You should have received a copy of the GNU Lesser General Public License
1570 + * version 3 along with OpenOffice.org. If not, see
1571 + * <http://www.openoffice.org/license.html>
1572 + * for a copy of the LGPLv3 License.
1574 + ************************************************************************/
1576 +#ifndef CPPUNIT_JOBLIST_HXX
1577 +#define CPPUNIT_JOBLIST_HXX
1579 +#include <vector>
1580 +#include <string>
1581 +#include <hash_map>
1582 +#include "sal/types.h"
1584 +// #include <cppunit/nocopy.hxx>
1587 + struct eqstr
1589 + bool operator()( std::string const & s1, std::string const& s2 ) const
1591 + return ( s1 == s2 );
1593 + };
1597 + struct hashstr
1599 + sal_uInt32 operator()( std::string const & str ) const
1601 + return str.hashCode();
1603 + };
1605 +typedef std::hash_map< std::string, int > HashMap;
1607 +// typedef std::vector<std::string> StringList;
1609 +#define JOB_UNKNOWN 0
1610 +#define JOB_NOT_FOUND 1
1611 +#define JOB_PASSED 2
1612 +#define JOB_FAILED 3
1613 +#define JOB_ACCESS 4
1615 +#define JOB_EXCLUDE_LIST 0x1000
1616 +#define JOB_ONLY_LIST 0x1001
1618 +typedef sal_Int16 JobType;
1620 +class JobList /* : NOCOPY */
1622 + HashMap m_aJobList;
1623 + char** ppsJobList;
1625 + // returns true if the given List contains unxlngi or unxsols or wntmsci...
1626 + bool isInCurrentEnvironment(std::string const& _sString);
1627 + std::string trim(std::string const& _sStringToTrim);
1629 +public:
1630 + JobList();
1631 + ~JobList();
1633 + bool readfile(std::string const& _sFilename, JobType _nJobType);
1634 + const char** getList() const {return (const char**)ppsJobList;}
1636 + int getJobListEntry(std::string const& _sIndexName);
1637 + void setJobListEntry(std::string const& _sIndexName, int _nValue);
1639 + int size() {return m_aJobList.size();}
1640 + HashMap const& getHashMap() {return m_aJobList;}
1643 +#endif
1645 Nur in misc/build/cppunit-1.8.0/include/cppunit: joblist.hxx.dummy.
1646 --- misc/cppunit-1.8.0/include/cppunit/nocopy.hxx 2008-12-10 20:46:06.720535461 +0100
1647 +++ misc/build/cppunit-1.8.0/include/cppunit/nocopy.hxx 2008-02-27 17:08:42.000000000 +0100
1648 @@ -1 +1,13 @@
1649 -dummy
1650 +#ifndef NOCOPY_HXX
1651 +#define NOCOPY_HXX
1653 +// prevent illegal copies
1654 +class NOCOPY
1656 + NOCOPY(NOCOPY const&);
1657 + NOCOPY& operator=(NOCOPY const&);
1658 +public:
1659 + NOCOPY(){}
1662 +#endif
1663 Nur in misc/build/cppunit-1.8.0/include/cppunit: nocopy.hxx.dummy.
1664 --- misc/cppunit-1.8.0/include/cppunit/portability/config-auto.h 2008-12-10 20:46:06.802507987 +0100
1665 +++ misc/build/cppunit-1.8.0/include/cppunit/portability/config-auto.h 2008-07-14 07:25:14.000000000 +0200
1666 @@ -1 +1,64 @@
1667 -dummy
1668 +#ifndef _INCLUDE_CPPUNIT_CONFIG_AUTO_H
1669 +#define _INCLUDE_CPPUNIT_CONFIG_AUTO_H 1
1671 +/* include/cppunit/config-auto.h. Generated automatically at end of configure. */
1672 +/* config/config.h. Generated automatically by configure. */
1673 +/* config/config.h.in. Generated automatically from configure.in by autoheader. */
1675 +/* define if library uses std::string::compare(string,pos,n) */
1676 +#ifndef CPPUNIT_FUNC_STRING_COMPARE_STRING_FIRST
1677 +#define CPPUNIT_FUNC_STRING_COMPARE_STRING_FIRST 1
1678 +#endif
1680 +/* define if the library defines sstream */
1681 +#ifndef CPPUNIT_HAVE_SSTREAM
1682 +#define CPPUNIT_HAVE_SSTREAM 1
1683 +#endif
1685 +/* Define if you have the <cmath> header file. */
1686 +#ifndef CPPUNIT_HAVE_CMATH
1687 +#define CPPUNIT_HAVE_CMATH 1
1688 +#endif
1690 +/* Define if you have the <dlfcn.h> header file. */
1691 +#ifndef CPPUNIT_HAVE_DLFCN_H
1692 +#define CPPUNIT_HAVE_DLFCN_H 1
1693 +#endif
1695 +/* define to 1 if the compiler implements namespaces */
1696 +#ifndef CPPUNIT_HAVE_NAMESPACES
1697 +#define CPPUNIT_HAVE_NAMESPACES 1
1698 +#endif
1700 +/* define if the compiler supports Run-Time Type Identification */
1701 +#ifndef CPPUNIT_HAVE_RTTI
1702 +#define CPPUNIT_HAVE_RTTI 0
1703 +#endif
1705 +/* define if the compiler has stringstream */
1706 +#ifndef CPPUNIT_HAVE_SSTREAM
1707 +#define CPPUNIT_HAVE_SSTREAM 1
1708 +#endif
1710 +/* Define if you have the <strstream> header file. */
1711 +#ifndef CPPUNIT_HAVE_STRSTREAM
1712 +#define CPPUNIT_HAVE_STRSTREAM 1
1713 +#endif
1715 +/* Name of package */
1716 +#ifndef CPPUNIT_PACKAGE
1717 +#define CPPUNIT_PACKAGE "cppunit"
1718 +#endif
1720 +/* Define to 1 to use type_info::name() for class names */
1721 +#ifndef CPPUNIT_USE_TYPEINFO_NAME
1722 +#define CPPUNIT_USE_TYPEINFO_NAME CPPUNIT_HAVE_RTTI
1723 +#endif
1725 +/* Version number of package */
1726 +#ifndef CPPUNIT_VERSION
1727 +#define CPPUNIT_VERSION "1.8.0"
1728 +#endif
1730 +/* _INCLUDE_CPPUNIT_CONFIG_AUTO_H */
1731 +#endif
1732 Nur in misc/build/cppunit-1.8.0/include/cppunit/portability: config-auto.h.dummy.
1733 --- misc/cppunit-1.8.0/include/cppunit/portability/config-bcb5.h 2008-12-10 20:46:05.287223886 +0100
1734 +++ misc/build/cppunit-1.8.0/include/cppunit/portability/config-bcb5.h 2008-02-27 17:15:52.000000000 +0100
1735 @@ -1 +1,48 @@
1736 -dummy
1737 +#ifndef _INCLUDE_CPPUNIT_CONFIG_BCB5_H
1738 +#define _INCLUDE_CPPUNIT_CONFIG_BCB5_H 1
1740 +#define HAVE_CMATH 1
1742 +/* include/cppunit/config-bcb5.h. Manually adapted from
1743 + include/cppunit/config-auto.h */
1745 +/* define if library uses std::string::compare(string,pos,n) */
1746 +#ifndef CPPUNIT_FUNC_STRING_COMPARE_STRING_FIRST
1747 +#define CPPUNIT_FUNC_STRING_COMPARE_STRING_FIRST 1
1748 +#endif
1750 +/* Define if you have the <dlfcn.h> header file. */
1751 +#ifdef CPPUNIT_HAVE_DLFCN_H
1752 +#undef CPPUNIT_HAVE_DLFCN_H
1753 +#endif
1755 +/* define to 1 if the compiler implements namespaces */
1756 +#ifndef CPPUNIT_HAVE_NAMESPACES
1757 +#define CPPUNIT_HAVE_NAMESPACES 1
1758 +#endif
1760 +/* define if the compiler supports Run-Time Type Identification */
1761 +#ifndef CPPUNIT_HAVE_RTTI
1762 +#define CPPUNIT_HAVE_RTTI 1
1763 +#endif
1765 +/* Define to 1 to use type_info::name() for class names */
1766 +#ifndef CPPUNIT_USE_TYPEINFO_NAME
1767 +#define CPPUNIT_USE_TYPEINFO_NAME CPPUNIT_HAVE_RTTI
1768 +#endif
1770 +#define CPPUNIT_HAVE_SSTREAM 1
1772 +/* Name of package */
1773 +#ifndef CPPUNIT_PACKAGE
1774 +#define CPPUNIT_PACKAGE "cppunit"
1775 +#endif
1777 +/* Version number of package */
1778 +#ifndef CPPUNIT_VERSION
1779 +#define CPPUNIT_VERSION "1.5.5"
1780 +#endif
1783 +/* _INCLUDE_CPPUNIT_CONFIG_BCB5_H */
1784 +#endif
1785 Nur in misc/build/cppunit-1.8.0/include/cppunit/portability: config-bcb5.h.dummy.
1786 --- misc/cppunit-1.8.0/include/cppunit/portability/config-msvc6.h 2008-12-10 20:46:05.392326519 +0100
1787 +++ misc/build/cppunit-1.8.0/include/cppunit/portability/config-msvc6.h 2008-02-27 17:15:40.000000000 +0100
1788 @@ -1 +1,62 @@
1789 -dummy
1790 +#ifndef _INCLUDE_CPPUNIT_CONFIG_MSVC6_H
1791 +#define _INCLUDE_CPPUNIT_CONFIG_MSVC6_H 1
1793 +#define HAVE_CMATH 1
1795 +/* include/cppunit/config-msvc6.h. Manually adapted from
1796 + include/cppunit/config-auto.h */
1798 +/* define if library uses std::string::compare(string,pos,n) */
1799 +#ifdef CPPUNIT_FUNC_STRING_COMPARE_STRING_FIRST
1800 +#undef CPPUNIT_FUNC_STRING_COMPARE_STRING_FIRST
1801 +#endif
1803 +/* Define if you have the <dlfcn.h> header file. */
1804 +#ifdef CPPUNIT_HAVE_DLFCN_H
1805 +#undef CPPUNIT_HAVE_DLFCN_H
1806 +#endif
1808 +/* define to 1 if the compiler implements namespaces */
1809 +#ifndef CPPUNIT_HAVE_NAMESPACES
1810 +#define CPPUNIT_HAVE_NAMESPACES 1
1811 +#endif
1813 +#ifndef CPPUNIT_HAVE_RTTI
1814 +#define CPPUNIT_HAVE_RTTI 0
1815 +#endif
1817 +#ifndef CPPUNIT_USE_TYPEINFO_NAME
1818 +#define CPPUNIT_USE_TYPEINFO_NAME CPPUNIT_HAVE_RTTI
1819 +#endif
1821 +#define CPPUNIT_HAVE_SSTREAM 1
1823 +/* Name of package */
1824 +#ifndef CPPUNIT_PACKAGE
1825 +#define CPPUNIT_PACKAGE "cppunit"
1826 +#endif
1828 +#undef CPPUNIT_API
1830 +// define CPPUNIT_DLL_BUILD when building CppUnit dll.
1831 +#ifdef CPPUNIT_BUILD_DLL
1832 +#define CPPUNIT_API __declspec(dllexport)
1833 +#endif
1835 +// define CPPUNIT_DLL when linking to CppUnit dll.
1836 +#ifdef CPPUNIT_DLL
1837 +#define CPPUNIT_API __declspec(dllimport)
1838 +#endif
1840 +#ifdef CPPUNIT_API
1841 +#undef CPPUNIT_NEED_DLL_DECL
1842 +#define CPPUNIT_NEED_DLL_DECL 1
1843 +#endif
1845 +#if _MSC_VER > 1000 // VC++
1846 +#pragma warning( disable : 4786 ) // disable warning debug symbol > 255...
1847 +#endif // _MSC_VER > 1000
1850 +/* _INCLUDE_CPPUNIT_CONFIG_MSVC6_H */
1851 +#endif
1852 Nur in misc/build/cppunit-1.8.0/include/cppunit/portability: config-msvc6.h.dummy.
1853 --- misc/cppunit-1.8.0/include/cppunit/result/SynchronizedObject.h 2008-12-10 20:46:04.893658092 +0100
1854 +++ misc/build/cppunit-1.8.0/include/cppunit/result/SynchronizedObject.h 2008-02-27 17:14:06.000000000 +0100
1855 @@ -1 +1,82 @@
1856 -dummy
1857 +#ifndef CPPUNIT_SYNCHRONIZEDOBJECT_H
1858 +#define CPPUNIT_SYNCHRONIZEDOBJECT_H
1860 +#include <cppunit/Portability.h>
1861 +#include <cppunit/nocopy.hxx>
1863 +namespace CppUnit
1866 +/*! \brief Base class for synchronized object.
1868 + * Synchronized object are object which members are used concurrently by mutiple
1869 + * threads.
1871 + * This class define the class SynchronizationObject which must be subclassed
1872 + * to implement an actual lock.
1874 + * Each instance of this class holds a pointer on a lock object.
1876 + * See src/msvc6/MfcSynchronizedObject.h for an example.
1877 + */
1878 +class CPPUNIT_API SynchronizedObject
1880 +public:
1881 + /*! \brief Abstract synchronization object (mutex)
1882 + */
1883 + class SynchronizationObject
1885 + public:
1886 + SynchronizationObject() {}
1887 + virtual ~SynchronizationObject() {}
1889 + virtual void lock() {}
1890 + virtual void unlock() {}
1891 + };
1893 + /*! Constructs a SynchronizedObject object.
1894 + */
1895 + SynchronizedObject( SynchronizationObject *syncObject =0 );
1897 + /// Destructor.
1898 + virtual ~SynchronizedObject();
1900 +protected:
1901 + /*! \brief Locks a synchronization object in the current scope.
1902 + */
1903 + class ExclusiveZone : NOCOPY
1905 + SynchronizationObject *m_syncObject;
1907 + public:
1908 + ExclusiveZone( SynchronizationObject *syncObject )
1909 + : m_syncObject( syncObject )
1910 + {
1911 + m_syncObject->lock();
1914 + ~ExclusiveZone()
1915 + {
1916 + m_syncObject->unlock ();
1918 + };
1920 + virtual void setSynchronizationObject( SynchronizationObject *syncObject );
1922 +protected:
1923 + SynchronizationObject *m_syncObject;
1925 +private:
1926 + /// Prevents the use of the copy constructor.
1927 + SynchronizedObject( const SynchronizedObject &copy );
1929 + /// Prevents the use of the copy operator.
1930 + void operator =( const SynchronizedObject &copy );
1935 +} // namespace CppUnit
1938 +#endif // CPPUNIT_SYNCHRONIZEDOBJECT_H
1939 Nur in misc/build/cppunit-1.8.0/include/cppunit/result: SynchronizedObject.h.dummy.
1940 --- misc/cppunit-1.8.0/include/cppunit/result/TestListener.h 2008-12-10 20:46:04.938237839 +0100
1941 +++ misc/build/cppunit-1.8.0/include/cppunit/result/TestListener.h 2008-02-27 17:14:38.000000000 +0100
1942 @@ -1 +1,62 @@
1943 -dummy
1944 +#ifndef CPPUNIT_TESTLISTENER_H // -*- C++ -*-
1945 +#define CPPUNIT_TESTLISTENER_H
1947 +#include <cppunit/Portability.h>
1950 +namespace CppUnit {
1952 +class Exception;
1953 +class Test;
1954 +class TestFailure;
1957 +/*! \brief Listener for test progress and result.
1958 + * \ingroup TrackingTestExecution
1960 + * Implementing the Observer pattern a TestListener may be registered
1961 + * to a TestResult to obtain information on the testing progress. Use
1962 + * specialized sub classes of TestListener for text output
1963 + * (TextTestProgressListener). Do not use the Listener for the test
1964 + * result output, use a subclass of Outputter instead.
1966 + * The test framework distinguishes between failures and errors.
1967 + * A failure is anticipated and checked for with assertions. Errors are
1968 + * unanticipated problems signified by exceptions that are not generated
1969 + * by the framework.
1971 + * \see TestResult
1972 + */
1973 +class CPPUNIT_API TestListener
1975 +public:
1976 + virtual ~TestListener() {}
1978 + /// Called when just before a TestCase is run.
1979 + virtual void startTest( Test *test ) =0 ;
1981 + /*! Called when a failure occurs while running a test.
1982 + * \see TestFailure.
1983 + * \warning \a failure is a temporary object that is destroyed after the
1984 + * method call. Use TestFailure::clone() to create a duplicate.
1985 + */
1986 + virtual void addFailure( const TestFailure &failure ) =0;
1988 + /// Called just after a TestCase was run (even if a failure occured).
1989 + virtual void endTest( Test *test ) =0;
1991 + // additional info
1992 + virtual void addInfo(Test *test, const char*) =0;
1994 + // info in which node we are
1995 + // helper functions to create tree structures
1996 + // old: virtual void enterNode( const char* ) =0;
1997 + // old: virtual void leaveNode( const char* ) =0;
2001 +} // namespace CppUnit
2003 +#endif // CPPUNIT_TESTLISTENER_H
2006 Nur in misc/build/cppunit-1.8.0/include/cppunit/result: TestListener.h.dummy.
2007 --- misc/cppunit-1.8.0/include/cppunit/result/TestResult.h 2008-12-10 20:46:05.070889564 +0100
2008 +++ misc/build/cppunit-1.8.0/include/cppunit/result/TestResult.h 2008-02-27 17:13:08.000000000 +0100
2009 @@ -1 +1,123 @@
2010 -dummy
2011 +#ifndef CPPUNIT_TESTRESULT_H
2012 +#define CPPUNIT_TESTRESULT_H
2014 +#include <cppunit/Portability.h>
2016 +#if CPPUNIT_NEED_DLL_DECL
2017 +#ifdef _MSC_VER
2018 +#pragma warning( push )
2019 +#pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z
2020 +#endif
2021 +#endif
2023 +#include <cppunit/result/SynchronizedObject.h>
2024 +#include <vector>
2025 +#include <string>
2026 +#include <deque>
2027 +//!io #include <iostream>
2029 +#include "cppunit/result/optionhelper.hxx"
2030 +#include "cppunit/TestFailure.h"
2032 +class Outputter;
2033 +namespace CppUnit {
2035 +class Exception;
2036 +class Test;
2037 +// class TestFailure;
2038 +class TestListener;
2040 +#if CPPUNIT_NEED_DLL_DECL
2041 + template class CPPUNIT_API std::deque<TestListener *>;
2042 +#endif
2044 +/*! \brief Manages TestListener.
2045 + * \ingroup TrackingTestExecution
2047 + * A single instance of this class is used when running the test. It is usually
2048 + * created by the test runner (TestRunner).
2050 + * This class shouldn't have to be inherited from. Use a TestListener
2051 + * or one of its subclasses to be informed of the ongoing tests.
2052 + * Use a Outputter to receive a test summary once it has finished
2054 + * TestResult supplies a template method 'setSynchronizationObject()'
2055 + * so that subclasses can provide mutual exclusion in the face of multiple
2056 + * threads. This can be useful when tests execute in one thread and
2057 + * they fill a subclass of TestResult which effects change in another
2058 + * thread. To have mutual exclusion, override setSynchronizationObject()
2059 + * and make sure that you create an instance of ExclusiveZone at the
2060 + * beginning of each method.
2062 + * \see Test, TestListener, TestResultCollector, Outputter.
2063 + */
2064 +class CPPUNIT_API TestResult : protected SynchronizedObject
2066 +protected:
2067 + OptionHelper m_aOptionHelper;
2069 +public:
2070 + TestResult( GetOpt & _aOptions, SynchronizationObject *syncObject = 0 );
2071 + virtual ~TestResult();
2073 + virtual void addListener( TestListener *listener );
2074 + virtual void removeListener( TestListener *listener );
2076 + virtual void reset();
2077 + virtual void stop();
2079 + virtual bool shouldStop() const;
2081 + virtual void startTest( Test *test );
2082 + virtual void addError( Test *test, Exception *e, ErrorType::num eType=ErrorType::ET_ERROR);
2083 + virtual void addFailure( Test *test, Exception *e );
2084 + virtual void endTest( Test *test );
2086 + // LLA: additionals
2087 + virtual void addInfo(Test *test, const char *sInfo);
2089 + virtual void enterNode(const char* Node);
2090 + virtual void leaveNode(const char* Node);
2091 + virtual std::string getNodeName();
2093 + // if true, execution is allowed.
2094 + virtual bool isAllowedToExecute(std::string const & sName);
2095 + bool isOnlyShowJobs() {return m_aOptionHelper.isOnlyShowJobs();}
2096 + bool isOptionWhereAmI();
2098 + virtual void print(Outputter &);
2099 + void setExitValue(int _nValue) {m_nExitValue = _nValue;}
2100 + int getExitValue() {return m_nExitValue;}
2102 +protected:
2103 + void addFailure( const TestFailure &failure );
2105 +protected:
2106 + typedef std::deque<TestListener *> TestListeners;
2107 + TestListeners m_listeners;
2108 + bool m_stop;
2110 + // this vector is used to expand the test name with a current node name
2111 + std::vector<std::string> m_aCurrentNodeNames;
2113 + //# std::vector<std::string> m_aNodes;
2115 +private:
2116 + TestResult( const TestResult &other );
2117 + TestResult &operator =( const TestResult &other );
2118 + int m_nExitValue;
2122 +} // namespace CppUnit
2125 +#if CPPUNIT_NEED_DLL_DECL
2126 +#ifdef _MSC_VER
2127 +#pragma warning( pop )
2128 +#endif
2129 +#endif
2131 +#endif // CPPUNIT_TESTRESULT_H
2134 Nur in misc/build/cppunit-1.8.0/include/cppunit/result: TestResult.h.dummy.
2135 --- misc/cppunit-1.8.0/include/cppunit/result/TestResultCollector.h 2008-12-10 20:46:05.024473262 +0100
2136 +++ misc/build/cppunit-1.8.0/include/cppunit/result/TestResultCollector.h 2008-02-27 17:14:48.000000000 +0100
2137 @@ -1 +1,165 @@
2138 -dummy
2139 +#ifndef CPPUNIT_TESTRESULTCOLLECTOR_H
2140 +#define CPPUNIT_TESTRESULTCOLLECTOR_H
2142 +#include <cppunit/Portability.h>
2144 +#if CPPUNIT_NEED_DLL_DECL
2145 +#ifdef _MSC_VER
2146 +#pragma warning( push )
2147 +#pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z
2148 +#endif
2149 +#endif
2151 +#include <cppunit/result/TestResult.h>
2152 +#include <cppunit/result/TestSucessListener.h>
2153 +#include <deque>
2154 +#include <vector>
2156 +namespace CppUnit
2160 +#if CPPUNIT_NEED_DLL_DECL
2161 + template class CPPUNIT_API std::deque<TestFailure *>;
2162 + template class CPPUNIT_API std::deque<Test *>;
2163 +#endif
2166 +/*! \brief Collects test result.
2167 + * \ingroup WritingTestResult
2168 + * \ingroup BrowsingCollectedTestResult
2169 + *
2170 + * A TestResultCollector is a TestListener which collects the results of executing
2171 + * a test case. It is an instance of the Collecting Parameter pattern.
2173 + * The test framework distinguishes between failures and errors.
2174 + * A failure is anticipated and checked for with assertions. Errors are
2175 + * unanticipated problems signified by exceptions that are not generated
2176 + * by the framework.
2177 + * \see TestListener, TestFailure.
2178 + */
2180 +class OneStringContainer
2182 + std::string m_sName;
2183 +protected:
2184 + OneStringContainer() {}
2185 +public:
2186 + OneStringContainer(std::string const& _sName)
2187 + :m_sName(_sName){}
2188 + std::string getString() const {return m_sName;}
2189 + virtual ~OneStringContainer(){}
2192 +// -----------------------------------------------------------------------------
2193 +class TestEnvelope : public OneStringContainer
2195 + Test* m_pTest;
2196 +public:
2197 + TestEnvelope():m_pTest(NULL){}
2199 + TestEnvelope(Test* _pTest, std::string const& _sName)
2200 + : OneStringContainer(_sName),
2201 + m_pTest(_pTest)
2202 + {}
2204 + Test* getTest() {return m_pTest;}
2205 + virtual ~TestEnvelope(){}
2209 +// -----------------------------------------------------------------------------
2210 +class TestInfo : public TestEnvelope
2212 +public:
2213 + TestInfo(Test* _pTest, std::string const& _sName)
2214 + :TestEnvelope(_pTest, _sName)
2215 + {}
2218 +// -----------------------------------------------------------------------------
2219 +class TestFailureEnvelope : public OneStringContainer
2221 + TestFailure* m_pTestFailure;
2222 +public:
2223 + TestFailureEnvelope():m_pTestFailure(NULL){}
2225 + TestFailureEnvelope(TestFailure* _pTestFailure, std::string const& _sName)
2226 + :OneStringContainer(_sName),
2227 + m_pTestFailure(_pTestFailure)
2228 + {}
2230 + TestFailure* getTestFailure() {return m_pTestFailure;}
2231 + virtual ~TestFailureEnvelope(){}
2234 +// -----------------------------------------------------------------------------
2236 +class CPPUNIT_API TestResultCollector : public TestSucessListener
2238 + TestResult* m_pResult;
2239 +public:
2240 + typedef std::deque<TestFailureEnvelope *> TestFailures;
2241 + typedef std::deque<TestEnvelope *> Tests;
2242 + typedef std::vector<TestInfo *> TestInfos;
2245 + /*! Constructs a TestResultCollector object.
2246 + */
2247 + TestResultCollector( TestResult *_pResult, SynchronizationObject *syncObject = 0 );
2249 + /// Destructor.
2250 + virtual ~TestResultCollector();
2252 + void startTest( Test *test );
2253 + void endTest( Test *test );
2255 + void addFailure( const TestFailure &failure );
2257 + virtual void reset();
2259 + virtual int runTests() const;
2260 + virtual int testErrors() const;
2261 + virtual int testFailures() const;
2262 + virtual int testFailuresTotal() const;
2264 + virtual const TestFailures& failures() const;
2265 + virtual const Tests &tests() const;
2266 + virtual std::string getInfo(Test*);
2268 + virtual void addInfo(Test *test, const char *sInfo);
2270 + // virtual void enterNode(const char* Node);
2271 + // virtual void leaveNode(const char* Node);
2273 +protected:
2274 + Tests m_tests;
2275 + TestFailures m_failures;
2276 + TestInfos m_aInfos;
2278 + int m_testErrors;
2280 + // this vector is used to expand the test name with a current node name
2281 + // std::vector<std::string> m_aCurrentNodeNames;
2282 + // std::string getNodeName();
2283 +private:
2284 + /// Prevents the use of the copy constructor.
2285 + TestResultCollector( const TestResultCollector &copy );
2287 + /// Prevents the use of the copy operator.
2288 + void operator =( const TestResultCollector &copy );
2293 +} // namespace CppUnit
2296 +#if CPPUNIT_NEED_DLL_DECL
2297 +#ifdef _MSC_VER
2298 +#pragma warning( pop )
2299 +#endif
2300 +#endif
2303 +#endif // CPPUNIT_TESTRESULTCOLLECTOR_H
2304 Nur in misc/build/cppunit-1.8.0/include/cppunit/result: TestResultCollector.h.dummy.
2305 --- misc/cppunit-1.8.0/include/cppunit/result/TestSucessListener.h 2008-12-10 20:46:05.161106554 +0100
2306 +++ misc/build/cppunit-1.8.0/include/cppunit/result/TestSucessListener.h 2008-02-27 17:14:16.000000000 +0100
2307 @@ -1 +1,40 @@
2308 -dummy
2309 +#ifndef CPPUNIT_TESTSUCESSLISTENER_H
2310 +#define CPPUNIT_TESTSUCESSLISTENER_H
2312 +#include <cppunit/result/SynchronizedObject.h>
2313 +#include <cppunit/result/TestListener.h>
2316 +namespace CppUnit
2319 +/*! \brief TestListener that checks if any test case failed.
2320 + * \ingroup TrackingTestExecution
2321 + */
2322 +class CPPUNIT_API TestSucessListener : public TestListener,
2323 + public SynchronizedObject
2325 +public:
2326 + /*! Constructs a TestSucessListener object.
2327 + */
2328 + TestSucessListener( SynchronizationObject *syncObject = 0 );
2330 + /// Destructor.
2331 + virtual ~TestSucessListener();
2333 + virtual void reset();
2335 + void addFailure( const TestFailure &failure );
2337 + /// Returns whether the entire test was successful or not.
2338 + virtual bool wasSuccessful() const;
2340 +private:
2341 + bool m_sucess;
2345 +} // namespace CppUnit
2348 +#endif // CPPUNIT_TESTSUCESSLISTENER_H
2349 Nur in misc/build/cppunit-1.8.0/include/cppunit/result: TestSucessListener.h.dummy.
2350 --- misc/cppunit-1.8.0/include/cppunit/result/TextTestResult.h 2008-12-10 20:46:05.242583534 +0100
2351 +++ misc/build/cppunit-1.8.0/include/cppunit/result/TextTestResult.h 2008-02-27 17:14:28.000000000 +0100
2352 @@ -1 +1,62 @@
2353 -dummy
2354 +#ifndef CPPUNIT_TEXTTESTRESULT_H
2355 +#define CPPUNIT_TEXTTESTRESULT_H
2357 +#include <cppunit/result/TestResult.h>
2358 +#include <cppunit/result/TestResultCollector.h>
2359 +#include <ostream>
2361 +class GetOpt;
2362 +namespace CppUnit {
2364 +class SourceLine;
2365 +class Exception;
2366 +class Test;
2368 +/*! \brief Holds printable test result (DEPRECATED).
2369 + * \ingroup TrackingTestExecution
2370 + *
2371 + * deprecated Use class TextTestProgressListener and TextOutputter instead.
2372 + */
2373 +class CPPUNIT_API TextTestResult : public TestResult
2374 +/* public TestResultCollector*/
2376 + TestResultCollector m_aResulter;
2377 +public:
2378 + TextTestResult(GetOpt& _aOptions);
2380 + virtual void addFailure( const TestFailure &failure );
2381 + virtual void startTest( Test *test );
2382 + virtual void endTest( Test *test );
2384 + virtual void print( std::ostream &stream );
2385 +protected:
2387 + virtual void printFailures( std::ostream &stream );
2388 + virtual void printHeader( std::ostream &stream );
2390 + virtual void printFailure( TestFailure *failure,
2391 + int failureNumber,
2392 + std::ostream &stream );
2393 + virtual void printFailureListMark( int failureNumber,
2394 + std::ostream &stream );
2395 + virtual void printFailureTestName( TestFailure *failure,
2396 + std::ostream &stream );
2397 + virtual void printFailureType( TestFailure *failure,
2398 + std::ostream &stream );
2399 + virtual void printFailureLocation( SourceLine sourceLine,
2400 + std::ostream &stream );
2401 + virtual void printFailureDetail( Exception *thrownException,
2402 + std::ostream &stream );
2403 + virtual void printFailureWarning( std::ostream &stream );
2404 + virtual void printStatistics( std::ostream &stream );
2407 +/** insertion operator for easy output */
2408 +std::ostream &operator <<( std::ostream &stream,
2409 + TextTestResult &result );
2411 +} // namespace CppUnit
2413 +#endif // CPPUNIT_TEXTTESTRESULT_H
2416 Nur in misc/build/cppunit-1.8.0/include/cppunit/result: TextTestResult.h.dummy.
2417 --- misc/cppunit-1.8.0/include/cppunit/result/callbackfunc.h 2008-12-10 20:46:06.881445744 +0100
2418 +++ misc/build/cppunit-1.8.0/include/cppunit/result/callbackfunc.h 2008-02-27 17:15:00.000000000 +0100
2419 @@ -1 +1,25 @@
2420 -dummy
2421 +#ifndef _callbackfunc_h
2422 +#define _callbackfunc_h
2424 +#ifdef __cplusplus
2425 +extern "C" {
2426 +#endif
2428 + // this is the entry point from the DLL back to the executable.
2429 + sal_Int32 CallbackDispatch(int x, ...);
2431 +//# void TestResult_startTest(hTestResult _pResult, hTest _pTest);
2432 +//# void TestResult_addFailure( hTestResult _pResult, hTest _pTest, hException _pException );
2433 +//# void TestResult_addError( hTestResult _pResult, hTest _pTest, hException _pException );
2434 +//# void TestResult_endTest( hTestResult _pResult, hTest _pTest );
2435 +//# bool TestResult_shouldStop(hTestResult _pResult);
2436 +//# void TestResult_addInfo( hTestResult _pResult, hTest _pTest, const char* _sInfo );
2437 +//#
2438 +//# void TestResult_enterNode( hTestResult _pResult, const char* _sInfo );
2439 +//# void TestResult_leaveNode( hTestResult _pResult, const char* _sInfo );
2441 +#ifdef __cplusplus
2443 +#endif
2445 +#endif
2446 Nur in misc/build/cppunit-1.8.0/include/cppunit/result: callbackfunc.h.dummy.
2447 --- misc/cppunit-1.8.0/include/cppunit/result/emacsTestResult.hxx 2008-12-10 20:46:06.924792880 +0100
2448 +++ misc/build/cppunit-1.8.0/include/cppunit/result/emacsTestResult.hxx 2008-12-10 20:42:43.000000000 +0100
2449 @@ -1 +1,82 @@
2450 -dummy
2451 +/*************************************************************************
2453 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2455 + * Copyright 2008 by Sun Microsystems, Inc.
2457 + * OpenOffice.org - a multi-platform office productivity suite
2459 + * $RCSfile$
2460 + * $Revision$
2462 + * This file is part of OpenOffice.org.
2464 + * OpenOffice.org is free software: you can redistribute it and/or modify
2465 + * it under the terms of the GNU Lesser General Public License version 3
2466 + * only, as published by the Free Software Foundation.
2468 + * OpenOffice.org is distributed in the hope that it will be useful,
2469 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2470 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2471 + * GNU Lesser General Public License version 3 for more details
2472 + * (a copy is included in the LICENSE file that accompanied this code).
2474 + * You should have received a copy of the GNU Lesser General Public License
2475 + * version 3 along with OpenOffice.org. If not, see
2476 + * <http://www.openoffice.org/license.html>
2477 + * for a copy of the LGPLv3 License.
2479 + ************************************************************************/
2481 +#ifndef cppunit_emacstestresult_h
2482 +#define cppunit_emacstestresult_h
2484 +#include <cppunit/result/TestResult.h>
2485 +#include <cppunit/result/TestResultCollector.h>
2486 +#include <ostream>
2487 +#include "testshl/getopt.hxx"
2489 +class Outputter;
2490 +namespace CppUnit {
2492 +class SourceLine;
2493 +class Exception;
2494 +class Test;
2496 +/*! \brief Holds printable test result (DEPRECATED).
2497 + * \ingroup TrackingTestExecution
2498 + *
2499 + * deprecated Use class TextTestProgressListener and TextOutputter instead.
2500 + */
2501 + class CPPUNIT_API emacsTestResult : public TestResult
2503 +/* ,public TestResultCollector*/
2505 + GetOpt & m_aOptions;
2506 + // OptionHelper m_aOptionHelper;
2507 + TestResultCollector m_aResulter;
2509 + public:
2510 + emacsTestResult(GetOpt & _aOptions);
2512 + // virtual void addFailure( const TestFailure &failure );
2513 + // virtual void startTest( Test *test );
2514 + // virtual void endTest( Test *test );
2516 + virtual void print( Outputter &stream );
2518 + protected:
2519 + virtual void printHeader( Outputter &stream );
2520 + // virtual void printTestLine( Outputter &stream, Test* pTest, std::string const& _sNodeName, std::string const& _sInfo);
2521 + virtual void printFailureLine( Outputter &stream, TestFailure* pFailure, std::string const& _sNodeName );
2522 + };
2524 +/** insertion operator for easy output */
2525 +// std::ostream &operator <<( std::ostream &stream,
2526 +// emacsTestResult &result );
2528 +} // namespace CppUnit
2530 +#endif // CPPUNIT_testshlTESTRESULT_H
2533 Nur in misc/build/cppunit-1.8.0/include/cppunit/result: emacsTestResult.hxx.dummy.
2534 --- misc/cppunit-1.8.0/include/cppunit/result/log.hxx 2008-12-10 20:46:07.004030154 +0100
2535 +++ misc/build/cppunit-1.8.0/include/cppunit/result/log.hxx 2008-07-14 07:25:14.000000000 +0200
2536 @@ -1 +1,106 @@
2537 -dummy
2538 +/*************************************************************************
2540 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2542 + * Copyright 2008 by Sun Microsystems, Inc.
2544 + * OpenOffice.org - a multi-platform office productivity suite
2546 + * $RCSfile$
2547 + * $Revision$
2549 + * This file is part of OpenOffice.org.
2551 + * OpenOffice.org is free software: you can redistribute it and/or modify
2552 + * it under the terms of the GNU Lesser General Public License version 3
2553 + * only, as published by the Free Software Foundation.
2555 + * OpenOffice.org is distributed in the hope that it will be useful,
2556 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2557 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2558 + * GNU Lesser General Public License version 3 for more details
2559 + * (a copy is included in the LICENSE file that accompanied this code).
2561 + * You should have received a copy of the GNU Lesser General Public License
2562 + * version 3 along with OpenOffice.org. If not, see
2563 + * <http://www.openoffice.org/license.html>
2564 + * for a copy of the LGPLv3 License.
2566 + ************************************************************************/
2567 +#ifndef __QADEV_REGSCAN_LOG_HXX__
2568 +#define __QADEV_REGSCAN_LOG_HXX__
2570 +#include <time.h>
2571 +#include <rtl/ustring.hxx>
2572 +#include <rtl/strbuf.hxx>
2573 +#include <sal/types.h>
2574 +#include <osl/thread.h>
2575 +#include <osl/file.hxx>
2577 +#include <cppunit/nocopy.hxx>
2579 +//!io #include <iostream>
2580 +#include <vector>
2582 +// using namespace std;
2585 +/**
2586 + * Log derives the interface of the ::osl::File class ( is-a relation ).
2587 + * Its members (has-a relation) are the (full qualified)name of the log
2588 + * and an OStringBuffer which represents the content of the logfile.
2589 + * It provides the functionality of easy-to-use open and write logs
2590 + */
2591 +//: Log
2592 +class Log : NOCOPY {
2594 + ::osl::File* m_logfile; // fileobject
2595 + rtl::OUString m_logurl; // url of log
2596 + rtl::OStringBuffer m_buf; // content of log
2598 + Log();
2600 +public:
2602 + //> c'tor
2603 + /**
2604 + * constructors argument is a full qualified UNC path
2605 + * @param OUString logfile ( full qualified UNC path )
2606 + */
2607 + Log( const rtl::OUString& logURL )
2608 + : m_logfile( new ::osl::File( logURL ))
2609 + , m_logurl(logURL)
2610 + {} ///< c'tor
2612 + //> d'tor
2613 + virtual ~Log()
2615 + m_logfile->close();
2616 + delete( m_logfile );
2617 + } ///< d'tor
2619 + //> inline methods
2620 + // returns a reference to name instance
2621 + inline rtl::OUString getLogURL() { return m_logurl; }
2622 + inline rtl::OString getName() { return rtl::OUStringToOString(
2623 + m_logurl, RTL_TEXTENCODING_ASCII_US ); }
2624 + ///< inline methods
2626 + // open logfile for overwrite (default) or append
2627 + ::osl::FileBase::RC open( sal_Bool append = sal_False );
2628 + ::osl::FileBase::RC close() { return m_logfile->close(); }
2631 + // write methods without (default) or with echo on display
2632 + ::osl::FileBase::RC write( const sal_Char* buf, sal_Bool v = sal_False );
2633 + ::osl::FileBase::RC write( const rtl::OString& buf,
2634 + sal_Bool v = sal_False );
2635 + //! ::osl::FileBase::RC write( rtl::OStringBuffer& buf,
2636 + //! sal_Bool v = sal_False );
2637 + ::osl::FileBase::RC write( const rtl::OUString& buf,
2638 + rtl_TextEncoding enc = RTL_TEXTENCODING_ASCII_US,
2639 + sal_Bool v = sal_False );
2641 +}; ///:~ Log
2643 +#endif
2644 Nur in misc/build/cppunit-1.8.0/include/cppunit/result: log.hxx.dummy.
2645 --- misc/cppunit-1.8.0/include/cppunit/result/optionhelper.hxx 2008-12-10 20:46:07.084399993 +0100
2646 +++ misc/build/cppunit-1.8.0/include/cppunit/result/optionhelper.hxx 2008-12-10 20:42:43.000000000 +0100
2647 @@ -1 +1,98 @@
2648 -dummy
2649 +/*************************************************************************
2651 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2653 + * Copyright 2008 by Sun Microsystems, Inc.
2655 + * OpenOffice.org - a multi-platform office productivity suite
2657 + * $RCSfile$
2658 + * $Revision$
2660 + * This file is part of OpenOffice.org.
2662 + * OpenOffice.org is free software: you can redistribute it and/or modify
2663 + * it under the terms of the GNU Lesser General Public License version 3
2664 + * only, as published by the Free Software Foundation.
2666 + * OpenOffice.org is distributed in the hope that it will be useful,
2667 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2668 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2669 + * GNU Lesser General Public License version 3 for more details
2670 + * (a copy is included in the LICENSE file that accompanied this code).
2672 + * You should have received a copy of the GNU Lesser General Public License
2673 + * version 3 along with OpenOffice.org. If not, see
2674 + * <http://www.openoffice.org/license.html>
2675 + * for a copy of the LGPLv3 License.
2677 + ************************************************************************/
2679 +#ifndef optionhelper_hxx
2680 +#define optionhelper_hxx
2682 +#include <string>
2684 +#include <sal/types.h>
2686 +#include "cppunit/nocopy.hxx"
2687 +#include "testshl/getopt.hxx"
2688 +#include "cppunit/joblist.hxx"
2690 +// -----------------------------------------------------------------------------
2692 +typedef std::vector<rtl::OString> OStringList;
2694 +//!? Better: OptionHelper
2695 +class OptionHelper : NOCOPY
2697 + GetOpt & m_aOption;
2698 + JobList m_aJobOnlyList;
2699 + JobList m_aJobExcludeList;
2700 + OStringList m_aJobFilter;
2702 + std::string m_sProjectId;
2703 + std::string m_sBuildId;
2705 + std::string getProjectId() const;
2706 + std::string getBuildId() const;
2707 + std::string createDateTag(std::string const& _sProjectId, std::string const& _sBuildId);
2709 + void handleJobs();
2710 +public:
2711 + OptionHelper(GetOpt & _aOption)
2712 + :m_aOption(_aOption)
2714 + if (m_aOption.hasOpt("-projectid"))
2715 + m_sProjectId = m_aOption.getOpt("-projectid");
2717 + if (m_aOption.hasOpt("-buildid"))
2718 + m_sBuildId = m_aOption.getOpt("-buildid");
2720 + handleJobs();
2723 + static std::string integerToAscii(sal_Int32 nValue);
2724 + static std::string twoDigits(std::string const& _sValue);
2726 + std::string createDateTag();
2727 + bool showErrors();
2728 + bool showTests();
2730 + JobList getJobOnlyList() {return m_aJobOnlyList;}
2731 + JobList getJobExcludeList() {return m_aJobExcludeList;}
2733 + bool isAllowedToExecute(std::string const& _sNode, std::string const& _sName);
2735 + bool isOnlyShowJobs() {return m_aOption.hasOpt("-onlyshowjobs") == sal_True ? true : false;}
2736 + GetOpt& getOptions() {return m_aOption;}
2737 + bool isVerbose() {return m_aOption.hasOpt("-verbose") == sal_True ? true : false;}
2738 + bool isOptionWhereAmI() {return m_aOption.hasOpt("-whereami") == sal_True ? true : false;}
2741 +// -----------------------------------------------------------------------------
2744 +#endif
2747 Nur in misc/build/cppunit-1.8.0/include/cppunit/result: optionhelper.hxx.dummy.
2748 --- misc/cppunit-1.8.0/include/cppunit/result/outputter.hxx 2008-12-10 20:46:07.186579135 +0100
2749 +++ misc/build/cppunit-1.8.0/include/cppunit/result/outputter.hxx 2008-12-10 20:42:43.000000000 +0100
2750 @@ -1 +1,85 @@
2751 -dummy
2752 +/*************************************************************************
2754 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2756 + * Copyright 2008 by Sun Microsystems, Inc.
2758 + * OpenOffice.org - a multi-platform office productivity suite
2760 + * $RCSfile$
2761 + * $Revision$
2763 + * This file is part of OpenOffice.org.
2765 + * OpenOffice.org is free software: you can redistribute it and/or modify
2766 + * it under the terms of the GNU Lesser General Public License version 3
2767 + * only, as published by the Free Software Foundation.
2769 + * OpenOffice.org is distributed in the hope that it will be useful,
2770 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2771 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2772 + * GNU Lesser General Public License version 3 for more details
2773 + * (a copy is included in the LICENSE file that accompanied this code).
2775 + * You should have received a copy of the GNU Lesser General Public License
2776 + * version 3 along with OpenOffice.org. If not, see
2777 + * <http://www.openoffice.org/license.html>
2778 + * for a copy of the LGPLv3 License.
2780 + ************************************************************************/
2784 +#ifndef outputter_hxx
2785 +#define outputter_hxx
2787 +#include <string>
2788 +#include <ostream>
2789 +#include <memory>
2790 +#include "testshl/log.hxx"
2791 +#include <sal/types.h>
2792 +#include "cppunit/nocopy.hxx"
2794 +// #include <fstream>
2796 +class Outputter : NOCOPY
2798 + std::auto_ptr<Log> m_pLog;
2799 + std::ostream* m_pStream;
2801 + void writeToAll(const sal_Char* _pStr);
2802 +public:
2803 + class endl
2805 + char c;
2806 + public:
2807 + endl():c('\0'){}
2808 + };
2809 +public:
2810 + Outputter(Log * _pLog )
2811 + :m_pLog(_pLog),
2812 + m_pStream(NULL) {}
2814 + Outputter(std::ostream& _aStream)
2815 + :m_pLog(NULL),
2816 + m_pStream(&_aStream) {}
2818 + ~Outputter();
2820 + void write(const sal_Char*);
2821 + void write(std::string const&);
2822 + void write(sal_Int32);
2823 + // void write(double);
2826 +Outputter& operator <<( Outputter &stream, const sal_Char* );
2827 +Outputter& operator <<( Outputter &stream, std::string const& );
2828 +Outputter& operator <<( Outputter &stream, sal_Int32 );
2829 +// Outputter& operator <<( Outputter &stream, double );
2831 +Outputter& operator <<( Outputter &stream, Outputter::endl const&);
2833 +// Outputter& operator <<( Outputter &stream, const char* );
2835 +#endif
2837 Nur in misc/build/cppunit-1.8.0/include/cppunit/result: outputter.hxx.dummy.
2838 --- misc/cppunit-1.8.0/include/cppunit/result/testshlTestResult.h 2008-12-10 20:46:07.267386761 +0100
2839 +++ misc/build/cppunit-1.8.0/include/cppunit/result/testshlTestResult.h 2008-12-10 20:42:43.000000000 +0100
2840 @@ -1 +1,72 @@
2841 -dummy
2842 +#ifndef cppunit_testshltestresult_h
2843 +#define cppunit_testshltestresult_h
2845 +#include <map>
2846 +#include <cppunit/result/TestResult.h>
2847 +#include <cppunit/result/TestResultCollector.h>
2848 +#include <ostream>
2849 +#include "testshl/getopt.hxx"
2851 +class Outputter;
2853 +namespace CppUnit {
2855 +class SourceLine;
2856 +class Exception;
2857 +class Test;
2859 +struct ltstr
2861 + bool operator()(const CppUnit::Test* p1, const CppUnit::Test* p2) const
2863 + return p1 < p2;
2866 +typedef std::map<CppUnit::Test*, bool, ltstr> TestPtrList;
2869 +/*! \brief Holds printable test result (DEPRECATED).
2870 + * \ingroup TrackingTestExecution
2871 + *
2872 + * deprecated Use class TextTestProgressListener and TextOutputter instead.
2873 + */
2874 + class CPPUNIT_API testshlTestResult : public TestResult
2876 +/* ,public TestResultCollector*/
2878 + GetOpt & m_aOptions;
2879 + // OptionHelper m_aOptionHelper;
2880 + TestResultCollector m_aResulter;
2882 + public:
2883 + testshlTestResult(GetOpt & _aOptions);
2884 + virtual ~testshlTestResult();
2886 + // virtual void addFailure( const TestFailure &failure );
2887 + // virtual void startTest( Test *test );
2888 + // virtual void endTest( Test *test );
2890 + virtual void print( Outputter &stream );
2892 + protected:
2893 + virtual void printHeader( Outputter &stream );
2895 + void printLines(Outputter &stream, HashMap & _aJobList);
2896 + void printFailedTests(Outputter &stream, TestPtrList &aFailedTests);
2897 + void printTestLines(Outputter &stream, TestPtrList &aFailedTests);
2898 + void printUnknownLines(Outputter &stream, HashMap & _aJobList);
2900 + virtual void printTestLine( Outputter &stream, Test* pTest, std::string const& _sNodeName, std::string const& _sInfo);
2901 + virtual void printFailureLine( Outputter &stream, TestFailure* pFailure, std::string const& _sNodeName );
2902 + virtual void printUnknownLine( Outputter &stream, std::string const& _sTestName);
2903 + };
2905 +/** insertion operator for easy output */
2906 + Outputter &operator <<( Outputter &stream,
2907 + testshlTestResult &result );
2909 +} // namespace CppUnit
2911 +#endif // CPPUNIT_testshlTESTRESULT_H
2914 Nur in misc/build/cppunit-1.8.0/include/cppunit/result: testshlTestResult.h.dummy.
2915 --- misc/cppunit-1.8.0/include/cppunit/signaltest.h 2008-12-10 20:46:07.349658445 +0100
2916 +++ misc/build/cppunit-1.8.0/include/cppunit/signaltest.h 2008-07-14 07:25:14.000000000 +0200
2917 @@ -1 +1,65 @@
2918 -dummy
2919 +/*************************************************************************
2921 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2923 + * Copyright 2008 by Sun Microsystems, Inc.
2925 + * OpenOffice.org - a multi-platform office productivity suite
2927 + * $RCSfile$
2928 + * $Revision$
2930 + * This file is part of OpenOffice.org.
2932 + * OpenOffice.org is free software: you can redistribute it and/or modify
2933 + * it under the terms of the GNU Lesser General Public License version 3
2934 + * only, as published by the Free Software Foundation.
2936 + * OpenOffice.org is distributed in the hope that it will be useful,
2937 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
2938 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2939 + * GNU Lesser General Public License version 3 for more details
2940 + * (a copy is included in the LICENSE file that accompanied this code).
2942 + * You should have received a copy of the GNU Lesser General Public License
2943 + * version 3 along with OpenOffice.org. If not, see
2944 + * <http://www.openoffice.org/license.html>
2945 + * for a copy of the LGPLv3 License.
2947 + ************************************************************************/
2949 +#ifndef SIGNALTEST_H
2950 +#define SIGNALTEST_H
2952 +#include <string>
2953 +#include "cppunit/Test.h"
2954 +#include <cppunit/autoregister/htestresult.h>
2956 +namespace CppUnit
2959 +class CPPUNIT_API SignalTest : public Test
2961 +public:
2963 + SignalTest( std::string const& Name );
2965 + ~SignalTest();
2967 + virtual void run(hTestResult pResult);
2968 + virtual int countTestCases() const;
2969 + std::string getName() const;
2970 + std::string toString() const;
2972 +private:
2973 + SignalTest( const SignalTest &other );
2974 + SignalTest &operator=( const SignalTest &other );
2976 +private:
2977 + const std::string m_sName;
2980 +} // namespace CppUnit
2983 +#endif
2984 Nur in misc/build/cppunit-1.8.0/include/cppunit: signaltest.h.dummy.
2985 --- misc/cppunit-1.8.0/include/cppunit/simpleheader.hxx 2008-12-10 20:46:07.425092111 +0100
2986 +++ misc/build/cppunit-1.8.0/include/cppunit/simpleheader.hxx 2008-07-14 07:25:14.000000000 +0200
2987 @@ -1 +1,45 @@
2988 -dummy
2989 +/*************************************************************************
2991 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2993 + * Copyright 2008 by Sun Microsystems, Inc.
2995 + * OpenOffice.org - a multi-platform office productivity suite
2997 + * $RCSfile$
2998 + * $Revision$
3000 + * This file is part of OpenOffice.org.
3002 + * OpenOffice.org is free software: you can redistribute it and/or modify
3003 + * it under the terms of the GNU Lesser General Public License version 3
3004 + * only, as published by the Free Software Foundation.
3006 + * OpenOffice.org is distributed in the hope that it will be useful,
3007 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3008 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3009 + * GNU Lesser General Public License version 3 for more details
3010 + * (a copy is included in the LICENSE file that accompanied this code).
3012 + * You should have received a copy of the GNU Lesser General Public License
3013 + * version 3 along with OpenOffice.org. If not, see
3014 + * <http://www.openoffice.org/license.html>
3015 + * for a copy of the LGPLv3 License.
3017 + ************************************************************************/
3019 +#ifndef CPPUNIT_SIMPLEHEADER_HXX
3020 +#define CPPUNIT_SIMPLEHEADER_HXX
3022 +// This file contains only the cppunit header files, for simplification.
3024 +#include <cppunit/TestFixture.h>
3025 +#include <cppunit/TestCaller.h>
3026 +#include <cppunit/TestSuite.h>
3027 +#include <cppunit/TestAssert.h>
3028 +#include <cppunit/autoregister/registertestfunction.h>
3029 +#include <cppunit/extensions/HelperMacros.h>
3030 +#include <cppunit/additionalfunc.hxx>
3031 +#include <cppunit/cmdlinebits.hxx>
3033 +#endif
3034 Nur in misc/build/cppunit-1.8.0/include/cppunit: simpleheader.hxx.dummy.
3035 --- misc/cppunit-1.8.0/include/cppunit/stringhelper.hxx 2008-12-10 20:46:07.500255274 +0100
3036 +++ misc/build/cppunit-1.8.0/include/cppunit/stringhelper.hxx 2008-07-14 07:25:14.000000000 +0200
3037 @@ -1 +1,42 @@
3038 -dummy
3039 +/*************************************************************************
3041 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3043 + * Copyright 2008 by Sun Microsystems, Inc.
3045 + * OpenOffice.org - a multi-platform office productivity suite
3047 + * $RCSfile$
3048 + * $Revision$
3050 + * This file is part of OpenOffice.org.
3052 + * OpenOffice.org is free software: you can redistribute it and/or modify
3053 + * it under the terms of the GNU Lesser General Public License version 3
3054 + * only, as published by the Free Software Foundation.
3056 + * OpenOffice.org is distributed in the hope that it will be useful,
3057 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3058 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3059 + * GNU Lesser General Public License version 3 for more details
3060 + * (a copy is included in the LICENSE file that accompanied this code).
3062 + * You should have received a copy of the GNU Lesser General Public License
3063 + * version 3 along with OpenOffice.org. If not, see
3064 + * <http://www.openoffice.org/license.html>
3065 + * for a copy of the LGPLv3 License.
3067 + ************************************************************************/
3069 +#ifndef STRINGHELPER_HXX
3070 +#define STRINGHELPER_HXX
3072 +#include <rtl/ustring.hxx>
3073 +#include <rtl/string.hxx>
3075 +inline void operator <<= (rtl::OString& _rAsciiString, const rtl::OUString& _rUnicodeString)
3077 + _rAsciiString = rtl::OUStringToOString(_rUnicodeString,RTL_TEXTENCODING_ASCII_US);
3080 +#endif
3081 Nur in misc/build/cppunit-1.8.0/include/cppunit: stringhelper.hxx.dummy.
3082 --- misc/cppunit-1.8.0/include/cppunit/taghelper.hxx 2008-12-10 20:46:07.588895546 +0100
3083 +++ misc/build/cppunit-1.8.0/include/cppunit/taghelper.hxx 2008-07-14 07:25:14.000000000 +0200
3084 @@ -1 +1,91 @@
3085 -dummy
3086 +/*************************************************************************
3088 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3090 + * Copyright 2008 by Sun Microsystems, Inc.
3092 + * OpenOffice.org - a multi-platform office productivity suite
3094 + * $RCSfile$
3095 + * $Revision$
3097 + * This file is part of OpenOffice.org.
3099 + * OpenOffice.org is free software: you can redistribute it and/or modify
3100 + * it under the terms of the GNU Lesser General Public License version 3
3101 + * only, as published by the Free Software Foundation.
3103 + * OpenOffice.org is distributed in the hope that it will be useful,
3104 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3105 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3106 + * GNU Lesser General Public License version 3 for more details
3107 + * (a copy is included in the LICENSE file that accompanied this code).
3109 + * You should have received a copy of the GNU Lesser General Public License
3110 + * version 3 along with OpenOffice.org. If not, see
3111 + * <http://www.openoffice.org/license.html>
3112 + * for a copy of the LGPLv3 License.
3114 + ************************************************************************/
3116 +#ifndef TAGHELPER_HXX
3117 +#define TAGHELPER_HXX
3119 +#include <map>
3120 +#include <sal/types.h>
3121 +#include <cppunit/nocopy.hxx>
3123 +/* Tags are a general mechanism of extensible data arrays for parameter
3124 + * specification and property inquiry. In practice, tags are used in arrays,
3125 + * or chain of arrays.
3127 + */
3129 +typedef sal_IntPtr Tag;
3130 +typedef sal_IntPtr TagData;
3132 +//# struct TagItem
3133 +//# {
3134 +//# Tag ti_Tag; /* identifies the type of data */
3135 +//# TagData ti_Data; /* type-specific data */
3136 +//# };
3138 +/* constants for Tag.ti_Tag, control tag values */
3139 +#define TAG_DONE (Tag(0L)) /* terminates array of TagItems. ti_Data unused */
3140 +#define TAG_END (Tag(0L)) /* synonym for TAG_DONE */
3141 +#define TAG_IGNORE (Tag(1L)) /* ignore this item, not end of array */
3142 +#define TAG_MORE (Tag(2L)) /* ti_Data is pointer to another array of TagItems
3143 + * note that this tag terminates the current array
3144 + */
3145 +#define TAG_SKIP (Tag(3L)) /* skip this and the next ti_Data items */
3147 +/* differentiates user tags from control tags */
3148 +#define TAG_USER (Tag(1L<<31))
3150 +// -----------------------------------------------------------------------------
3151 +class TagHelper /* : NOCOPY */
3153 + typedef std::map<Tag, TagData> TagItems;
3154 + TagItems m_aTagItems;
3156 +public:
3157 + TagHelper(){}
3158 + void insert(Tag _nTag, TagData _nData)
3160 + m_aTagItems[_nTag] = _nData;
3162 + // const TagItems& get() const { return m_aTagItems; }
3164 + TagData GetTagData(Tag _aTagValue, TagData _aDefaultValue = 0 /* NULL */) const
3166 + TagItems::const_iterator it = m_aTagItems.find(_aTagValue);
3167 + if (it != m_aTagItems.end())
3168 + return (*it).second;
3169 + else
3170 + return _aDefaultValue;
3174 +#endif
3177 Nur in misc/build/cppunit-1.8.0/include/cppunit: taghelper.hxx.dummy.
3178 --- misc/cppunit-1.8.0/include/cppunit/tagvalues.hxx 2008-12-10 20:46:07.672788513 +0100
3179 +++ misc/build/cppunit-1.8.0/include/cppunit/tagvalues.hxx 2008-07-14 07:25:14.000000000 +0200
3180 @@ -1 +1,81 @@
3181 -dummy
3182 +/*************************************************************************
3184 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3186 + * Copyright 2008 by Sun Microsystems, Inc.
3188 + * OpenOffice.org - a multi-platform office productivity suite
3190 + * $RCSfile$
3191 + * $Revision$
3193 + * This file is part of OpenOffice.org.
3195 + * OpenOffice.org is free software: you can redistribute it and/or modify
3196 + * it under the terms of the GNU Lesser General Public License version 3
3197 + * only, as published by the Free Software Foundation.
3199 + * OpenOffice.org is distributed in the hope that it will be useful,
3200 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3201 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3202 + * GNU Lesser General Public License version 3 for more details
3203 + * (a copy is included in the LICENSE file that accompanied this code).
3205 + * You should have received a copy of the GNU Lesser General Public License
3206 + * version 3 along with OpenOffice.org. If not, see
3207 + * <http://www.openoffice.org/license.html>
3208 + * for a copy of the LGPLv3 License.
3210 + ************************************************************************/
3212 +#ifndef TAGVALUES_H
3213 +#define TAGVALUES_H
3215 +#include <cppunit/taghelper.hxx>
3217 +#define TAG_TYPE (Tag(TAG_USER | (0x01L)))
3219 +#define TAG_RESULT (TAG_USER | 0x100)
3221 +#define RESULT_START (Tag(TAG_RESULT | (0x02L)))
3222 +#define TAG_RESULT_PTR (Tag(TAG_RESULT | (0x03L)))
3223 +#define TAG_TEST_PTR (Tag(TAG_RESULT | (0x04L)))
3225 +#define RESULT_END (Tag(TAG_RESULT | (0x05L)))
3227 +#define RESULT_ADD_FAILURE (Tag(TAG_RESULT | (0x06L)))
3228 +#define RESULT_ADD_ERROR (Tag(TAG_RESULT | (0x07L)))
3230 +#define TAG_EXCEPTION (Tag(TAG_RESULT | (0x08L)))
3232 +#define RESULT_ADD_INFO (Tag(TAG_RESULT | (0x09L)))
3233 +#define TAG_INFO (Tag(TAG_RESULT | (0x0aL)))
3235 +#define RESULT_ENTER_NODE (Tag(TAG_RESULT | (0x0bL)))
3236 +#define RESULT_LEAVE_NODE (Tag(TAG_RESULT | (0x0cL)))
3237 +#define TAG_NODENAME (Tag(TAG_RESULT | (0x0dL)))
3239 +#define RESULT_SHOULD_STOP (Tag(TAG_RESULT | (0x0eL)))
3242 +#define TAG_SIGNAL (TAG_USER | 0x200)
3243 +// #define SIGNAL_CHECK (Tag(TAG_SIGNAL | (0x01L)))
3244 +// #define INIT_SIGNAL_HANDLING (Tag(TAG_SIGNAL | (0x04L)))
3245 +// #define RELEASE_SIGNAL_HANDLING (Tag(TAG_SIGNAL | (0x05L)))
3247 +#define SIGNAL_START_TEST (Tag(TAG_SIGNAL | (0x06L)))
3248 +#define SIGNAL_END_TEST (Tag(TAG_SIGNAL | (0x07L)))
3250 +#define TAG_EXECUTION (TAG_USER | 0x400)
3251 +#define EXECUTION_CHECK (Tag(TAG_EXECUTION | (0x01)))
3252 +#define INIT_TEST (Tag(TAG_EXECUTION | (0x02)))
3253 +#define RELEASE_TEST (Tag(TAG_EXECUTION | (0x03)))
3254 +// #define EXECUTION_PUSH_NAME (Tag(TAG_EXECUTION | (0x04)))
3255 +// #define EXECUTION_POP_NAME (Tag(TAG_EXECUTION | (0x05)))
3257 +#define DO_NOT_EXECUTE 666
3258 +#define GO_EXECUTE 1
3260 +typedef sal_Int32 ReturnValue;
3262 +#endif
3263 Nur in misc/build/cppunit-1.8.0/include/cppunit: tagvalues.hxx.dummy.
3264 --- misc/cppunit-1.8.0/include/makefile.mk 2008-12-10 20:46:08.530624271 +0100
3265 +++ misc/build/cppunit-1.8.0/include/makefile.mk 2008-07-14 07:25:14.000000000 +0200
3266 @@ -1 +1,52 @@
3267 -dummy
3268 +#*************************************************************************
3270 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3272 +# Copyright 2008 by Sun Microsystems, Inc.
3274 +# OpenOffice.org - a multi-platform office productivity suite
3276 +# $RCSfile$
3278 +# $Revision$
3280 +# This file is part of OpenOffice.org.
3282 +# OpenOffice.org is free software: you can redistribute it and/or modify
3283 +# it under the terms of the GNU Lesser General Public License version 3
3284 +# only, as published by the Free Software Foundation.
3286 +# OpenOffice.org is distributed in the hope that it will be useful,
3287 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
3288 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3289 +# GNU Lesser General Public License version 3 for more details
3290 +# (a copy is included in the LICENSE file that accompanied this code).
3292 +# You should have received a copy of the GNU Lesser General Public License
3293 +# version 3 along with OpenOffice.org. If not, see
3294 +# <http://www.openoffice.org/license.html>
3295 +# for a copy of the LGPLv3 License.
3297 +#*************************************************************************
3298 +PRJ=..
3299 +# PRJINC=..
3301 +PRJNAME=cppunit
3302 +TARGET=inc
3304 +# --- Settings -----------------------------------------------------
3306 +.INCLUDE : settings.mk
3308 +# --- Files --------------------------------------------------------
3309 +# --- Targets -------------------------------------------------------
3311 +.INCLUDE : target.mk
3313 +.IF "$(ENABLE_PCH)"!=""
3314 +ALLTAR : \
3315 + $(SLO)$/precompiled.pch \
3316 + $(SLO)$/precompiled_ex.pch
3318 +.ENDIF # "$(ENABLE_PCH)"!=""
3320 Nur in misc/build/cppunit-1.8.0/include: makefile.mk.dummy.
3321 --- misc/cppunit-1.8.0/include/testshl/autoregisterhelper.hxx 2008-12-10 20:46:07.771638742 +0100
3322 +++ misc/build/cppunit-1.8.0/include/testshl/autoregisterhelper.hxx 2008-07-07 08:13:42.000000000 +0200
3323 @@ -1 +1,65 @@
3324 -dummy
3325 +/*************************************************************************
3327 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3329 + * Copyright 2008 by Sun Microsystems, Inc.
3331 + * OpenOffice.org - a multi-platform office productivity suite
3333 + * $RCSfile$
3334 + * $Revision$
3336 + * This file is part of OpenOffice.org.
3338 + * OpenOffice.org is free software: you can redistribute it and/or modify
3339 + * it under the terms of the GNU Lesser General Public License version 3
3340 + * only, as published by the Free Software Foundation.
3342 + * OpenOffice.org is distributed in the hope that it will be useful,
3343 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3344 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3345 + * GNU Lesser General Public License version 3 for more details
3346 + * (a copy is included in the LICENSE file that accompanied this code).
3348 + * You should have received a copy of the GNU Lesser General Public License
3349 + * version 3 along with OpenOffice.org. If not, see
3350 + * <http://www.openoffice.org/license.html>
3351 + * for a copy of the LGPLv3 License.
3353 + ************************************************************************/
3355 +#ifndef AUTOREGISTER_HXX
3356 +#define AUTOREGISTER_HXX
3358 +#include <vector>
3359 +#include <rtl/ustring.hxx>
3361 +#include <cppunit/autoregister/testfunc.h>
3363 +#include "dynamicregister.hxx"
3364 +#include "getopt.hxx"
3366 +typedef std::vector<FktPtr> FunctionList;
3368 +// -----------------------------------------------------------------------------
3369 +class JobList;
3370 +class AutomaticRegisterHelper : public DynamicLibraryHelper
3372 + FunctionList m_aFunctionList;
3373 + bool m_bLoadLibraryOK;
3374 + // GetOpt & m_aOptions; // use getOptions() instead!
3376 +public:
3377 + AutomaticRegisterHelper(rtl::OUString const& _sDLLName, GetOpt & _aOptions/* , JobList * _pJobList = NULL */ );
3379 + // FunctionList getFunctions(){return m_aFunctionList;}
3380 + void CallAll(hTestResult _hResult) const;
3382 + /// @return true, if the given DLLName library could load and initialised.
3383 + bool isOkToStartTests() const {return m_bLoadLibraryOK;}
3385 + virtual ~AutomaticRegisterHelper();
3388 +#endif
3390 Nur in misc/build/cppunit-1.8.0/include/testshl: autoregisterhelper.hxx.dummy.
3391 --- misc/cppunit-1.8.0/include/testshl/dynamicregister.hxx 2008-12-10 20:46:07.812458771 +0100
3392 +++ misc/build/cppunit-1.8.0/include/testshl/dynamicregister.hxx 2008-07-07 08:13:42.000000000 +0200
3393 @@ -1 +1,67 @@
3394 -dummy
3395 +/*************************************************************************
3397 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3398 + *
3399 + * Copyright 2008 by Sun Microsystems, Inc.
3401 + * OpenOffice.org - a multi-platform office productivity suite
3403 + * $RCSfile$
3404 + * $Revision$
3406 + * This file is part of OpenOffice.org.
3408 + * OpenOffice.org is free software: you can redistribute it and/or modify
3409 + * it under the terms of the GNU Lesser General Public License version 3
3410 + * only, as published by the Free Software Foundation.
3412 + * OpenOffice.org is distributed in the hope that it will be useful,
3413 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3414 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3415 + * GNU Lesser General Public License version 3 for more details
3416 + * (a copy is included in the LICENSE file that accompanied this code).
3418 + * You should have received a copy of the GNU Lesser General Public License
3419 + * version 3 along with OpenOffice.org. If not, see
3420 + * <http://www.openoffice.org/license.html>
3421 + * for a copy of the LGPLv3 License.
3423 + ************************************************************************/
3425 +#ifndef DYNAMICREGISTER_HXX
3426 +#define DYNAMICREGISTER_HXX
3428 +#include <rtl/ustring.hxx>
3429 +#include <osl/module.hxx>
3431 +#include "getopt.hxx"
3432 +#include "cppunit/nocopy.hxx"
3434 +// -------------------------------------------------
3436 +class DynamicLibraryHelper : NOCOPY
3438 +protected:
3439 + osl::Module* m_pModule;
3440 + rtl::OUString m_suDLLName;
3441 + GetOpt & m_aOptions;
3443 + GetOpt& getOptions() {return m_aOptions;}
3445 +public:
3446 + DynamicLibraryHelper(rtl::OUString const& _sDLLName, GetOpt & _aOptions);
3447 + virtual ~DynamicLibraryHelper();
3449 +private:
3450 + void showFilenameIfVerbose();
3451 + void realLoadLibrary(rtl::OUString const& _sLibToLoad);
3452 + void loadLibraryFromAbsolutePath();
3453 + void loadLibraryFromLocalPath();
3455 + rtl::OUString m_suAbsolutePathFile; // file:///D:/foo/bar/library.dll
3456 + rtl::OUString m_suAbsolutePath; // file:///D:/foo/bar
3457 + rtl::OUString m_suFilename; // library.dll
3460 +#endif
3462 Nur in misc/build/cppunit-1.8.0/include/testshl: dynamicregister.hxx.dummy.
3463 --- misc/cppunit-1.8.0/include/testshl/filehelper.hxx 2008-12-10 20:46:07.901872218 +0100
3464 +++ misc/build/cppunit-1.8.0/include/testshl/filehelper.hxx 2008-07-07 08:13:42.000000000 +0200
3465 @@ -1 +1,50 @@
3466 -dummy
3467 +/*************************************************************************
3469 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3471 + * Copyright 2008 by Sun Microsystems, Inc.
3473 + * OpenOffice.org - a multi-platform office productivity suite
3475 + * $RCSfile$
3476 + * $Revision$
3478 + * This file is part of OpenOffice.org.
3480 + * OpenOffice.org is free software: you can redistribute it and/or modify
3481 + * it under the terms of the GNU Lesser General Public License version 3
3482 + * only, as published by the Free Software Foundation.
3484 + * OpenOffice.org is distributed in the hope that it will be useful,
3485 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3486 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3487 + * GNU Lesser General Public License version 3 for more details
3488 + * (a copy is included in the LICENSE file that accompanied this code).
3490 + * You should have received a copy of the GNU Lesser General Public License
3491 + * version 3 along with OpenOffice.org. If not, see
3492 + * <http://www.openoffice.org/license.html>
3493 + * for a copy of the LGPLv3 License.
3495 + ************************************************************************/
3497 +#ifndef FILEHELPER_HXX
3498 +#define FILEHELPER_HXX
3500 +#include <string>
3501 +#include <rtl/ustring.hxx>
3502 +#include <rtl/string.hxx>
3503 +#include <cppunit/cmdlinebits.hxx>
3504 +#include "getopt.hxx"
3506 +namespace FileHelper
3509 + std::string getTempPath();
3510 + rtl::OUString convertPath( rtl::OUString const& _suSysPath );
3511 + rtl::OUString convertPath( rtl::OString const& sysPth );
3512 + CmdLineBits createFlags( GetOpt & _aOptions );
3515 +#endif
3517 Nur in misc/build/cppunit-1.8.0/include/testshl: filehelper.hxx.dummy.
3518 --- misc/cppunit-1.8.0/include/testshl/getopt.hxx 2008-12-10 20:46:07.985642414 +0100
3519 +++ misc/build/cppunit-1.8.0/include/testshl/getopt.hxx 2008-07-07 08:13:42.000000000 +0200
3520 @@ -1 +1,335 @@
3521 -dummy
3522 +/*************************************************************************
3524 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3526 + * Copyright 2008 by Sun Microsystems, Inc.
3528 + * OpenOffice.org - a multi-platform office productivity suite
3530 + * $RCSfile$
3531 + * $Revision$
3533 + * This file is part of OpenOffice.org.
3535 + * OpenOffice.org is free software: you can redistribute it and/or modify
3536 + * it under the terms of the GNU Lesser General Public License version 3
3537 + * only, as published by the Free Software Foundation.
3539 + * OpenOffice.org is distributed in the hope that it will be useful,
3540 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3541 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3542 + * GNU Lesser General Public License version 3 for more details
3543 + * (a copy is included in the LICENSE file that accompanied this code).
3545 + * You should have received a copy of the GNU Lesser General Public License
3546 + * version 3 along with OpenOffice.org. If not, see
3547 + * <http://www.openoffice.org/license.html>
3548 + * for a copy of the LGPLv3 License.
3550 + ************************************************************************/
3552 +/*************************************************************************
3553 +#* class GetOpt
3556 +#* Implementation getopt.cxx
3558 +#* Description: class to reflect the commandline options. In addition
3559 +#* it provides functinality to get options from an inifile
3560 +#* ( getIniOptions()), evaluate, test and get options
3561 +#* ( hasOpt(), getOpt() ) and display an usage screen
3562 +#* formated in dependance of the given optionset, as well
3563 +#* as display a status about activ options
3566 +#* further descriptions:
3568 +#* the constructor is called with two parameters:
3569 +#* char* argv[] and char* optionSet[],
3570 +#* the commandline and the available set of options.
3571 +#* Valid optionstrings have to start with a minus '-', otherwise it will
3572 +#* be ignored. Optionstrings consist of one or two arguments divided by a
3573 +#* comma separator, where the second (optional) argument is a short
3574 +#* description of the option, called hint. It will be automatically
3575 +#* formated and displayed in the usage screen if available.
3576 +#* The first argument of the optionstring can consist of two sections,
3577 +#* the name and the optional necessity and format.
3578 +#* The name of the option will be the starting minus followed by a string
3579 +#* like "-src".
3580 +#* One section options will be treated as flag (see '-v' option in example).
3581 +#* The second section consist of '=' or ':' which defines the necessity,
3582 +#* in combination with a character 's' for string or 'n' for numeric and
3583 +#* an optional '@' standing for 'vector of'.
3584 +#* '=' means this option needs an argument, ':' means can take an argument
3585 +#* followed by 's' is, as mentioned above, a single string paramenter,
3586 +#* followed by a 's' in combination with '@' means this argument consists
3587 +#* of one string or a vector of strings separated by commas
3589 +#* an example for an optionset:
3591 +#* static char* optionSet[] = {
3592 +#* "-src=s, release or version of sources",
3593 +#* "-ini=s, ini file with additional options",
3594 +#* "-db=s, path of type description database",
3595 +#* "-inPth=s, source path of component descriptions",
3596 +#* "-outPth=s, destination path for testcases",
3597 +#* "-logPth=s, destination path for logging",
3598 +#* "-mdl=s@, name(s) of module(s) to generate",
3599 +#* "-v, enable verbose screen messages",
3600 +#* "-dbg, enable debug messages",
3601 +#* "-h:s, display help or help on option",
3602 +#* "-help:s, see -h",
3603 +#* NULL
3604 +#* };
3606 +#* As seen a GetOpt class object will be created via:
3607 +#* GetOpt myOptions( argv, optionSet );
3609 +*************************************************************************/
3610 +#ifndef __QADEV_REGSCAN_GETOPT_HXX__
3611 +#define __QADEV_REGSCAN_GETOPT_HXX__
3613 +#include <osl/file.hxx>
3614 +#include <sal/types.h>
3615 +#include <rtl/strbuf.hxx>
3618 +#include <rtl/string.hxx>
3620 +// #ifndef __QADEV_REGSCAN_UTIL_HXX__
3621 +// #include "inc/util.hxx"
3622 +// #endif
3625 +#ifdef SOLARIS
3626 +#include <sys/time.h>
3627 +#endif
3629 +#include <iostream>
3630 +#include <hash_map>
3631 +// #include "rsexception.hxx"
3633 +// using namespace std;
3635 +struct gstr {
3636 + sal_Bool operator()( const rtl::OString& oStr1,
3637 + const rtl::OString& oStr2 ) const {
3638 + return( oStr1 == oStr2 );
3642 +struct ghstr
3644 + sal_uInt32 operator()( const rtl::OString& str ) const {
3645 + return str.hashCode();
3649 +struct frmt {
3650 + sal_uInt32 fCol;
3651 + sal_uInt32 sCol;
3652 + sal_uInt32 len;
3655 +typedef std::hash_map< rtl::OString, std::vector< rtl::OString >, ghstr, gstr >
3656 + optHashMap;
3658 +typedef frmt sFormat;
3659 +typedef sal_uInt16 optType;
3661 +#define OT_INVALID 0x0000
3662 +#define OT_BOOL 0x0001
3663 +#define OT_STRING 0x0002
3664 +#define OT_NUMBER 0x0004
3665 +#define OT_SINGLE 0x0010
3666 +#define OT_MULTI 0x0020
3667 +#define OT_OPTIONAL 0x0100
3669 +//: Option
3670 +class OptDsc {
3672 + rtl::OString m_name;
3673 + rtl::OString m_hint;
3674 + rtl::OString m_legend;
3675 + optType m_type;
3677 + /**
3678 + * analysis of optionstring and creation of option description class
3679 + * @param const rtl::OString& opt = optionstring to analyse
3680 + * @return void
3681 + */
3682 + void createOptDsc( const rtl::OString& opt );
3684 + /**
3685 + * splitting of an optionstring and creation of a tokenvector
3686 + * in dependance of a charset
3688 + * @param const rtl::OString& opt = optionstring to split
3689 + * @param const rtl::OString& cSet = delimiter charset
3690 + * @param vector< rtl::OString >& optLine = tokenvector to fill
3692 + * @return void
3693 + */
3694 + void split( const rtl::OString& opt, const rtl::OString& charSet,
3695 + std::vector< rtl::OString >& optLine );
3697 + /**
3698 + * private default c'tor, copy c'tor and assignment operator
3699 + * to get compiler errors on dumb effords
3700 + */
3701 + OptDsc();
3702 + OptDsc( OptDsc& );
3703 + OptDsc& operator = ( OptDsc& );
3705 +public:
3707 + //> c'tor
3708 + OptDsc( const rtl::OString& opt )
3709 + : m_name(),
3710 + m_hint(),
3711 + m_legend(),
3712 + m_type( 0 ) {
3714 + createOptDsc( opt );
3715 + } ///< c'tor
3717 + //> d'tor
3718 + ~OptDsc(){}
3720 + /**
3721 + * returns the name of this option
3722 + * @return rtl::OString&
3723 + */
3724 + inline rtl::OString& getName() { return m_name; }
3725 + /**
3726 + * returns the hint of this option
3727 + * @return rtl::OString&
3728 + */
3729 + inline rtl::OString& getHint() { return m_hint; }
3730 + /**
3731 + * returns the legend of this option
3732 + * @return rtl::OString&
3733 + */
3734 + inline rtl::OString& getLegend() { return m_legend; }
3736 + /**
3737 + * returns the type of this option
3738 + * @return optType
3739 + */
3740 + inline optType getType() { return m_type; }
3743 + inline sal_Bool isFlag() {
3744 + return( ( m_type &~ 0xfffe ) == OT_BOOL ) ? sal_True : sal_False;
3746 + inline sal_Bool isString() {
3747 + return( ( m_type &~ 0xfffd ) == OT_STRING ) ? sal_True : sal_False;
3749 + inline sal_Bool isNumber() {
3750 + return( ( m_type &~ 0xfffb ) == OT_NUMBER ) ? sal_True : sal_False;
3752 + inline sal_Bool isSingle() {
3753 + return( ( m_type &~ 0xffef ) == OT_SINGLE ) ? sal_True : sal_False;
3755 + inline sal_Bool isMulti() {
3756 + return( ( m_type &~ 0xffdf ) == OT_MULTI ) ? sal_True : sal_False;
3758 + inline sal_Bool isOptional() {
3759 + return( ( m_type &~ 0xfeff ) == OT_OPTIONAL ) ? sal_True : sal_False;
3762 +}; ///:~ Option
3764 +class Exception
3766 + rtl::OString m_sAsciiMessage;
3767 +public:
3768 + Exception();
3769 + virtual ~Exception(){}
3771 + Exception(char const* sAsciiMessage);
3772 + Exception(rtl::OString const& sAsciiMessage);
3774 + virtual rtl::OUString message() const;
3775 + virtual char const* what() const;
3778 +class ValueNotFoundException : public Exception
3780 +public:
3781 + ValueNotFoundException();
3782 + ValueNotFoundException(char const* sExit);
3785 +//: GetOpt
3786 +class GetOpt {
3788 + rtl::OString m_prgname;
3789 + rtl::OString m_vardelim;
3790 + std::vector< rtl::OString > m_cmdline;
3791 + std::vector< rtl::OString > m_param;
3792 + std::vector< rtl::OString > m_varvec;
3793 + std::vector< OptDsc* > m_optionset;
3794 + optHashMap m_opthash;
3796 + //> private methods
3797 + void initialize( char* cmdLine[], char const * optSet[] );
3798 + void createCmdLineOptions();
3799 + sal_uInt32 getMaxNameLength();
3800 + sal_uInt32 getMaxLegendLength();
3801 + const rtl::OString optDsc2Str( OptDsc* optDsc , sFormat frm );
3802 + void tokenize( const rtl::OString& opt, const rtl::OString& charSet,
3803 + std::vector< rtl::OString >& optLine, sal_Bool strip = sal_True );
3804 + ///< private methods
3806 + GetOpt();
3807 + GetOpt( GetOpt& );
3808 + GetOpt& operator = ( GetOpt& );
3810 +public:
3812 + //> c'tor
3813 + GetOpt( char* cmdLine[], char const * optSet[], rtl::OString varDelim =
3814 + rtl::OString( "$" ) )
3815 + : m_vardelim( varDelim ) {
3817 + initialize( cmdLine, optSet );
3818 + createCmdLineOptions();
3819 + } ///< c'tor
3821 + //> d'tor
3822 + ~GetOpt();
3823 + ///< d'tor
3825 + //> inline methods
3826 + inline std::vector< rtl::OString >* getCmdLine() { return &m_cmdline; }
3827 + inline optHashMap* getOptions() { return ( &m_opthash ); }
3828 + inline rtl::OString& getName() { return m_prgname; }
3829 + inline rtl::OString& getFirstParam() { return *(m_param.begin()); }
3830 + inline std::vector< rtl::OString >& getParams() { return m_param; }
3831 + rtl::OString& getOpt( const rtl::OString& opt );
3832 + void rmvOpt( rtl::OString& opt ) {
3833 + m_opthash.erase( opt );
3835 + inline std::vector< rtl::OString >& getOptVec( const rtl::OString& opt ) {
3836 + return m_opthash[ opt ];
3838 + ///< inline methods
3841 + sal_Bool exist( rtl::OString& opt );
3842 + sal_Bool hasParam( std::vector< rtl::OString >::iterator iter );
3843 + sal_Bool hasVars( void );
3844 + sal_Bool evaluateOpt( std::vector< rtl::OString >::iterator iter );
3845 + OptDsc* getOptDsc( rtl::OString& opt );
3846 + sal_Bool hasOpt( const rtl::OString& opt ) const;
3847 + ::osl::FileBase::RC getIniOptions( rtl::OString iniPth );
3848 + void createOpt( rtl::OString& optdsc );
3849 + void str2Opt( rtl::OString iOpts );
3850 + void addOpt( rtl::OString& opt, sal_Bool evaluate = sal_True );
3851 + void replVars( void );
3852 + void showUsage( void );
3853 + void printStatus( void );
3855 +}; ///:~ GetOpt
3856 +#endif
3857 Nur in misc/build/cppunit-1.8.0/include/testshl: getopt.hxx.dummy.
3858 --- misc/cppunit-1.8.0/include/testshl/log.hxx 2008-12-10 20:46:08.078572827 +0100
3859 +++ misc/build/cppunit-1.8.0/include/testshl/log.hxx 2008-07-07 08:13:42.000000000 +0200
3860 @@ -1 +1,116 @@
3861 -dummy
3862 +/*************************************************************************
3864 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3866 + * Copyright 2008 by Sun Microsystems, Inc.
3868 + * OpenOffice.org - a multi-platform office productivity suite
3870 + * $RCSfile$
3871 + * $Revision$
3873 + * This file is part of OpenOffice.org.
3875 + * OpenOffice.org is free software: you can redistribute it and/or modify
3876 + * it under the terms of the GNU Lesser General Public License version 3
3877 + * only, as published by the Free Software Foundation.
3879 + * OpenOffice.org is distributed in the hope that it will be useful,
3880 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3881 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3882 + * GNU Lesser General Public License version 3 for more details
3883 + * (a copy is included in the LICENSE file that accompanied this code).
3885 + * You should have received a copy of the GNU Lesser General Public License
3886 + * version 3 along with OpenOffice.org. If not, see
3887 + * <http://www.openoffice.org/license.html>
3888 + * for a copy of the LGPLv3 License.
3890 + *************************************************************************
3892 + Source Code Control System - Header
3894 + $Header$
3896 + Source Code Control System - Update
3898 +*************************************************************************/
3899 +#ifndef __QADEV_REGSCAN_LOG_HXX__
3900 +#define __QADEV_REGSCAN_LOG_HXX__
3902 +#include <time.h>
3903 +#include <rtl/ustring.hxx>
3904 +#include <rtl/strbuf.hxx>
3905 +#include <sal/types.h>
3906 +#include <osl/thread.h>
3907 +#include <osl/file.hxx>
3909 +//!io #include <iostream>
3910 +#include <vector>
3912 +// using namespace std;
3915 +/**
3916 + * Log derives the interface of the ::osl::File class ( is-a relation ).
3917 + * Its members (has-a relation) are the (full qualified)name of the log
3918 + * and an OStringBuffer which represents the content of the logfile.
3919 + * It provides the functionality of easy-to-use open and write logs
3920 + */
3921 +//: Log
3922 +class Log {
3924 + ::osl::File* m_logfile; // fileobject
3925 + rtl::OUString m_logurl; // url of log
3926 + rtl::OStringBuffer m_buf; // content of log
3928 + Log();
3930 +public:
3932 + //> c'tor
3933 + /**
3934 + * constructors argument is a full qualified UNC path
3935 + * @param OUString logfile ( full qualified UNC path )
3936 + */
3937 + Log( const rtl::OUString& logURL )
3938 + : m_logfile( new ::osl::File( logURL ))
3939 + , m_logurl(logURL)
3940 + {} ///< c'tor
3942 + //> d'tor
3943 + virtual ~Log() {
3944 + m_logfile->close();
3945 + delete( m_logfile );
3946 + } ///< d'tor
3948 + //> inline methods
3949 + // returns a reference to name instance
3950 + inline rtl::OUString getLogURL() { return m_logurl; }
3951 + inline rtl::OString getName() { return rtl::OUStringToOString(
3952 + m_logurl, RTL_TEXTENCODING_ASCII_US ); }
3953 + ///< inline methods
3955 + // open logfile for overwrite (default) or append
3956 + ::osl::FileBase::RC open( sal_Bool append = sal_False );
3957 + ::osl::FileBase::RC close() { return m_logfile->close(); }
3960 + // write methods without (default) or with echo on display
3961 + ::osl::FileBase::RC write( const sal_Char* buf, sal_Bool v = sal_False );
3962 + ::osl::FileBase::RC write( const rtl::OString& buf,
3963 + sal_Bool v = sal_False );
3964 + // ::osl::FileBase::RC write( rtl::OStringBuffer const& buf,
3965 + // sal_Bool v = sal_False );
3966 + ::osl::FileBase::RC write( const rtl::OUString& buf,
3967 + rtl_TextEncoding enc = RTL_TEXTENCODING_ASCII_US,
3968 + sal_Bool v = sal_False );
3970 +}; ///:~ Log
3972 +Log &operator <<( Log &_aLog, const sal_Char * _sValue );
3973 +Log &operator <<( Log &_aLog, rtl::OString const& _sValue );
3974 +Log &operator <<( Log &_aLog, rtl::OUString const& _sValue );
3975 +// Log &operator <<( Log &_aLog, rtl::OStringBuffer const& _sValue );
3977 +#endif
3978 Nur in misc/build/cppunit-1.8.0/include/testshl: log.hxx.dummy.
3979 --- misc/cppunit-1.8.0/include/testshl/tresstatewrapper.h 2008-12-10 20:46:08.171096366 +0100
3980 +++ misc/build/cppunit-1.8.0/include/testshl/tresstatewrapper.h 2008-07-07 08:13:42.000000000 +0200
3981 @@ -1 +1,66 @@
3982 -dummy
3983 +/*************************************************************************
3985 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3987 + * Copyright 2008 by Sun Microsystems, Inc.
3989 + * OpenOffice.org - a multi-platform office productivity suite
3991 + * $RCSfile$
3992 + * $Revision$
3994 + * This file is part of OpenOffice.org.
3996 + * OpenOffice.org is free software: you can redistribute it and/or modify
3997 + * it under the terms of the GNU Lesser General Public License version 3
3998 + * only, as published by the Free Software Foundation.
4000 + * OpenOffice.org is distributed in the hope that it will be useful,
4001 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4002 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4003 + * GNU Lesser General Public License version 3 for more details
4004 + * (a copy is included in the LICENSE file that accompanied this code).
4006 + * You should have received a copy of the GNU Lesser General Public License
4007 + * version 3 along with OpenOffice.org. If not, see
4008 + * <http://www.openoffice.org/license.html>
4009 + * for a copy of the LGPLv3 License.
4011 + ************************************************************************/
4013 +#ifndef TESTSTATEWRAPPER_H
4014 +#define TESTSTATEWRAPPER_H
4016 +#ifdef _RTL_TRES_H_
4017 +#error "This is old code, please remove the include of rtl/tres.h"
4018 +#endif
4020 +#include <sal/types.h>
4021 +#include "cppunit/autoregister/registertestfunction.h"
4023 +#ifdef __cplusplus
4024 +extern "C" {
4025 +#endif
4027 +// typedef void* hTestResult;
4028 +typedef hTestResult rtlTestResult;
4030 +// -----------------------------------------------------------------------------
4031 +void c_rtl_tres_state_start(hTestResult _aResult, const sal_Char* _pName);
4032 +void c_rtl_tres_state_end(hTestResult _aResult, const sal_Char* _pName);
4034 +// -----------------------------------------------------------------------------
4035 +// the old test state function, which here convert all values for using with the
4036 +// new testshl tool
4038 +sal_Bool SAL_CALL c_rtl_tres_state(
4039 + hTestResult pResult,
4040 + sal_Bool bSuccess,
4041 + char const * pTestMsg,
4042 + char const * pFuncName);
4044 +#ifdef __cplusplus
4046 +#endif
4048 +#endif
4049 Nur in misc/build/cppunit-1.8.0/include/testshl: tresstatewrapper.h.dummy.
4050 --- misc/cppunit-1.8.0/include/testshl/tresstatewrapper.hxx 2008-12-10 20:46:08.253163483 +0100
4051 +++ misc/build/cppunit-1.8.0/include/testshl/tresstatewrapper.hxx 2008-12-10 20:42:43.000000000 +0100
4052 @@ -1 +1,60 @@
4053 -dummy
4054 +/*************************************************************************
4056 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4058 + * Copyright 2008 by Sun Microsystems, Inc.
4060 + * OpenOffice.org - a multi-platform office productivity suite
4062 + * $RCSfile$
4063 + * $Revision$
4065 + * This file is part of OpenOffice.org.
4067 + * OpenOffice.org is free software: you can redistribute it and/or modify
4068 + * it under the terms of the GNU Lesser General Public License version 3
4069 + * only, as published by the Free Software Foundation.
4071 + * OpenOffice.org is distributed in the hope that it will be useful,
4072 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4073 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4074 + * GNU Lesser General Public License version 3 for more details
4075 + * (a copy is included in the LICENSE file that accompanied this code).
4077 + * You should have received a copy of the GNU Lesser General Public License
4078 + * version 3 along with OpenOffice.org. If not, see
4079 + * <http://www.openoffice.org/license.html>
4080 + * for a copy of the LGPLv3 License.
4082 + ************************************************************************/
4084 +#ifndef teststatewrapper_hxx
4085 +#define teststatewrapper_hxx
4087 +#include <cppunit/nocopy.hxx>
4088 +#include <sal/types.h>
4090 +#include <cppunit/simpleheader.hxx>
4091 +#include <cppunit/autoregister/callbackfunc_fktptr.h>
4093 +// This is a hack, because it's possible that the testshl directory doesn't exist.
4094 +#ifdef LOAD_TRESSTATEWRAPPER_LOCAL
4095 +#include "tresstatewrapper.h"
4096 +#else
4097 +#include <testshl/tresstatewrapper.h>
4098 +#endif
4100 +// -----------------------------------------------------------------------------
4101 +// helper class to mark the start off old test code
4102 +// the name is need in the test result generator
4103 +class rtl_tres_state_start : NOCOPY
4105 + const sal_Char* m_pName;
4106 + hTestResult m_aResult;
4107 +public:
4108 + rtl_tres_state_start(hTestResult _aResult, const sal_Char* _pName);
4109 + ~rtl_tres_state_start();
4112 +#endif
4114 Nur in misc/build/cppunit-1.8.0/include/testshl: tresstatewrapper.hxx.dummy.
4115 --- misc/cppunit-1.8.0/include/testshl/versionhelper.hxx 2008-12-10 20:46:08.329903269 +0100
4116 +++ misc/build/cppunit-1.8.0/include/testshl/versionhelper.hxx 2008-07-07 08:13:42.000000000 +0200
4117 @@ -1 +1,87 @@
4118 -dummy
4119 +/*************************************************************************
4121 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4123 + * Copyright 2008 by Sun Microsystems, Inc.
4125 + * OpenOffice.org - a multi-platform office productivity suite
4127 + * $RCSfile$
4128 + * $Revision$
4130 + * This file is part of OpenOffice.org.
4132 + * OpenOffice.org is free software: you can redistribute it and/or modify
4133 + * it under the terms of the GNU Lesser General Public License version 3
4134 + * only, as published by the Free Software Foundation.
4136 + * OpenOffice.org is distributed in the hope that it will be useful,
4137 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4138 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4139 + * GNU Lesser General Public License version 3 for more details
4140 + * (a copy is included in the LICENSE file that accompanied this code).
4142 + * You should have received a copy of the GNU Lesser General Public License
4143 + * version 3 along with OpenOffice.org. If not, see
4144 + * <http://www.openoffice.org/license.html>
4145 + * for a copy of the LGPLv3 License.
4147 + ************************************************************************/
4149 +#ifndef AUTOREGISTER_HXX
4150 +#define AUTOREGISTER_HXX
4152 +#include <stdio.h>
4153 +#include <vector>
4154 +#include <ostream>
4155 +#include <iostream>
4157 +#include <rtl/ustring.hxx>
4158 +#include <rtl/string.hxx>
4160 +#include "dynamicregister.hxx"
4162 +// -----------------------------------------------------------------------------
4163 +// ---------------------------------- Version ----------------------------------
4164 +// -----------------------------------------------------------------------------
4165 +// extern "C" const struct VersionInfo *GetVersionInfo();
4167 +// this is a Hack, but at the moment, no change to handle this behaviour better.
4168 +struct VersionInfo
4170 + const char* pTime;
4171 + const char* pDate;
4172 + const char* pUpd;
4173 + const char* pMinor;
4174 + const char* pBuild;
4175 + const char* pInpath;
4177 +typedef const struct VersionInfo* (*FktGetVersionInfoPtr)();
4179 +// -----------------------------------------------------------------------------
4180 +class VersionHelper : public DynamicLibraryHelper
4182 + const VersionInfo *m_pInfo;
4184 +public:
4185 + VersionHelper(rtl::OUString const& _sDLLName, GetOpt & _aOptions);
4186 +// void print(std::ostream& _aStream);
4187 + void printall(FILE*);
4189 + rtl::OString getTime() const;
4190 + rtl::OString getDate() const;
4191 + rtl::OString getUpd() const;
4192 + rtl::OString getMinor() const;
4193 + rtl::OString getBuild() const;
4194 + rtl::OString getInpath() const;
4196 + bool isOk() const;
4199 +/** insertion operator for easy output */
4200 +// std::ostream &operator <<( std::ostream &stream,
4201 +// VersionHelper &version );
4204 +#endif
4206 Nur in misc/build/cppunit-1.8.0/include/testshl: versionhelper.hxx.dummy.
4207 --- misc/cppunit-1.8.0/include/testshl/winstuff.hxx 2008-12-10 20:46:08.412541288 +0100
4208 +++ misc/build/cppunit-1.8.0/include/testshl/winstuff.hxx 2008-07-16 14:09:24.000000000 +0200
4209 @@ -1 +1,44 @@
4210 -dummy
4211 +/*************************************************************************
4213 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4214 + *
4215 + * Copyright 2008 by Sun Microsystems, Inc.
4217 + * OpenOffice.org - a multi-platform office productivity suite
4219 + * $RCSfile$
4221 + * $Revision$
4223 + * This file is part of OpenOffice.org.
4225 + * OpenOffice.org is free software: you can redistribute it and/or modify
4226 + * it under the terms of the GNU Lesser General Public License version 3
4227 + * only, as published by the Free Software Foundation.
4229 + * OpenOffice.org is distributed in the hope that it will be useful,
4230 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
4231 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4232 + * GNU Lesser General Public License version 3 for more details
4233 + * (a copy is included in the LICENSE file that accompanied this code).
4235 + * You should have received a copy of the GNU Lesser General Public License
4236 + * version 3 along with OpenOffice.org. If not, see
4237 + * <http://www.openoffice.org/license.html>
4238 + * for a copy of the LGPLv3 License.
4240 + ************************************************************************/
4242 +#ifndef WINSTUFF_HXX
4243 +#define WINSTUFF_HXX
4245 +#include <sal/types.h>
4247 +// Isolated into own compilation unit, to avoid interference with
4248 +// windows headers
4249 +void WinDebugBreak();
4250 +void WinSleep( sal_uInt32 sec );
4251 +sal_uInt32 WinGetCurrentProcessId();
4252 +void WinTerminateApp( sal_uInt32 dwPID, sal_uInt32 dwTimeout );
4254 +#endif
4255 Nur in misc/build/cppunit-1.8.0/include/testshl: winstuff.hxx.dummy.
4256 --- misc/cppunit-1.8.0/makefile.mk 2008-12-10 20:46:08.628149187 +0100
4257 +++ misc/build/cppunit-1.8.0/makefile.mk 2008-12-09 14:43:50.000000000 +0100
4258 @@ -1 +1,35 @@
4259 -dummy
4260 +#*************************************************************************
4262 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4264 +# Copyright 2008 by Sun Microsystems, Inc.
4266 +# OpenOffice.org - a multi-platform office productivity suite
4268 +# $RCSfile$
4270 +# $Revision$
4272 +# This file is part of OpenOffice.org.
4274 +# OpenOffice.org is free software: you can redistribute it and/or modify
4275 +# it under the terms of the GNU Lesser General Public License version 3
4276 +# only, as published by the Free Software Foundation.
4278 +# OpenOffice.org is distributed in the hope that it will be useful,
4279 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
4280 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4281 +# GNU Lesser General Public License version 3 for more details
4282 +# (a copy is included in the LICENSE file that accompanied this code).
4284 +# You should have received a copy of the GNU Lesser General Public License
4285 +# version 3 along with OpenOffice.org. If not, see
4286 +# <http://www.openoffice.org/license.html>
4287 +# for a copy of the LGPLv3 License.
4289 +#*************************************************************************
4291 +target:
4292 + cd src$/win32 && $(MAKE) $(MFLAGS) $(CALLMACROS)
4293 + cd src$/result && $(MAKE) $(MFLAGS) $(CALLMACROS)
4294 + cd src$/cppunit && $(MAKE) $(MFLAGS) $(CALLMACROS)
4295 Nur in misc/build/cppunit-1.8.0: makefile.mk.dummy.
4296 --- misc/cppunit-1.8.0/src/cppunit/Asserter.cpp 2002-03-27 20:04:02.000000000 +0100
4297 +++ misc/build/cppunit-1.8.0/src/cppunit/Asserter.cpp 2008-02-27 17:21:16.000000000 +0100
4298 @@ -1,52 +1,76 @@
4299 #include <cppunit/Asserter.h>
4300 #include <cppunit/NotEqualException.h>
4302 +#include <cppunit/stringhelper.hxx>
4304 namespace CppUnit
4309 namespace Asserter
4312 +void
4313 +fail( std::string const& message,
4314 + SourceLine const& sourceLine )
4316 + throw Exception( message, sourceLine );
4319 void
4320 -fail( std::string message,
4321 - SourceLine sourceLine )
4322 +failStub( std::string const& message,
4323 + SourceLine const& sourceLine )
4325 - throw Exception( message, sourceLine );
4326 + throw StubException( message, sourceLine );
4330 void
4331 failIf( bool shouldFail,
4332 - std::string message,
4333 - SourceLine location )
4334 + std::string const& message,
4335 + SourceLine const& location )
4337 if ( shouldFail )
4338 - fail( message, location );
4340 + fail( message, location );
4345 +// -----------------------------------------------------------------------------
4346 void
4347 -failNotEqual( std::string expected,
4348 - std::string actual,
4349 - SourceLine sourceLine,
4350 - std::string additionalMessage )
4351 +failIf( bool shouldFail,
4352 + rtl::OUString const& _suMessage,
4353 + SourceLine const& location )
4355 - throw NotEqualException( expected,
4356 - actual,
4357 - sourceLine,
4358 - additionalMessage );
4359 + if ( shouldFail )
4361 + rtl::OString sMessage;
4362 + sMessage <<= _suMessage;
4363 + std::string message;
4364 + message = sMessage.getStr();
4365 + fail( message, location );
4368 +// -----------------------------------------------------------------------------
4370 +void
4371 +failNotEqual( std::string const& expected,
4372 + std::string const& actual,
4373 + SourceLine const& sourceLine,
4374 + std::string const& additionalMessage )
4376 + throw NotEqualException( expected,
4377 + actual,
4378 + sourceLine,
4379 + additionalMessage );
4383 void
4384 failNotEqualIf( bool shouldFail,
4385 - std::string expected,
4386 - std::string actual,
4387 - SourceLine sourceLine,
4388 - std::string additionalMessage )
4389 + std::string const& expected,
4390 + std::string const& actual,
4391 + SourceLine const& sourceLine,
4392 + std::string const& additionalMessage )
4394 if ( shouldFail )
4395 failNotEqual( expected, actual, sourceLine, additionalMessage );
4396 --- misc/cppunit-1.8.0/src/cppunit/Exception.cpp 2001-10-19 20:37:24.000000000 +0200
4397 +++ misc/build/cppunit-1.8.0/src/cppunit/Exception.cpp 2008-02-27 17:21:46.000000000 +0100
4398 @@ -19,20 +19,19 @@
4400 /// Construct the exception
4401 Exception::Exception( const Exception &other ) :
4402 - std::exception( other )
4404 - m_message = other.m_message;
4405 - m_sourceLine = other.m_sourceLine;
4407 + std::exception( other ),
4408 + m_message( other.m_message),
4409 + m_sourceLine(other.m_sourceLine)
4414 * \deprecated Use other constructor instead.
4416 -Exception::Exception( std::string message,
4417 - SourceLine sourceLine ) :
4418 - m_message( message ),
4419 - m_sourceLine( sourceLine )
4420 +Exception::Exception( std::string const& _message,
4421 + SourceLine const& _sourceLine ) :
4422 + m_message( _message ),
4423 + m_sourceLine( _sourceLine )
4427 @@ -41,9 +40,9 @@
4429 * \deprecated Use other constructor instead.
4431 -Exception::Exception( std::string message,
4432 +Exception::Exception( std::string const& message,
4433 long lineNumber,
4434 - std::string fileName ) :
4435 + std::string const& fileName ) :
4436 m_message( message ),
4437 m_sourceLine( fileName, lineNumber )
4439 --- misc/cppunit-1.8.0/src/cppunit/NotEqualException.cpp 2001-10-06 00:27:14.000000000 +0200
4440 +++ misc/build/cppunit-1.8.0/src/cppunit/NotEqualException.cpp 2008-02-27 17:21:34.000000000 +0100
4441 @@ -3,17 +3,17 @@
4442 namespace CppUnit {
4445 -NotEqualException::NotEqualException( std::string expected,
4446 - std::string actual,
4447 - SourceLine sourceLine ,
4448 - std::string additionalMessage ) :
4449 - Exception( "Expected: " + expected +
4450 - ", but was: " + actual +
4451 - "." + additionalMessage ,
4452 - sourceLine),
4453 - m_expected( expected ),
4454 - m_actual( actual ),
4455 - m_additionalMessage( additionalMessage )
4456 +NotEqualException::NotEqualException( std::string const& _expected,
4457 + std::string const& _actual,
4458 + SourceLine const& _sourceLine ,
4459 + std::string const& _additionalMessage ) :
4460 + Exception( "Expected: " + _expected +
4461 + ", but was: " + _actual +
4462 + "." + _additionalMessage ,
4463 + _sourceLine),
4464 + m_expected( _expected ),
4465 + m_actual( _actual ),
4466 + m_additionalMessage( _additionalMessage )
4470 @@ -22,10 +22,10 @@
4472 * \deprecated Use other constructor instead.
4474 -NotEqualException::NotEqualException( std::string expected,
4475 - std::string actual,
4476 +NotEqualException::NotEqualException( std::string const& expected,
4477 + std::string const& actual,
4478 long lineNumber,
4479 - std::string fileName ) :
4480 + std::string const& fileName ) :
4481 Exception( "Expected: " + expected + ", but was: " + actual,
4482 lineNumber,
4483 fileName ),
4484 --- misc/cppunit-1.8.0/src/cppunit/SourceLine.cpp 2001-10-06 00:27:14.000000000 +0200
4485 +++ misc/build/cppunit-1.8.0/src/cppunit/SourceLine.cpp 2008-02-27 17:23:14.000000000 +0100
4486 @@ -10,10 +10,10 @@
4490 -SourceLine::SourceLine( const std::string &fileName,
4491 - int lineNumber ) :
4492 - m_fileName( fileName ),
4493 - m_lineNumber( lineNumber )
4494 +SourceLine::SourceLine( const std::string &file,
4495 + int line ) :
4496 + m_fileName( file ),
4497 + m_lineNumber( line )
4501 --- misc/cppunit-1.8.0/src/cppunit/TestAssert.cpp 2001-10-07 21:36:47.000000000 +0200
4502 +++ misc/build/cppunit-1.8.0/src/cppunit/TestAssert.cpp 2008-02-27 17:23:24.000000000 +0100
4503 @@ -1,4 +1,4 @@
4504 -#if HAVE_CMATH
4505 +#ifdef HAVE_CMATH
4506 # include <cmath>
4507 #else
4508 # include <math.h>
4509 @@ -15,56 +15,56 @@
4510 /// Check for a failed general assertion
4511 void
4512 TestAssert::assertImplementation( bool condition,
4513 - std::string conditionExpression,
4514 - long lineNumber,
4515 - std::string fileName )
4516 + std::string conditionExpression,
4517 + long lineNumber,
4518 + std::string fileName )
4520 Asserter::failIf( condition,
4521 - conditionExpression,
4522 - SourceLine( fileName, lineNumber ) );
4523 + conditionExpression,
4524 + SourceLine( fileName, lineNumber ) );
4528 /// Reports failed equality
4529 void
4530 TestAssert::assertNotEqualImplementation( std::string expected,
4531 - std::string actual,
4532 - long lineNumber,
4533 - std::string fileName )
4534 + std::string actual,
4535 + long lineNumber,
4536 + std::string fileName )
4538 Asserter::failNotEqual( expected,
4539 - actual,
4540 - SouceLine( fileName, lineNumber ), "" );
4541 + actual,
4542 + SouceLine( fileName, lineNumber ), "" );
4546 /// Check for a failed equality assertion
4547 void
4548 TestAssert::assertEquals( double expected,
4549 - double actual,
4550 - double delta,
4551 - long lineNumber,
4552 - std::string fileName )
4553 + double actual,
4554 + double delta,
4555 + long lineNumber,
4556 + std::string fileName )
4558 if (fabs (expected - actual) > delta)
4559 - assertNotEqualImplementation( assertion_traits<double>::toString(expected),
4560 - assertion_traits<double>::toString(actual),
4561 - lineNumber,
4562 - fileName );
4563 + assertNotEqualImplementation( assertion_traits<double>::toString(expected),
4564 + assertion_traits<double>::toString(actual),
4565 + lineNumber,
4566 + fileName );
4569 #else // CPPUNIT_ENABLE_SOURCELINE_DEPRECATED
4571 void
4572 TestAssert::assertDoubleEquals( double expected,
4573 - double actual,
4574 - double delta,
4575 - SourceLine sourceLine )
4576 + double actual,
4577 + double delta,
4578 + SourceLine sourceLine )
4580 Asserter::failNotEqualIf( fabs( expected - actual ) > delta,
4581 - assertion_traits<double>::toString(expected),
4582 - assertion_traits<double>::toString(actual),
4583 - sourceLine );
4584 + assertion_traits<double>::toString(expected),
4585 + assertion_traits<double>::toString(actual),
4586 + sourceLine );
4590 --- misc/cppunit-1.8.0/src/cppunit/TestCase.cpp 2002-03-25 23:35:34.000000000 +0100
4591 +++ misc/build/cppunit-1.8.0/src/cppunit/TestCase.cpp 2008-02-27 17:21:24.000000000 +0100
4592 @@ -1,70 +1,141 @@
4593 +#include <stdlib.h>
4594 #include <cppunit/Portability.h>
4595 #include <typeinfo>
4596 #include <stdexcept>
4598 #include "cppunit/TestCase.h"
4599 #include "cppunit/Exception.h"
4600 -#include "cppunit/TestResult.h"
4601 +// #include "cppunit/TestResult.h"
4603 +#include <cppunit/autoregister/callbackfunc_fktptr.h>
4604 +#include <cppunit/tagvalues.hxx>
4605 +#include <cppunit/externcallbackfunc.hxx>
4607 namespace CppUnit {
4609 /// Create a default TestResult
4610 -CppUnit::TestResult*
4611 -TestCase::defaultResult()
4613 - return new TestResult;
4615 +//# CppUnit::TestResult*
4616 +//# TestCase::defaultResult()
4617 +//# {
4618 +//# return new TestResult;
4619 +//# }
4622 /// Run the test and catch any exceptions that are triggered by it
4623 +//# void
4624 +//# TestCase::run( TestResult *result )
4625 +//# {
4626 +//# result->startTest(this);
4627 +//#
4628 +//# try {
4629 +//# setUp();
4630 +//#
4631 +//# try {
4632 +//# runTest();
4633 +//# }
4634 +//# catch ( Exception &e ) {
4635 +//# Exception *copy = e.clone();
4636 +//# result->addFailure( this, copy );
4637 +//# }
4638 +//# catch ( std::exception &e ) {
4639 +//# result->addError( this, new Exception( e.what() ) );
4640 +//# }
4641 +//# catch (...) {
4642 +//# Exception *e = new Exception( "caught unknown exception" );
4643 +//# result->addError( this, e );
4644 +//# }
4645 +//#
4646 +//# try {
4647 +//# tearDown();
4648 +//# }
4649 +//# catch (...) {
4650 +//# result->addError( this, new Exception( "tearDown() failed" ) );
4651 +//# }
4652 +//# }
4653 +//# catch (...) {
4654 +//# result->addError( this, new Exception( "setUp() failed" ) );
4655 +//# }
4656 +//#
4657 +//# result->endTest( this );
4658 +//# }
4659 +//#
4661 void
4662 -TestCase::run( TestResult *result )
4663 +TestCase::run( hTestResult result )
4665 - result->startTest(this);
4667 - try {
4668 - setUp();
4669 + Test* pTest = this;
4671 - try {
4672 - runTest();
4674 - catch ( Exception &e ) {
4675 - Exception *copy = e.clone();
4676 - result->addFailure( this, copy );
4678 - catch ( std::exception &e ) {
4679 - result->addError( this, new Exception( e.what() ) );
4681 - catch (...) {
4682 - Exception *e = new Exception( "caught unknown exception" );
4683 - result->addError( this, e );
4686 - try {
4687 - tearDown();
4689 - catch (...) {
4690 - result->addError( this, new Exception( "tearDown() failed" ) );
4693 - catch (...) {
4694 - result->addError( this, new Exception( "setUp() failed" ) );
4697 - result->endTest( this );
4698 + // if (signalCheck(pTest->getName()) == HAS_SIGNAL)
4699 + sal_Int32 nValue = (pCallbackFunc)(0 /* NULL */, TAG_TYPE, EXECUTION_CHECK, TAG_RESULT_PTR, result, TAG_NODENAME, pTest->getName().c_str(), TAG_DONE);
4700 + if (nValue == DO_NOT_EXECUTE)
4702 + return;
4705 + // (pTestResult_StartTest)(result, pTest);
4706 + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_START, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_DONE);
4708 + try
4710 + setUp();
4712 + try
4714 + runTest();
4715 + // (pTestResult_AddInfo)(result, pTest, "PASSED");
4716 + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_ADD_INFO, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_INFO, "PASSED", TAG_DONE);
4718 + catch ( StubException &)
4720 + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_ADD_INFO, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_INFO, "STUB", TAG_DONE );
4722 + catch ( Exception &e )
4724 + Exception *copy = e.clone();
4725 + // (pTestResult_AddFailure)( result, pTest, copy );
4726 + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_ADD_FAILURE, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_EXCEPTION, copy, TAG_DONE );
4728 + catch ( std::exception &e )
4730 + // (pTestResult_AddError)( result, pTest, new Exception( e.what() ) );
4731 + (pCallbackFunc)( 0 /* NULL */, TAG_TYPE, RESULT_ADD_ERROR, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_EXCEPTION, new Exception( e.what() ), TAG_DONE );
4733 + catch (...)
4735 + Exception *e = new Exception( "caught unknown exception" );
4736 + // (pTestResult_AddError)( result, pTest, e );
4737 + (pCallbackFunc)( 0 /* NULL */, TAG_TYPE, RESULT_ADD_ERROR, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_EXCEPTION, e, TAG_DONE );
4740 + try
4742 + tearDown();
4744 + catch (...)
4746 + // (pTestResult_AddError)( result, pTest, new Exception( "tearDown() failed" ) );
4747 + (pCallbackFunc)( 0 /* NULL */, TAG_TYPE, RESULT_ADD_ERROR, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_EXCEPTION, new Exception( "tearDown() failed" ), TAG_DONE );
4750 + catch (...)
4752 + // (pTestResult_AddError)( result, pTest, new Exception( "setUp() failed" ) );
4753 + (pCallbackFunc)( 0 /* NULL */, TAG_TYPE, RESULT_ADD_ERROR, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_EXCEPTION, new Exception( "setUp() failed" ), TAG_DONE );
4756 + // (pTestResult_EndTest)( result, pTest );
4757 + (pCallbackFunc)( 0 /* NULL */, TAG_TYPE, RESULT_END, TAG_RESULT_PTR, result, TAG_TEST_PTR, pTest, TAG_DONE );
4761 /// A default run method
4762 -TestResult *
4763 -TestCase::run()
4765 - TestResult *result = defaultResult();
4767 - run (result);
4768 - return result;
4770 +//# TestResult *
4771 +//# TestCase::run()
4772 +//# {
4773 +//# TestResult *result = defaultResult();
4774 +//#
4775 +//# run (result);
4776 +//# return result;
4777 +//# }
4780 /// All the work for runTest is deferred to subclasses
4781 @@ -77,7 +148,7 @@
4782 /** Constructs a test case.
4783 * \param name the name of the TestCase.
4785 -TestCase::TestCase( std::string name )
4786 +TestCase::TestCase( std::string const& name )
4787 : m_name(name)
4790 @@ -133,3 +204,8 @@
4793 } // namespace CppUnit
4795 +// The following sets variables for GNU EMACS
4796 +// Local Variables:
4797 +// tab-width:4
4798 +// End:
4799 --- misc/cppunit-1.8.0/src/cppunit/TestFactoryRegistry.cpp 2002-03-28 16:47:08.000000000 +0100
4800 +++ misc/build/cppunit-1.8.0/src/cppunit/TestFactoryRegistry.cpp 2008-02-27 17:22:38.000000000 +0100
4801 @@ -1,12 +1,20 @@
4802 +#include <stdio.h>
4803 +#include <stdlib.h>
4804 #include <cppunit/extensions/TestFactoryRegistry.h>
4805 #include <cppunit/TestSuite.h>
4806 -#include <set>
4808 +#include <set>
4809 +//!io #include <iostream>
4810 +#include <sstream>
4812 #if CPPUNIT_USE_TYPEINFO_NAME
4813 # include "cppunit/extensions/TypeInfoHelper.h"
4814 #endif
4816 +#include <cppunit/externcallbackfunc.hxx>
4817 +#include <cppunit/tagvalues.hxx>
4819 +#undef HELLOWORLD_DEBUGGER
4821 namespace CppUnit {
4823 @@ -26,15 +34,18 @@
4825 static NamedRegistries &getInstance();
4827 - TestFactoryRegistry &getRegistry( std::string name );
4828 + TestFactoryRegistry &getRegistry( std::string const& name );
4830 void wasDestroyed( TestFactory *factory );
4832 bool needDestroy( TestFactory *factory );
4834 + void testRegistries( hTestResult );
4835 private:
4836 - typedef std::map<std::string, TestFactoryRegistry *> Registries;
4837 - Registries m_registries;
4838 + typedef std::map<std::string, TestFactoryRegistry *> MapRegistries;
4839 + // typedef std::pair<std::string, TestFactoryRegistry *> StringTestFactoryRegistry;
4840 + // typedef std::vector< StringTestFactoryRegistry > MapRegistries;
4841 + MapRegistries m_registries;
4843 typedef std::set<TestFactory *> Factories;
4844 Factories m_factoriesToDestroy;
4845 @@ -44,13 +55,27 @@
4847 NamedRegistries::~NamedRegistries()
4849 - Registries::iterator it = m_registries.begin();
4850 - while ( it != m_registries.end() )
4852 - TestFactoryRegistry *registry = (it++)->second;
4853 - if ( needDestroy( registry ) )
4854 - delete registry;
4856 +#ifdef HELLOWORLD_DEBUGGER
4857 + printf("~NamedRegistries.\n");
4858 +#endif
4859 + MapRegistries::iterator it = m_registries.begin();
4860 + while ( it != m_registries.end() )
4862 + TestFactoryRegistry *registry = (it++)->second;
4863 + if ( needDestroy( registry ) )
4864 + delete registry;
4867 + for (MapRegistries::iterator it = m_registries.begin();
4868 + it != m_registries.end();
4869 + ++it)
4871 + StringTestFactoryRegistry stfr = *it;
4872 + TestFactoryRegistry *registry = stfr.second;
4873 + if ( needDestroy( registry ) )
4874 + delete registry;
4880 @@ -63,17 +88,55 @@
4883 TestFactoryRegistry &
4884 -NamedRegistries::getRegistry( std::string name )
4885 +NamedRegistries::getRegistry( std::string const& name )
4887 - Registries::const_iterator foundIt = m_registries.find( name );
4888 - if ( foundIt == m_registries.end() )
4889 +#ifdef HELLOWORLD_DEBUGGER
4890 + printf("getRegistry '%s', ", name.c_str());
4891 +#endif
4892 + MapRegistries::const_iterator foundIt = m_registries.find( name );
4893 + if ( foundIt == m_registries.end() )
4895 + TestFactoryRegistry *factory = new TestFactoryRegistry( name );
4896 + // m_registries.insert( std::make_pair( name, factory ) );
4897 + m_registries[name] = factory;
4898 + m_factoriesToDestroy.insert( factory );
4900 +#ifdef HELLOWORLD_DEBUGGER
4901 + printf("factory not found, create.\n");
4902 +#endif
4903 + return *factory;
4905 +#ifdef HELLOWORLD_DEBUGGER
4906 + printf("factory found.\n");
4907 +#endif
4908 + return *foundIt->second;
4910 + // MapRegistries::const_iterator foundIt;
4911 + TestFactoryRegistry *pFound = NULL;
4912 + for (MapRegistries::const_iterator it = m_registries.begin();
4913 + it != m_registries.end();
4914 + ++it)
4916 + StringTestFactoryRegistry stfr = *it;
4917 + if (name == stfr.first)
4919 + pFound = stfr.second;
4920 + break;
4924 + // MapRegistries::const_iterator foundIt = m_registries.find( name );
4925 + if ( pFound != NULL )
4927 TestFactoryRegistry *factory = new TestFactoryRegistry( name );
4928 - m_registries.insert( std::make_pair( name, factory ) );
4929 + // m_registries.insert( std::make_pair( name, factory ) );
4930 + StringTestFactoryRegistry stfr = std::make_pair(name, factory);
4931 + m_registries.push_back(stfr);
4932 m_factoriesToDestroy.insert( factory );
4933 return *factory;
4935 - return *foundIt->second;
4936 + return *pFound;
4941 @@ -91,9 +154,32 @@
4942 return m_destroyedFactories.count( factory ) == 0;
4945 +void NamedRegistries::testRegistries( hTestResult _pResult)
4947 + // initialise the test handling
4948 + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, INIT_TEST, TAG_RESULT_PTR, _pResult, TAG_DONE);
4950 + // Start signal based Check
4951 + for (MapRegistries::const_iterator it = m_registries.begin();
4952 + it != m_registries.end();
4953 + ++it)
4955 + std::string sName = (*it).first;
4957 + CppUnit::Test* tp = CppUnit::TestFactoryRegistry::getRegistry(sName).makeTest();
4958 + tp->run(_pResult);
4961 + // release test handling
4962 + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RELEASE_TEST, TAG_RESULT_PTR, _pResult, TAG_DONE);
4963 + // start normal based tests, leave signal signed tests out.
4965 -TestFactoryRegistry::TestFactoryRegistry( std::string name ) :
4966 + //! Allfunction in the inclusion list which has a flag, not found, has to call here.
4969 +// -----------------------------------------------------------------------------
4971 +TestFactoryRegistry::TestFactoryRegistry( std::string const& name ) :
4972 m_name( name )
4975 @@ -116,26 +202,38 @@
4980 +// static
4981 TestFactoryRegistry &
4982 TestFactoryRegistry::getRegistry()
4984 return getRegistry( "All Tests" );
4988 +// static
4989 TestFactoryRegistry &
4990 TestFactoryRegistry::getRegistry( const std::string &name )
4992 return NamedRegistries::getInstance().getRegistry( name );
4995 +// static
4996 +void TestFactoryRegistry::testRegistries( hTestResult _pResult )
4998 + NamedRegistries::getInstance().testRegistries( _pResult );
5002 void
5003 TestFactoryRegistry::registerFactory( const std::string &name,
5004 TestFactory *factory )
5006 - m_factories[name] = factory;
5007 +#ifdef HELLOWORLD_DEBUGGER
5008 + printf("registerFactory %s\n", name.c_str());
5009 +#endif
5010 + m_factories[name] = factory;
5011 +#ifdef HELLOWORLD_DEBUGGER
5012 + printf("FactorySize: %d\n ", m_factories.size());
5013 +#endif
5017 @@ -144,10 +242,23 @@
5019 static int serialNumber = 1;
5021 - OStringStream ost;
5022 - ost << "@Dummy@" << serialNumber++;
5024 - registerFactory( ost.str(), factory );
5025 + std::string aStr("@Dummy@_");
5027 + sal_Char cBuf[20];
5028 + sal_Char *pBuf = cBuf;
5029 + sprintf(pBuf, "%d", serialNumber++ );
5031 + aStr += std::string(pBuf);
5033 + // LLA: this does not work within Solaris, could be a problem of the osl::Module::load?
5034 + // std::ostringstream ost;
5035 + // ost << "@Dummy@" << nValue;
5036 + // registerFactory( ost.str(), factory );
5038 +#ifdef HELLOWORLD_DEBUGGER
5039 + printf("aStr: %s\n", aStr.c_str());
5040 +#endif
5041 + registerFactory( aStr, factory );
5045 @@ -163,6 +274,9 @@
5046 void
5047 TestFactoryRegistry::addTestToSuite( TestSuite *suite )
5049 +#ifdef HELLOWORLD_DEBUGGER
5050 + printf("addTestToSuite %s\n", suite->getName().c_str());
5051 +#endif
5052 for ( Factories::iterator it = m_factories.begin();
5053 it != m_factories.end();
5054 ++it )
5055 --- misc/cppunit-1.8.0/src/cppunit/TestFailure.cpp 2002-02-28 11:57:20.000000000 +0100
5056 +++ misc/build/cppunit-1.8.0/src/cppunit/TestFailure.cpp 2008-02-27 17:23:02.000000000 +0100
5057 @@ -5,12 +5,12 @@
5058 namespace CppUnit {
5060 /// Constructs a TestFailure with the given test and exception.
5061 -TestFailure::TestFailure( Test *failedTest,
5062 - Exception *thrownException,
5063 - bool isError ) :
5064 - m_failedTest( failedTest ),
5065 - m_thrownException( thrownException ),
5066 - m_isError( isError )
5067 +TestFailure::TestFailure( Test *failed,
5068 + Exception *_thrownException,
5069 + ErrorType::num eError ) :
5070 + m_failedTest( failed ),
5071 + m_thrownException( _thrownException ),
5072 + m_eError( eError )
5076 @@ -45,10 +45,19 @@
5079 /// Indicates if the failure is a failed assertion or an error.
5080 -bool
5081 +bool
5082 TestFailure::isError() const
5084 - return m_isError;
5085 + if (m_eError == ErrorType::ET_ERROR ||
5086 + m_eError == ErrorType::ET_SIGNAL)
5087 + return true;
5088 + return false;
5091 +ErrorType::num
5092 +TestFailure::getErrorType() const
5094 + return m_eError;
5098 @@ -71,7 +80,7 @@
5099 TestFailure *
5100 TestFailure::clone() const
5102 - return new TestFailure( m_failedTest, m_thrownException->clone(), m_isError );
5103 + return new TestFailure( m_failedTest, m_thrownException->clone(), m_eError );
5106 } // namespace CppUnit
5107 --- misc/cppunit-1.8.0/src/cppunit/TestSuite.cpp 2002-03-24 20:39:55.000000000 +0100
5108 +++ misc/build/cppunit-1.8.0/src/cppunit/TestSuite.cpp 2008-02-27 17:24:10.000000000 +0100
5109 @@ -1,11 +1,15 @@
5110 +#include <stdlib.h>
5111 #include "cppunit/TestSuite.h"
5112 -#include "cppunit/TestResult.h"
5113 +// #include "cppunit/TestResult.h"
5114 +#include <cppunit/tagvalues.hxx>
5115 +#include <cppunit/autoregister/callbackfunc_fktptr.h>
5116 +#include <cppunit/externcallbackfunc.hxx>
5118 namespace CppUnit {
5120 /// Default constructor
5121 -TestSuite::TestSuite( std::string name )
5122 - : m_name( name )
5123 +TestSuite::TestSuite( std::string const& name )
5124 + : m_name( name )
5128 @@ -13,7 +17,7 @@
5129 /// Destructor
5130 TestSuite::~TestSuite()
5132 - deleteContents();
5133 + deleteContents();
5137 @@ -21,28 +25,37 @@
5138 void
5139 TestSuite::deleteContents()
5141 - for ( std::vector<Test *>::iterator it = m_tests.begin();
5142 - it != m_tests.end();
5143 - ++it)
5144 - delete *it;
5145 - m_tests.clear();
5146 + for ( std::vector<Test *>::iterator it = m_tests.begin();
5147 + it != m_tests.end();
5148 + ++it)
5149 + delete *it;
5150 + m_tests.clear();
5154 /// Runs the tests and collects their result in a TestResult.
5156 void
5157 -TestSuite::run( TestResult *result )
5158 +TestSuite::run( hTestResult result )
5160 - for ( std::vector<Test *>::iterator it = m_tests.begin();
5161 - it != m_tests.end();
5162 - ++it )
5164 - if ( result->shouldStop() )
5165 - break;
5167 - Test *test = *it;
5168 - test->run( result );
5170 + // (pTestResult_EnterNode)(result, getName().c_str());
5171 + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_ENTER_NODE, TAG_RESULT_PTR, result, TAG_NODENAME, getName().c_str(), TAG_DONE);
5172 + for ( std::vector<Test *>::iterator it = m_tests.begin();
5173 + it != m_tests.end();
5174 + ++it )
5176 + //# if ( result->shouldStop() )
5177 + //# break;
5178 + // if ( pTestResult_ShouldStop(result) )
5179 + if ( (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_SHOULD_STOP, TAG_RESULT_PTR, result, TAG_DONE) )
5181 + break;
5183 + Test *test = *it;
5184 + test->run( result );
5186 + // (pTestResult_LeaveNode)(result, getName().c_str());
5187 + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_LEAVE_NODE, TAG_RESULT_PTR, result, TAG_NODENAME, getName().c_str(), TAG_DONE);
5191 @@ -50,14 +63,14 @@
5192 int
5193 TestSuite::countTestCases() const
5195 - int count = 0;
5197 - for ( std::vector<Test *>::const_iterator it = m_tests.begin();
5198 - it != m_tests.end();
5199 - ++it )
5200 - count += (*it)->countTestCases();
5202 - return count;
5203 + int count = 0;
5205 + for ( std::vector<Test *>::const_iterator it = m_tests.begin();
5206 + it != m_tests.end();
5207 + ++it )
5208 + count += (*it)->countTestCases();
5210 + return count;
5214 @@ -65,7 +78,7 @@
5215 void
5216 TestSuite::addTest( Test *test )
5218 - m_tests.push_back( test );
5219 + m_tests.push_back( test );
5223 @@ -73,7 +86,7 @@
5224 std::string
5225 TestSuite::toString() const
5227 - return "suite " + getName();
5228 + return "suite " + getName();
5232 @@ -81,16 +94,20 @@
5233 std::string
5234 TestSuite::getName() const
5236 - return m_name;
5237 + return m_name;
5241 const std::vector<Test *> &
5242 TestSuite::getTests() const
5244 - return m_tests;
5245 + return m_tests;
5249 } // namespace CppUnit
5251 +// The following sets variables for GNU EMACS
5252 +// Local Variables:
5253 +// tab-width:4
5254 +// End:
5255 --- misc/cppunit-1.8.0/src/cppunit/cmdlinebits.cxx 2008-12-10 20:46:08.820775372 +0100
5256 +++ misc/build/cppunit-1.8.0/src/cppunit/cmdlinebits.cxx 2008-12-10 20:42:44.000000000 +0100
5257 @@ -1 +1,144 @@
5258 -dummy
5259 +/*************************************************************************
5261 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5262 + *
5263 + * Copyright 2008 by Sun Microsystems, Inc.
5265 + * OpenOffice.org - a multi-platform office productivity suite
5267 + * $RCSfile$
5268 + * $Revision$
5270 + * This file is part of OpenOffice.org.
5272 + * OpenOffice.org is free software: you can redistribute it and/or modify
5273 + * it under the terms of the GNU Lesser General Public License version 3
5274 + * only, as published by the Free Software Foundation.
5276 + * OpenOffice.org is distributed in the hope that it will be useful,
5277 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5278 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5279 + * GNU Lesser General Public License version 3 for more details
5280 + * (a copy is included in the LICENSE file that accompanied this code).
5282 + * You should have received a copy of the GNU Lesser General Public License
5283 + * version 3 along with OpenOffice.org. If not, see
5284 + * <http://www.openoffice.org/license.html>
5285 + * for a copy of the LGPLv3 License.
5287 + ************************************************************************/
5289 +// MARKER(update_precomp.py): autogen include statement, do not remove
5290 +// #include "precompiled_cppunit.hxx"
5292 +#ifdef WNT
5293 +# define UNDER_WINDOWS_DEBUGGING
5294 +# include "testshl/winstuff.hxx"
5295 +#endif /* WNT */
5297 +#include <stdio.h>
5298 +#include <cppunit/cmdlinebits.hxx>
5299 +#include "cppunit/checkboom.hxx"
5301 +#include <cppunit/autoregister/callbackstructure.h>
5302 +#include <osl/diagnose.h>
5303 +#include <rtl/tres.h>
5304 +#include <cppunit/stringhelper.hxx>
5306 +extern CallbackStructure aGlobalStructure;
5308 +sal_Bool isBit( CmdLineBits _nBits, CmdLineBits _nFlag );
5310 +// sal_Bool isBit( CmdLineBits _nBits, CmdLineBits _nFlag )
5311 +// {
5312 +// return( ( _nBits & _nFlag ) == _nFlag );
5313 +// }
5315 +void CheckBoom(bool bCondition, std::string const& msg)
5317 + (void) msg; // avoid warning
5318 + if ( isBit( aGlobalStructure.nBits, rtl_tres_Flag_BOOM ) )
5319 + {
5320 + /* force an assertion on false state */
5321 + if ( !bCondition ) {
5322 +#ifdef UNDER_WINDOWS_DEBUGGING
5323 + WinDebugBreak();
5324 +#else
5325 + OSL_ENSURE( false, msg.c_str() );
5326 +#endif
5328 + }
5331 +void CheckBoom(bool bCondition, rtl::OUString const& msg)
5333 + if ( isBit( aGlobalStructure.nBits, rtl_tres_Flag_BOOM ) )
5334 + {
5335 + /* force an assertion on false state */
5336 + rtl::OString sMessage;
5337 + sMessage <<= msg;
5338 + if ( !bCondition ) {
5339 +#ifdef UNDER_WINDOWS_DEBUGGING
5340 + WinDebugBreak();
5341 +#else
5342 + OSL_ENSURE( false, sMessage.getStr() );
5343 +#endif
5348 +const char* getForwardString()
5350 + return aGlobalStructure.psForward;
5353 +// -----------------------------------------------------------------------------
5354 +// ----------------------------- own printf method -----------------------------
5355 +// -----------------------------------------------------------------------------
5357 +// bool isVerbose()
5358 +// {
5359 +// if ( isBit( aGlobalStructure.nBits, rtl_tres_Flag_VERBOSE ) )
5360 +// {
5361 +// return true;
5362 +// }
5363 +// return false;
5364 +// }
5365 +//
5366 +// bool isQuiet()
5367 +// {
5368 +// if ( isBit( aGlobalStructure.nBits, rtl_tres_Flag_QUIET ) )
5369 +// {
5370 +// return true;
5371 +// }
5372 +// return false;
5373 +// }
5374 +//
5375 +// void impl_t_print(const char* _pFormatStr, va_list &args)
5376 +// {
5377 +// if (! isQuiet())
5378 +// {
5379 +// printf("# ");
5380 +// vprintf(_pFormatStr, args);
5381 +// }
5382 +// }
5383 +//
5384 +// void t_print(const char* _pFormatStr, ...)
5385 +// {
5386 +// va_list args;
5387 +// va_start( args, _pFormatStr );
5388 +// impl_t_print(_pFormatStr, args);
5389 +// va_end( args );
5390 +// }
5391 +//
5392 +// void t_print(T_Print_Params _eType, const char* _pFormatStr, ...)
5393 +// {
5394 +// if (_eType == T_VERBOSE && isVerbose())
5395 +// {
5396 +// // if T_VERBOSE and we should be verbose, print info
5397 +// va_list args;
5398 +// va_start( args, _pFormatStr );
5399 +// impl_t_print(_pFormatStr, args);
5400 +// va_end( args );
5401 +// }
5402 +// }
5403 Nur in misc/build/cppunit-1.8.0/src/cppunit: cmdlinebits.cxx.dummy.
5404 --- misc/cppunit-1.8.0/src/cppunit/joblist.cxx 2008-12-10 20:46:08.893444692 +0100
5405 +++ misc/build/cppunit-1.8.0/src/cppunit/joblist.cxx 2008-12-09 09:03:54.000000000 +0100
5406 @@ -1 +1,224 @@
5407 -dummy
5408 +/*************************************************************************
5410 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5411 + *
5412 + * Copyright 2008 by Sun Microsystems, Inc.
5414 + * OpenOffice.org - a multi-platform office productivity suite
5416 + * $RCSfile$
5417 + * $Revision$
5419 + * This file is part of OpenOffice.org.
5421 + * OpenOffice.org is free software: you can redistribute it and/or modify
5422 + * it under the terms of the GNU Lesser General Public License version 3
5423 + * only, as published by the Free Software Foundation.
5425 + * OpenOffice.org is distributed in the hope that it will be useful,
5426 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5427 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5428 + * GNU Lesser General Public License version 3 for more details
5429 + * (a copy is included in the LICENSE file that accompanied this code).
5431 + * You should have received a copy of the GNU Lesser General Public License
5432 + * version 3 along with OpenOffice.org. If not, see
5433 + * <http://www.openoffice.org/license.html>
5434 + * for a copy of the LGPLv3 License.
5436 + ************************************************************************/
5438 +// MARKER(update_precomp.py): autogen include statement, do not remove
5439 +// #include "precompiled_cppunit.hxx"
5441 +#include <stdlib.h>
5442 +#include <stdio.h>
5443 +#include <fstream>
5444 +#include <rtl/string.hxx>
5445 +#include "cppunit/joblist.hxx"
5447 +#define C_SEPARATOR_LIST " \t,;:#"
5448 +JobList::JobList()
5449 + :ppsJobList(NULL)
5452 +// -----------------------------------------------------------------------------
5453 +bool JobList::isInCurrentEnvironment(std::string const& _sString)
5455 + int nSpace = 0;
5456 + std::string sSearchString = _sString;
5457 + bool bEnd = false;
5458 + // run through the hole given string,
5459 + std::string sEnv;
5461 + do {
5462 + nSpace = sSearchString.find_first_of(C_SEPARATOR_LIST);
5463 + if (nSpace < 0)
5465 + sEnv = sSearchString;
5466 + bEnd = true;
5468 + else
5470 + sEnv = sSearchString.substr(0, nSpace);
5471 + sSearchString = sSearchString.substr(nSpace + 1);
5473 + if (sEnv.length() > 0)
5475 + // cout << sEnv << endl;
5476 +#ifdef LINUX
5477 + int nLinux = sEnv.find("unxlng");
5478 + if (nLinux >= 0)
5480 + // found unxlng
5481 + return true;
5483 +#endif
5484 +#ifdef SOLARIS
5485 + int nSolaris = sEnv.find("unxsol");
5486 + if (nSolaris >= 0)
5488 + // found unxsol
5489 + return true;
5490 + }
5491 +#endif
5492 +#ifdef WNT
5493 + int nWindows = sEnv.find("wnt");
5494 + if (nWindows >= 0)
5496 + // found wnt
5497 + return true;
5499 +#endif
5501 + } while ( !bEnd );
5502 + return false;
5505 +std::string JobList::trim(std::string const& _sStringToTrim)
5507 + rtl::OString sStr(_sStringToTrim.c_str());
5508 + sStr = sStr.trim();
5509 + return std::string(sStr.getStr());
5512 +// -----------------------------------------------------------------------------
5513 +bool JobList::readfile(std::string const& _sFilename, JobType _nJobType)
5515 + // StringList aJobList;
5516 + m_aJobList.clear();
5518 + std::ifstream in(_sFilename.c_str(), std::ios::in);
5520 + if (!in)
5522 + // fprintf(stderr, "warning: Can't open job file: %s\n", _sFilename.c_str());
5523 + return false;
5525 + else
5527 + if (_nJobType == JOB_EXCLUDE_LIST)
5529 + fprintf(stderr, "warning: There exist a job exclusion list file: %s\n", _sFilename.c_str());
5532 + // std::cout << "Check for signal" << std::endl;
5533 + std::string sLine;
5534 + while (std::getline(in, sLine))
5536 + if (sLine.size() > 0)
5538 + char ch = sLine[0];
5539 + if (ch != '#' &&
5540 + isspace(ch) == 0)
5542 + sLine = trim(sLine);
5544 + // m_aJobList.push_back( sLine );
5545 + int nSpace = sLine.find_first_of(C_SEPARATOR_LIST);
5546 + if (nSpace < 0)
5548 + m_aJobList[sLine] = JOB_UNKNOWN;
5550 + else
5552 + // found a separator
5553 + std::string sTest = sLine.substr(0, nSpace);
5554 + std::string sRest = sLine.substr(nSpace + 1);
5555 + if (isInCurrentEnvironment(sRest))
5557 + m_aJobList[sTest] = JOB_UNKNOWN;
5564 + // inclusion list
5566 + int nSize = m_aJobList.size();
5568 + ppsJobList = (char**) malloc((nSize + 1) * sizeof(char*));
5570 + int nIdx = 0;
5571 + StringList::const_iterator aItEnd = m_aJobList.end();
5572 + for(StringList::const_iterator it = m_aJobList.begin();
5573 + it != aItEnd; ++it)
5575 + std::string sValue = *it;
5576 + char* psTestFkt = (char*) malloc(sValue.size() + 1);
5577 + strcpy(psTestFkt, sValue.c_str());
5578 + ppsJobList[nIdx] = psTestFkt;
5579 + ++nIdx;
5582 + ppsJobList[nIdx] = NULL;
5585 + return true;
5588 +// -----------------------------------------------------------------------------
5589 +int JobList::getJobListEntry(std::string const& _sIndexName)
5591 + if (m_aJobList.find(_sIndexName) != m_aJobList.end())
5593 + return m_aJobList[_sIndexName];
5595 + return JOB_NOT_FOUND;
5598 +// -----------------------------------------------------------------------------
5599 +void JobList::setJobListEntry(std::string const& _sIndexName, int _nValue)
5601 + // if (m_aJobList.find(_sIndexName) == m_aJobList.end())
5602 + // {
5603 + m_aJobList[_sIndexName] = _nValue;
5604 + // }
5605 + // else
5606 + // {
5607 + // fprintf(stderr, "error: test function '%s' already exist.\n", _sIndexName);
5608 + // }
5611 +// -----------------------------------------------------------------------------
5612 +JobList::~JobList()
5614 + int nIdx = 0;
5615 + if (ppsJobList)
5617 + while(ppsJobList[nIdx] != NULL)
5619 + free(ppsJobList[nIdx]);
5620 + ++nIdx;
5622 + free(ppsJobList);
5625 +// -----------------------------------------------------------------------------
5627 + bool JobList::checkFilter(JobList m_aJobFilter, std::string const& _sNodeName, std::string const& _sName)
5629 + std::string sFilter = m_aJobFilter.m_aJobList.begin();
5632 Nur in misc/build/cppunit-1.8.0/src/cppunit: joblist.cxx.dummy.
5633 --- misc/cppunit-1.8.0/src/cppunit/makefile.mk 2008-12-10 20:46:08.970632544 +0100
5634 +++ misc/build/cppunit-1.8.0/src/cppunit/makefile.mk 2008-12-10 19:44:52.000000000 +0100
5635 @@ -1 +1,113 @@
5636 -dummy
5637 +#*************************************************************************
5639 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5641 +# Copyright 2008 by Sun Microsystems, Inc.
5643 +# OpenOffice.org - a multi-platform office productivity suite
5645 +# $RCSfile$
5647 +# $Revision$
5649 +# This file is part of OpenOffice.org.
5651 +# OpenOffice.org is free software: you can redistribute it and/or modify
5652 +# it under the terms of the GNU Lesser General Public License version 3
5653 +# only, as published by the Free Software Foundation.
5655 +# OpenOffice.org is distributed in the hope that it will be useful,
5656 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
5657 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5658 +# GNU Lesser General Public License version 3 for more details
5659 +# (a copy is included in the LICENSE file that accompanied this code).
5661 +# You should have received a copy of the GNU Lesser General Public License
5662 +# version 3 along with OpenOffice.org. If not, see
5663 +# <http://www.openoffice.org/license.html>
5664 +# for a copy of the LGPLv3 License.
5666 +#*************************************************************************
5668 +PRJ=..$/..$/..$/..$/..$/..
5669 +INCEXT=..$/..$/include
5671 +PRJNAME=cppunit
5672 +TARGET=cppunit
5673 +LIBTARGET=NO
5674 +ENABLE_EXCEPTIONS=TRUE
5675 +# ENABLE_RTTI=TRUE
5677 +# --- Settings -----------------------------------------------------
5679 +.INCLUDE : settings.mk
5681 +# --- Files --------------------------------------------------------
5683 +# CXXFILES = \
5684 +# querytemplate.cxx \
5685 +# stringhelper.cxx
5687 +# ENVCFLAGSCXX+=-DCPPUNIT_BUILD_DLL
5689 +CPPUNIT_TESTSHL_SLOFILES = \
5690 + $(SLO)$/SourceLine.obj \
5691 + $(SLO)$/Exception.obj \
5692 + $(SLO)$/NotEqualException.obj \
5693 + $(SLO)$/TestFailure.obj \
5694 + $(SLO)$/joblist.obj \
5695 + $(SLO)$/t_print.obj \
5696 + $(SLO)$/signaltest.obj
5698 +CPPUNIT_STATIC_SOLFILES = \
5699 + $(SLO)$/Asserter.obj \
5700 + $(SLO)$/TestCase.obj \
5701 + $(SLO)$/TestSuite.obj \
5702 + $(SLO)$/TestAssert.obj \
5703 + $(SLO)$/TestFactoryRegistry.obj \
5704 + $(SLO)$/cmdlinebits.obj \
5705 + $(SLO)$/tresregister.obj \
5706 + $(SLO)$/tresstatewrapper.obj \
5707 + $(SLO)$/registertestfunction.obj
5710 +SLOFILES = \
5711 + $(CPPUNIT_TESTSHL_SLOFILES) \
5712 + $(CPPUNIT_STATIC_SOLFILES)
5713 +#-------------------------------------------------------------------------------
5714 +# This is statically cppunit library
5715 +LIB1TARGET= $(LB)$/$(TARGET).lib
5716 +LIB1OBJFILES= \
5717 + $(SLOFILES)
5719 +.IF "$(GUI)"=="WNT"
5720 +.IF "$(COM)"=="GCC"
5721 +LIB1ARCHIV=$(LB)$/lib$(TARGET)$(DLLPOSTFIX).a
5722 +.ENDIF
5723 +LIB1FILES=$(LB)$/c5t_winstuff.lib
5724 +.ENDIF
5726 +.IF "$(GUI)" == "UNX"
5727 +LIB1ARCHIV=$(LB)$/lib$(TARGET)$(DLLPOSTFIX).a
5728 +.ENDIF
5730 +#-------------------------------------------------------------------------------
5731 +TARGET2=c5t_no_regallfkt
5732 +LIB2TARGET= $(LB)$/$(TARGET2).lib
5733 +LIB2OBJFILES= \
5734 + $(CPPUNIT_TESTSHL_SLOFILES)
5736 +.IF "$(GUI)"=="WNT"
5737 +.IF "$(COM)"=="GCC"
5738 +LIB2ARCHIV=$(LB)$/lib$(TARGET2)$(DLLPOSTFIX).a
5739 +.ENDIF
5740 +.ENDIF
5742 +.IF "$(GUI)" == "UNX"
5743 +LIB2ARCHIV=$(LB)$/lib$(TARGET2)$(DLLPOSTFIX).a
5744 +.ENDIF
5746 +# --- Targets ------------------------------------------------------
5748 +.INCLUDE : target.mk
5750 Nur in misc/build/cppunit-1.8.0/src/cppunit: makefile.mk.dummy.
5751 --- misc/cppunit-1.8.0/src/cppunit/registertestfunction.cxx 2008-12-10 20:46:09.058854031 +0100
5752 +++ misc/build/cppunit-1.8.0/src/cppunit/registertestfunction.cxx 2008-12-09 09:04:23.000000000 +0100
5753 @@ -1 +1,60 @@
5754 -dummy
5755 +/*************************************************************************
5757 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5758 + *
5759 + * Copyright 2008 by Sun Microsystems, Inc.
5761 + * OpenOffice.org - a multi-platform office productivity suite
5763 + * $RCSfile$
5764 + * $Revision$
5766 + * This file is part of OpenOffice.org.
5768 + * OpenOffice.org is free software: you can redistribute it and/or modify
5769 + * it under the terms of the GNU Lesser General Public License version 3
5770 + * only, as published by the Free Software Foundation.
5772 + * OpenOffice.org is distributed in the hope that it will be useful,
5773 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5774 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5775 + * GNU Lesser General Public License version 3 for more details
5776 + * (a copy is included in the LICENSE file that accompanied this code).
5778 + * You should have received a copy of the GNU Lesser General Public License
5779 + * version 3 along with OpenOffice.org. If not, see
5780 + * <http://www.openoffice.org/license.html>
5781 + * for a copy of the LGPLv3 License.
5783 + ************************************************************************/
5785 +// MARKER(update_precomp.py): autogen include statement, do not remove
5786 +// #include "precompiled_cppunit.hxx"
5788 +#include <stdlib.h>
5789 +#include <cppunit/simpleheader.hxx>
5790 +#include <cppunit/additionalfunc.hxx>
5792 +extern "C" void SAL_CALL testAllRegisteredFunctions(hTestResult _pResult)
5794 + CppUnit::TestFactoryRegistry::testRegistries(_pResult);
5795 + // CppUnit::Test* tp = CppUnit::TestFactoryRegistry::getRegistry("rtl_OUString").makeTest();
5796 + // tp->run(pResult);
5799 +// -----------------------------------------------------------------------------
5800 +// ---------------------------- RegisterTestFunctions ----------------------------
5801 +// -----------------------------------------------------------------------------
5803 +extern "C" void SAL_CALL RegisterTestFunctions(FktRegFuncPtr _pFunc)
5805 + if (_pFunc)
5807 + (_pFunc)(&testAllRegisteredFunctions, "");
5809 + else
5811 + // error, FktRegFuncPtr not given
5813 + RegisterAdditionalFunctions(_pFunc);
5815 Nur in misc/build/cppunit-1.8.0/src/cppunit: registertestfunction.cxx.dummy.
5816 --- misc/cppunit-1.8.0/src/cppunit/signaltest.cxx 2008-12-10 20:46:09.119798751 +0100
5817 +++ misc/build/cppunit-1.8.0/src/cppunit/signaltest.cxx 2008-12-09 09:04:24.000000000 +0100
5818 @@ -1 +1,92 @@
5819 -dummy
5820 +/*************************************************************************
5822 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5823 + *
5824 + * Copyright 2008 by Sun Microsystems, Inc.
5826 + * OpenOffice.org - a multi-platform office productivity suite
5828 + * $RCSfile$
5829 + * $Revision$
5831 + * This file is part of OpenOffice.org.
5833 + * OpenOffice.org is free software: you can redistribute it and/or modify
5834 + * it under the terms of the GNU Lesser General Public License version 3
5835 + * only, as published by the Free Software Foundation.
5837 + * OpenOffice.org is distributed in the hope that it will be useful,
5838 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5839 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5840 + * GNU Lesser General Public License version 3 for more details
5841 + * (a copy is included in the LICENSE file that accompanied this code).
5843 + * You should have received a copy of the GNU Lesser General Public License
5844 + * version 3 along with OpenOffice.org. If not, see
5845 + * <http://www.openoffice.org/license.html>
5846 + * for a copy of the LGPLv3 License.
5848 + ************************************************************************/
5850 +// MARKER(update_precomp.py): autogen include statement, do not remove
5851 +// #include "precompiled_cppunit.hxx"
5853 +#include <typeinfo>
5855 +#include "cppunit/signaltest.h"
5857 +namespace CppUnit
5860 +/** Constructs a test case for a suite.
5861 + * This TestCase is intended for use by the TestCaller and should not
5862 + * be used by a test case for which run() is called.
5863 + **/
5864 +SignalTest::SignalTest(std::string const& _sName)
5865 + : m_sName( _sName )
5870 +/// Destructs a test case
5871 +SignalTest::~SignalTest()
5876 +/// Returns a count of all the tests executed
5877 +int
5878 +SignalTest::countTestCases() const
5880 + return 1;
5883 +/// We never need to start this
5884 +void SignalTest::run(hTestResult) {}
5887 +/// Returns the name of the test case
5888 +std::string
5889 +SignalTest::getName() const
5891 + return m_sName;
5895 +/// Returns the name of the test case instance
5896 +std::string
5897 +SignalTest::toString() const
5899 + std::string className;
5901 +#if CPPUNIT_USE_TYPEINFO_NAME
5902 + const std::type_info& thisClass = typeid( *this );
5903 + className = thisClass.name();
5904 +#else
5905 + className = "SignalTest";
5906 +#endif
5908 + return className + "." + getName();
5911 +} // namespace CppUnit
5912 Nur in misc/build/cppunit-1.8.0/src/cppunit: signaltest.cxx.dummy.
5913 --- misc/cppunit-1.8.0/src/cppunit/t_print.cxx 2008-12-10 20:46:09.210907830 +0100
5914 +++ misc/build/cppunit-1.8.0/src/cppunit/t_print.cxx 2008-12-09 09:04:23.000000000 +0100
5915 @@ -1 +1,98 @@
5916 -dummy
5917 +/*************************************************************************
5919 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5920 + *
5921 + * Copyright 2008 by Sun Microsystems, Inc.
5923 + * OpenOffice.org - a multi-platform office productivity suite
5925 + * $RCSfile$
5926 + * $Revision$
5928 + * This file is part of OpenOffice.org.
5930 + * OpenOffice.org is free software: you can redistribute it and/or modify
5931 + * it under the terms of the GNU Lesser General Public License version 3
5932 + * only, as published by the Free Software Foundation.
5934 + * OpenOffice.org is distributed in the hope that it will be useful,
5935 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5936 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5937 + * GNU Lesser General Public License version 3 for more details
5938 + * (a copy is included in the LICENSE file that accompanied this code).
5940 + * You should have received a copy of the GNU Lesser General Public License
5941 + * version 3 along with OpenOffice.org. If not, see
5942 + * <http://www.openoffice.org/license.html>
5943 + * for a copy of the LGPLv3 License.
5945 + ************************************************************************/
5947 +// MARKER(update_precomp.py): autogen include statement, do not remove
5948 +// #include "precompiled_cppunit.hxx"
5950 +#include <stdio.h>
5951 +#include <cppunit/cmdlinebits.hxx>
5952 +#include <rtl/tres.h>
5953 +#include <osl/mutex.hxx>
5955 +extern CmdLineBits st_nBits;
5957 +sal_Bool isBit( CmdLineBits _nBits, CmdLineBits _nFlag )
5959 + return( ( _nBits & _nFlag ) == _nFlag );
5962 +// -----------------------------------------------------------------------------
5963 +// ----------------------------- own printf method -----------------------------
5964 +// -----------------------------------------------------------------------------
5966 +bool isVerbose()
5968 + if ( isBit( st_nBits, rtl_tres_Flag_VERBOSE ) )
5969 + {
5970 + return true;
5971 + }
5972 + return false;
5975 +bool isQuiet()
5977 + if ( isBit( st_nBits, rtl_tres_Flag_QUIET ) )
5978 + {
5979 + return true;
5980 + }
5981 + return false;
5984 +// ::osl::Mutex m_aTPrintMutex;
5986 +void impl_t_print(const char* _pFormatStr, va_list &args)
5988 + if (! isQuiet())
5990 + // ::osl::MutexGuard g(m_aTPrintMutex);
5991 + printf("# ");
5992 + vprintf(_pFormatStr, args);
5996 +void t_print(const char* _pFormatStr, ...)
5998 + va_list args;
5999 + va_start( args, _pFormatStr );
6000 + impl_t_print(_pFormatStr, args);
6001 + va_end( args );
6004 +void t_print(T_Print_Params _eType, const char* _pFormatStr, ...)
6006 + if (_eType == T_VERBOSE && isVerbose())
6008 + // if T_VERBOSE and we should be verbose, print info
6009 + va_list args;
6010 + va_start( args, _pFormatStr );
6011 + impl_t_print(_pFormatStr, args);
6012 + va_end( args );
6015 Nur in misc/build/cppunit-1.8.0/src/cppunit: t_print.cxx.dummy.
6016 --- misc/cppunit-1.8.0/src/cppunit/tresregister.cxx 2008-12-10 20:46:09.288665520 +0100
6017 +++ misc/build/cppunit-1.8.0/src/cppunit/tresregister.cxx 2008-12-09 09:04:23.000000000 +0100
6018 @@ -1 +1,69 @@
6019 -dummy
6020 +/*************************************************************************
6022 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6023 + *
6024 + * Copyright 2008 by Sun Microsystems, Inc.
6026 + * OpenOffice.org - a multi-platform office productivity suite
6028 + * $RCSfile$
6029 + * $Revision$
6031 + * This file is part of OpenOffice.org.
6033 + * OpenOffice.org is free software: you can redistribute it and/or modify
6034 + * it under the terms of the GNU Lesser General Public License version 3
6035 + * only, as published by the Free Software Foundation.
6037 + * OpenOffice.org is distributed in the hope that it will be useful,
6038 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
6039 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6040 + * GNU Lesser General Public License version 3 for more details
6041 + * (a copy is included in the LICENSE file that accompanied this code).
6043 + * You should have received a copy of the GNU Lesser General Public License
6044 + * version 3 along with OpenOffice.org. If not, see
6045 + * <http://www.openoffice.org/license.html>
6046 + * for a copy of the LGPLv3 License.
6048 + ************************************************************************/
6050 +// MARKER(update_precomp.py): autogen include statement, do not remove
6051 +// #include "precompiled_cppunit.hxx"
6053 +#include <stdio.h>
6054 +#include <sal/types.h>
6055 +#include <cppunit/autoregister/registerfunc.h>
6056 +#include <cppunit/autoregister/callbackstructure.h>
6057 +#include <cppunit/cmdlinebits.hxx>
6059 +//! is this global CallbackStructure need?
6060 +CallbackStructure aGlobalStructure;
6061 +CmdLineBits st_nBits;
6063 +FktPtr_CallbackDispatch pCallbackFunc = NULL;
6065 +// This function is called from the TestShl tool.
6066 +extern "C" void SAL_CALL registerAllTestFunction(CallbackStructure* _pCallback)
6068 + aGlobalStructure = *_pCallback;
6070 + st_nBits = aGlobalStructure.nBits;
6072 + pCallbackFunc = _pCallback->aCallbackDispatch;
6073 + FktRegFuncPtr pFunc = _pCallback->aRegisterFunction;
6074 + if (pFunc)
6076 + RegisterTestFunctions(pFunc);
6078 + else
6080 + // error, should be echoed
6081 + fprintf(stderr, "error: Callback Structure doesn't contain a test function ptr.\n");
6084 + // all is done, copy the magic value
6085 + // this is only a simple internal invariant check,
6086 + // if the called registerAllTestFunctions Function do, what we want.
6087 + _pCallback->nMagic2 = _pCallback->nMagic;
6089 Nur in misc/build/cppunit-1.8.0/src/cppunit: tresregister.cxx.dummy.
6090 --- misc/cppunit-1.8.0/src/cppunit/tresstatewrapper.cxx 2008-12-10 20:46:09.345773546 +0100
6091 +++ misc/build/cppunit-1.8.0/src/cppunit/tresstatewrapper.cxx 2008-12-10 20:42:43.000000000 +0100
6092 @@ -1 +1,168 @@
6093 -dummy
6094 +/*************************************************************************
6096 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6097 + *
6098 + * Copyright 2008 by Sun Microsystems, Inc.
6100 + * OpenOffice.org - a multi-platform office productivity suite
6102 + * $RCSfile$
6103 + * $Revision$
6105 + * This file is part of OpenOffice.org.
6107 + * OpenOffice.org is free software: you can redistribute it and/or modify
6108 + * it under the terms of the GNU Lesser General Public License version 3
6109 + * only, as published by the Free Software Foundation.
6111 + * OpenOffice.org is distributed in the hope that it will be useful,
6112 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
6113 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6114 + * GNU Lesser General Public License version 3 for more details
6115 + * (a copy is included in the LICENSE file that accompanied this code).
6117 + * You should have received a copy of the GNU Lesser General Public License
6118 + * version 3 along with OpenOffice.org. If not, see
6119 + * <http://www.openoffice.org/license.html>
6120 + * for a copy of the LGPLv3 License.
6122 + ************************************************************************/
6124 +// MARKER(update_precomp.py): autogen include statement, do not remove
6125 +// #include "precompiled_cppunit.hxx"
6127 +// this functions build the wrapper, to handle old function calls to rtl_tres_state
6128 +// IMPORTANT: Due to the fact that rtl_tres_state is in the sal.lib
6129 +// you have to rename rtl_tres_state to c_rtl_tres_state
6131 +// return c_rtl_tres_state
6132 +// (
6133 +// hRtlTestResult,
6134 +// pData->length == 0 &&
6135 +// ! *pData->buffer,
6136 +// "New OString containing no characters",
6137 +// "ctor_001"
6138 +// )
6140 +#include <stdlib.h>
6141 +#include <stdio.h>
6142 +#include <string.h>
6143 +#include "cppunit/Test.h"
6144 +#include "cppunit/autoregister/htestresult.h"
6145 +#include "cppunit/autoregister/callbackfunc_fktptr.h"
6146 +#include "cppunit/TestAssert.h"
6148 +#define LOAD_TRESSTATEWRAPPER_LOCAL
6149 +#include "testshl/tresstatewrapper.hxx"
6150 +#undef LOAD_TRESSTATEWRAPPER_LOCAL
6152 +#include "cppunit/tagvalues.hxx"
6153 +#include "cppunit/externcallbackfunc.hxx"
6155 +// -----------------------------------------------------------------------------
6156 +// Wrapper class for the CppUnit::Test, because the new TestResult
6157 +// expect a CppUnit::Test interface
6159 +class WrappedTest : public CppUnit::Test
6161 + std::string m_sName;
6162 +public:
6163 + WrappedTest(std::string const& _sName)
6164 + :m_sName(_sName){}
6166 + virtual ~WrappedTest () {}
6167 + virtual void run (hTestResult /*pResult*/){}
6168 + virtual int countTestCases () const {return 1;}
6169 + virtual std::string getName () const {return m_sName;}
6170 + virtual std::string toString () const {return "WrappedTest";}
6173 +// -----------------------------------------------------------------------------
6174 +rtl_tres_state_start::rtl_tres_state_start(hTestResult _aResult, const sal_Char* _pName)
6175 + :m_pName(_pName),
6176 + m_aResult(_aResult)
6178 + // (pTestResult_EnterNode)(m_aResult, m_pName);
6179 + (pCallbackFunc)( 0 /* NULL */, TAG_TYPE, RESULT_ENTER_NODE, TAG_RESULT_PTR, m_aResult, TAG_NODENAME, m_pName, TAG_DONE);
6181 +rtl_tres_state_start::~rtl_tres_state_start()
6183 + // (pTestResult_LeaveNode)(m_aResult, m_pName);
6184 + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_LEAVE_NODE, TAG_RESULT_PTR, m_aResult, TAG_NODENAME, m_pName, TAG_DONE);
6187 +// --------------------------------- C-Wrapper ---------------------------------
6188 +typedef std::vector<rtl_tres_state_start*> rtl_tres_states;
6189 +rtl_tres_states m_StateStack;
6191 +extern "C" void c_rtl_tres_state_start(hTestResult _aResult, const sal_Char* _pName)
6193 + rtl_tres_state_start* pState = new rtl_tres_state_start(_aResult, _pName);
6194 + m_StateStack.push_back(pState);
6197 +extern "C" void c_rtl_tres_state_end(hTestResult, const sal_Char*)
6199 + rtl_tres_state_start* pState = m_StateStack.back();
6201 + delete pState;
6202 + m_StateStack.pop_back();
6204 +// -----------------------------------------------------------------------------
6205 +// -----------------------------------------------------------------------------
6206 +// -----------------------------------------------------------------------------
6208 +// -----------------------------------------------------------------------------
6209 +// ------------------------- Wrapper for rtl_tres_state -------------------------
6210 +// -----------------------------------------------------------------------------
6212 +sal_Bool SAL_CALL c_rtl_tres_state(
6213 + hTestResult pResult,
6214 + sal_Bool bSuccess,
6215 + char const * pTestMsg,
6216 + char const * pFuncName)
6218 + CppUnit::Test* pTest = new WrappedTest(pFuncName);
6220 + sal_Int32 nValue = (pCallbackFunc)(0 /* NULL */, TAG_TYPE, EXECUTION_CHECK, TAG_RESULT_PTR, pResult, TAG_NODENAME, pTest->getName().c_str(), TAG_DONE);
6221 + if (nValue == DO_NOT_EXECUTE)
6223 + return false;
6226 + // This code is copied from CppUnit::TestCase and less adapted, to work with the
6227 + // old test code.
6228 + // (pTestResult_StartTest)(pResult, pTest);
6229 + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_START, TAG_RESULT_PTR, pResult, TAG_TEST_PTR, pTest, TAG_DONE);
6231 + try
6233 + CPPUNIT_ASSERT_MESSAGE( pTestMsg, bSuccess ? true : false );
6234 + // (pTestResult_AddInfo)(pResult, pTest, "#PASSED#");
6235 + (pCallbackFunc)(0 /* NULL */, TAG_TYPE, RESULT_ADD_INFO, TAG_RESULT_PTR, pResult, TAG_TEST_PTR, pTest, TAG_INFO, "PASSED", TAG_DONE);
6237 + catch ( CppUnit::Exception &e )
6239 + CppUnit::Exception *copy = e.clone();
6240 + // (pTestResult_AddFailure)( pResult, pTest, copy );
6241 + (pCallbackFunc)( 0 /* NULL */, TAG_TYPE, RESULT_ADD_FAILURE, TAG_RESULT_PTR, pResult, TAG_TEST_PTR, pTest, TAG_EXCEPTION, copy, TAG_DONE );
6243 + catch ( std::exception &e )
6245 + //(pTestResult_AddError)( pResult, pTest, new CppUnit::Exception( e.what() ) );
6246 + (pCallbackFunc)( 0 /* NULL */, TAG_TYPE, RESULT_ADD_ERROR, TAG_RESULT_PTR, pResult, TAG_TEST_PTR, pTest, TAG_EXCEPTION, new CppUnit::Exception( e.what() ), TAG_DONE );
6248 + catch (...)
6250 + CppUnit::Exception *e = new CppUnit::Exception( "caught unknown exception" );
6251 + // (pTestResult_AddError)( pResult, pTest, e );
6252 + (pCallbackFunc)( 0 /* NULL */, TAG_TYPE, RESULT_ADD_ERROR, TAG_RESULT_PTR, pResult, TAG_TEST_PTR, pTest, TAG_EXCEPTION, e, TAG_DONE );
6256 + // (pTestResult_EndTest)( pResult, pTest );
6257 + (pCallbackFunc)( 0 /* NULL */, TAG_TYPE, RESULT_END, TAG_RESULT_PTR, pResult, TAG_TEST_PTR, pTest, TAG_DONE );
6259 + return bSuccess;
6262 Nur in misc/build/cppunit-1.8.0/src/cppunit: tresstatewrapper.cxx.dummy.
6263 --- misc/cppunit-1.8.0/src/makefile.mk 2008-12-10 20:46:08.706925653 +0100
6264 +++ misc/build/cppunit-1.8.0/src/makefile.mk 2008-12-09 08:57:10.000000000 +0100
6265 @@ -1 +1,35 @@
6266 -dummy
6267 +#*************************************************************************
6269 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6271 +# Copyright 2008 by Sun Microsystems, Inc.
6273 +# OpenOffice.org - a multi-platform office productivity suite
6275 +# $RCSfile$
6277 +# $Revision$
6279 +# This file is part of OpenOffice.org.
6281 +# OpenOffice.org is free software: you can redistribute it and/or modify
6282 +# it under the terms of the GNU Lesser General Public License version 3
6283 +# only, as published by the Free Software Foundation.
6285 +# OpenOffice.org is distributed in the hope that it will be useful,
6286 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
6287 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6288 +# GNU Lesser General Public License version 3 for more details
6289 +# (a copy is included in the LICENSE file that accompanied this code).
6291 +# You should have received a copy of the GNU Lesser General Public License
6292 +# version 3 along with OpenOffice.org. If not, see
6293 +# <http://www.openoffice.org/license.html>
6294 +# for a copy of the LGPLv3 License.
6296 +#*************************************************************************
6298 +target:
6299 + cd cppunit && $(MAKE) $(MFLAGS) $(CALLMACROS)
6300 + cd result && $(MAKE) $(MFLAGS) $(CALLMACROS)
6301 + cd win32 && $(MAKE) $(MFLAGS) $(CALLMACROS)
6302 Nur in misc/build/cppunit-1.8.0/src: makefile.mk.dummy.
6303 --- misc/cppunit-1.8.0/src/result/SynchronizedObject.cpp 2008-12-10 20:46:05.438373643 +0100
6304 +++ misc/build/cppunit-1.8.0/src/result/SynchronizedObject.cpp 2008-02-27 17:26:28.000000000 +0100
6305 @@ -1 +1,35 @@
6306 -dummy
6307 +#include <cppunit/result/SynchronizedObject.h>
6310 +namespace CppUnit
6316 +SynchronizedObject::SynchronizedObject( SynchronizationObject *syncObject )
6317 + : m_syncObject( syncObject == 0 ? new SynchronizationObject() :
6318 + syncObject )
6323 +SynchronizedObject::~SynchronizedObject()
6325 + delete m_syncObject;
6329 +/** Accept a new synchronization object for protection of this instance
6330 + * TestResult assumes ownership of the object
6331 + */
6332 +void
6333 +SynchronizedObject::setSynchronizationObject( SynchronizationObject *syncObject )
6335 + delete m_syncObject;
6336 + m_syncObject = syncObject;
6340 +} // namespace CppUnit
6342 Nur in misc/build/cppunit-1.8.0/src/result: SynchronizedObject.cpp.dummy.
6343 --- misc/cppunit-1.8.0/src/result/TestResult.cpp 2008-12-10 20:46:05.577200921 +0100
6344 +++ misc/build/cppunit-1.8.0/src/result/TestResult.cpp 2008-12-10 20:42:45.000000000 +0100
6345 @@ -1 +1,261 @@
6346 -dummy
6347 +#include <cppunit/TestFailure.h>
6348 +#include <cppunit/result/TestListener.h>
6349 +#include "testshl/getopt.hxx"
6350 +#include <cppunit/result/TestResult.h>
6351 +#include <algorithm>
6352 +#include "cppunit/result/outputter.hxx"
6353 +#include <cppunit/Test.h>
6354 +#include <cppunit/cmdlinebits.hxx>
6356 +namespace CppUnit {
6358 +/// Construct a TestResult
6359 +TestResult::TestResult( GetOpt &_pOptions, SynchronizationObject *syncObject )
6360 + : SynchronizedObject( syncObject ),
6361 + m_aOptionHelper(_pOptions),
6362 + m_nExitValue(0)
6364 + reset();
6368 +/// Destroys a test result
6369 +TestResult::~TestResult()
6374 +/** Resets the result for a new run.
6376 + * Clear the previous run result.
6377 + */
6378 +void
6379 +TestResult::reset()
6381 + ExclusiveZone zone( m_syncObject );
6382 + m_stop = false;
6386 +/** Adds an error to the list of errors.
6387 + * The passed in exception
6388 + * caused the error
6389 + */
6390 +void
6391 +TestResult::addError( Test *test,
6392 + Exception *e, ErrorType::num _eType )
6394 + TestFailure aTestFailure( test, e, _eType );
6395 + addFailure( aTestFailure );
6399 +/** Adds a failure to the list of failures. The passed in exception
6400 + * caused the failure.
6401 + */
6402 +void
6403 +TestResult::addFailure( Test *test, Exception *e )
6405 + TestFailure aTestFailure( test, e, ErrorType::ET_FAILURE );
6406 + addFailure( aTestFailure );
6410 +/** Called to add a failure to the list of failures.
6411 + */
6412 +void
6413 +TestResult::addFailure( const TestFailure &failure )
6415 + ExclusiveZone zone( m_syncObject );
6417 + // LLA:
6418 + // this set the global returnvalue, due to the fact, there occurs a failure, we have to return a non zero value
6419 + // at the moment this seams to be a good place.
6420 + setExitValue(1);
6422 + for ( TestListeners::iterator it = m_listeners.begin();
6423 + it != m_listeners.end();
6424 + ++it )
6426 + TestListener *pListener = *it;
6427 + pListener->addFailure( failure );
6432 +/// Informs the result that a test will be started.
6433 +void
6434 +TestResult::startTest( Test *test )
6436 + ExclusiveZone zone( m_syncObject );
6437 + if (m_aOptionHelper.isVerbose())
6439 + std::string aStr;
6440 + if (test)
6442 + aStr = getNodeName();
6443 + aStr += ".";
6444 + aStr += test->getName();
6446 + // fprintf(stderr, "Start test: %s\n", aStr.c_str());
6447 + t_print( T_VERBOSE, "Start test: %s\n", aStr.c_str());
6450 + for ( TestListeners::iterator it = m_listeners.begin();
6451 + it != m_listeners.end();
6452 + ++it )
6454 + TestListener *pListener = *it;
6455 + pListener->startTest( test );
6460 +/// Informs the result that a test was completed.
6461 +void
6462 +TestResult::endTest( Test *test )
6464 + ExclusiveZone zone( m_syncObject );
6465 + for ( TestListeners::iterator it = m_listeners.begin();
6466 + it != m_listeners.end();
6467 + ++it )
6469 + TestListener *pListener = *it;
6470 + pListener->endTest( test );
6475 +/// Returns whether testing should be stopped
6476 +bool
6477 +TestResult::shouldStop() const
6479 + ExclusiveZone zone( m_syncObject );
6480 + return m_stop;
6484 +/// Stop testing
6485 +void
6486 +TestResult::stop()
6488 + ExclusiveZone zone( m_syncObject );
6489 + m_stop = true;
6493 +void
6494 +TestResult::addListener( TestListener *listener )
6496 + ExclusiveZone zone( m_syncObject );
6497 + m_listeners.push_back( listener );
6501 +void
6502 +TestResult::removeListener ( TestListener *listener )
6504 + ExclusiveZone zone( m_syncObject );
6505 +#if defined(_MSC_VER) && (_MSC_VER >=1400)
6506 + m_listeners.erase( remove( m_listeners.begin(),
6507 +#else
6508 + m_listeners.erase( std::remove( m_listeners.begin(),
6509 +#endif
6510 + m_listeners.end(),
6511 + listener ),
6512 + m_listeners.end());
6515 +void
6516 +TestResult::addInfo(Test *test, const char* _aStr)
6518 + ExclusiveZone zone( m_syncObject );
6519 + for ( TestListeners::iterator it = m_listeners.begin();
6520 + it != m_listeners.end();
6521 + ++it )
6523 + TestListener *pListener = *it;
6524 + pListener->addInfo( test, _aStr );
6528 +// old: void
6529 +// old: TestResult::enterNode(const char* _aStr)
6530 +// old: {
6531 +// old: ExclusiveZone zone( m_syncObject );
6532 +// old: for ( TestListeners::iterator it = m_listeners.begin();
6533 +// old: it != m_listeners.end();
6534 +// old: ++it )
6535 +// old: {
6536 +// old: TestListener *pListener = *it;
6537 +// old: pListener->enterNode( _aStr );
6538 +// old: }
6539 +// old: }
6540 +// old:
6541 +// old: void
6542 +// old: TestResult::leaveNode(const char* _aStr)
6543 +// old: {
6544 +// old: ExclusiveZone zone( m_syncObject );
6545 +// old:
6546 +// old: for ( TestListeners::iterator it = m_listeners.begin();
6547 +// old: it != m_listeners.end();
6548 +// old: ++it )
6549 +// old: {
6550 +// old: TestListener *pListener = *it;
6551 +// old: pListener->leaveNode( _aStr );
6552 +// old: }
6553 +// old: }
6555 +void TestResult::enterNode(const char* _sNode)
6557 + ExclusiveZone zone( m_syncObject );
6558 + m_aCurrentNodeNames.push_back(std::string(_sNode));
6561 +void TestResult::leaveNode(const char* /*_sNode*/)
6563 + ExclusiveZone zone( m_syncObject );
6564 + std::string sBack = m_aCurrentNodeNames.back();
6565 + m_aCurrentNodeNames.pop_back();
6567 + // due to a -Wall warning, comment out.
6568 + // if (sBack != std::string(_sNode))
6569 + // {
6570 + // volatile int dummy = 0;
6571 + // // problem?!
6572 + // }
6575 +std::string TestResult::getNodeName()
6577 + std::string sName;
6578 + for (std::vector<std::string>::const_iterator it = m_aCurrentNodeNames.begin();
6579 + it != m_aCurrentNodeNames.end();
6580 + ++it)
6582 + if (sName.size() != 0)
6584 + sName += ".";
6586 + sName += *it;
6588 + return sName;
6591 +// -----------------------------------------------------------------------------
6592 +bool TestResult::isAllowedToExecute(std::string const& _sName)
6594 + return m_aOptionHelper.isAllowedToExecute(getNodeName(), _sName);
6596 +// -----------------------------------------------------------------------------
6597 +bool TestResult::isOptionWhereAmI()
6599 + return m_aOptionHelper.isOptionWhereAmI();
6602 +// -----------------------------------------------------------------------------
6603 +void TestResult::print(Outputter&)
6607 +} // namespace CppUnit
6608 Nur in misc/build/cppunit-1.8.0/src/result: TestResult.cpp.dummy.
6609 --- misc/cppunit-1.8.0/src/result/TestResultCollector.cpp 2008-12-10 20:46:05.532229436 +0100
6610 +++ misc/build/cppunit-1.8.0/src/result/TestResultCollector.cpp 2008-02-27 17:25:50.000000000 +0100
6611 @@ -1 +1,147 @@
6612 -dummy
6613 +#include <cppunit/TestFailure.h>
6614 +#include <cppunit/result/TestResultCollector.h>
6617 +namespace CppUnit
6621 +TestResultCollector::TestResultCollector( TestResult* _pResult, SynchronizationObject *syncObject )
6622 + : TestSucessListener( syncObject ),
6623 + m_pResult(_pResult),
6624 + m_testErrors(0)
6626 + reset();
6630 +TestResultCollector::~TestResultCollector()
6632 + TestFailures::iterator itFailure = m_failures.begin();
6633 + while ( itFailure != m_failures.end() )
6635 + TestFailureEnvelope *pEnvelope = *itFailure++;
6636 + TestFailure *pFailure = pEnvelope->getTestFailure();
6637 + delete pFailure;
6642 +void
6643 +TestResultCollector::reset()
6645 + TestSucessListener::reset();
6647 + ExclusiveZone zone( m_syncObject );
6648 + m_testErrors = 0;
6649 + m_tests.clear();
6650 + m_failures.clear();
6654 +void
6655 +TestResultCollector::startTest( Test *test )
6657 + ExclusiveZone zone (m_syncObject);
6659 + m_tests.push_back( new TestEnvelope(test, m_pResult->getNodeName()) );
6662 +void
6663 +TestResultCollector::endTest( Test * )
6665 + // ExclusiveZone zone (m_syncObject);
6666 + // Nothing!
6670 +void
6671 +TestResultCollector::addFailure( const TestFailure &failure )
6673 + TestSucessListener::addFailure( failure );
6675 + ExclusiveZone zone( m_syncObject );
6676 + if ( failure.isError() )
6677 + ++m_testErrors;
6678 + m_failures.push_back( new TestFailureEnvelope(failure.clone(), m_pResult->getNodeName()) );
6682 +/// Gets the number of run tests.
6683 +int
6684 +TestResultCollector::runTests() const
6686 + ExclusiveZone zone( m_syncObject );
6687 + return m_tests.size();
6691 +/// Gets the number of detected errors (uncaught exception).
6692 +int
6693 +TestResultCollector::testErrors() const
6695 + ExclusiveZone zone( m_syncObject );
6696 + return m_testErrors;
6700 +/// Gets the number of detected failures (failed assertion).
6701 +int
6702 +TestResultCollector::testFailures() const
6704 + ExclusiveZone zone( m_syncObject );
6705 + return m_failures.size() - m_testErrors;
6709 +/// Gets the total number of detected failures.
6710 +int
6711 +TestResultCollector::testFailuresTotal() const
6713 + ExclusiveZone zone( m_syncObject );
6714 + return m_failures.size();
6718 +/// Returns a the list failures (random access collection).
6719 +const TestResultCollector::TestFailures &
6720 +TestResultCollector::failures() const
6722 + ExclusiveZone zone( m_syncObject );
6723 + return m_failures;
6727 +const TestResultCollector::Tests &
6728 +TestResultCollector::tests() const
6730 + ExclusiveZone zone( m_syncObject );
6731 + return m_tests;
6734 +void TestResultCollector::addInfo(Test *_pTest, const char* _sInfo)
6736 + ExclusiveZone zone( m_syncObject );
6737 + m_aInfos.push_back(new TestInfo(_pTest, _sInfo));
6740 +std::string TestResultCollector::getInfo(Test *_pTest)
6742 + for (TestInfos::const_iterator it = m_aInfos.begin();
6743 + it != m_aInfos.end();
6744 + ++it)
6746 + TestInfo *pInfo = *it;
6747 + Test *pTest = pInfo->getTest();
6748 + if (pTest == _pTest)
6750 + std::string sInfo = pInfo->getString();
6751 + return sInfo;
6754 + return std::string();
6758 +} // namespace CppUnit
6760 Nur in misc/build/cppunit-1.8.0/src/result: TestResultCollector.cpp.dummy.
6761 --- misc/cppunit-1.8.0/src/result/TestSucessListener.cpp 2008-12-10 20:46:05.660884351 +0100
6762 +++ misc/build/cppunit-1.8.0/src/result/TestSucessListener.cpp 2008-02-27 17:26:16.000000000 +0100
6763 @@ -1 +1,46 @@
6764 -dummy
6765 +#include <cppunit/result/TestSucessListener.h>
6769 +namespace CppUnit
6773 +TestSucessListener::TestSucessListener( SynchronizationObject *syncObject )
6774 + : SynchronizedObject( syncObject )
6775 + , m_sucess( true )
6780 +TestSucessListener::~TestSucessListener()
6785 +void
6786 +TestSucessListener::reset()
6788 + ExclusiveZone zone( m_syncObject );
6789 + m_sucess = true;
6793 +void
6794 +TestSucessListener::addFailure( const TestFailure & )
6796 + ExclusiveZone zone( m_syncObject );
6797 + m_sucess = false;
6801 +bool
6802 +TestSucessListener::wasSuccessful() const
6804 + ExclusiveZone zone( m_syncObject );
6805 + return m_sucess;
6809 +} // namespace CppUnit
6811 Nur in misc/build/cppunit-1.8.0/src/result: TestSucessListener.cpp.dummy.
6812 --- misc/cppunit-1.8.0/src/result/TextTestResult.cpp 2008-12-10 20:46:05.742386241 +0100
6813 +++ misc/build/cppunit-1.8.0/src/result/TextTestResult.cpp 2008-02-27 17:24:56.000000000 +0100
6814 @@ -1 +1,191 @@
6815 -dummy
6816 +#include <cppunit/Exception.h>
6817 +#include <cppunit/NotEqualException.h>
6818 +#include <cppunit/Test.h>
6819 +#include <cppunit/TestFailure.h>
6820 +#include <cppunit/result/TextTestResult.h>
6821 +// #include <TextTestResult.h>
6822 +//!io #include <iostream>
6824 +namespace CppUnit {
6827 +TextTestResult::TextTestResult(GetOpt& _aOptions)
6828 + :TestResult(_aOptions),
6829 + m_aResulter(this)
6831 + addListener( &m_aResulter );
6835 +void
6836 +TextTestResult::addFailure( const TestFailure &failure )
6838 + TestResult::addFailure( failure );
6839 + // std::cerr << ( failure.isError() ? "E" : "F" );
6840 + if (failure.isError())
6841 + fprintf(stderr, "E");
6842 + else
6843 + fprintf(stderr, "F");
6847 +void
6848 +TextTestResult::startTest( Test *test )
6850 + TestResult::startTest (test);
6851 + // std::cerr << ".";
6852 + fprintf(stderr, ".");
6855 +void TextTestResult::endTest( Test *test )
6857 + TestResult::endTest (test);
6861 +void
6862 +TextTestResult::printFailures( std::ostream &stream )
6864 + TestResultCollector::TestFailures::const_iterator itFailure = m_aResulter.failures().begin();
6865 + int failureNumber = 1;
6866 + while ( itFailure != m_aResulter.failures().end() )
6868 + stream << std::endl;
6869 + TestFailure *pFailure= (*itFailure++)->getTestFailure();
6870 + printFailure( pFailure, failureNumber++, stream );
6875 +void
6876 +TextTestResult::printFailure( TestFailure *failure,
6877 + int failureNumber,
6878 + std::ostream &stream )
6880 + printFailureListMark( failureNumber, stream );
6881 + stream << ' ';
6882 + printFailureTestName( failure, stream );
6883 + stream << ' ';
6884 + printFailureType( failure, stream );
6885 + stream << ' ';
6886 + printFailureLocation( failure->sourceLine(), stream );
6887 + stream << std::endl;
6888 + printFailureDetail( failure->thrownException(), stream );
6889 + stream << std::endl;
6893 +void
6894 +TextTestResult::printFailureListMark( int failureNumber,
6895 + std::ostream &stream )
6897 + stream << failureNumber << ")";
6901 +void
6902 +TextTestResult::printFailureTestName( TestFailure *failure,
6903 + std::ostream &stream )
6905 + Test* pTest = failure->failedTest();
6906 + stream << "test: " << pTest->getName();
6910 +void
6911 +TextTestResult::printFailureType( TestFailure *failure,
6912 + std::ostream &stream )
6914 + stream << "("
6915 + << (failure->isError() ? "E" : "F")
6916 + << ")";
6920 +void
6921 +TextTestResult::printFailureLocation( SourceLine sourceLine,
6922 + std::ostream &stream )
6924 + if ( !sourceLine.isValid() )
6925 + return;
6927 + stream << "line: " << sourceLine.lineNumber()
6928 + << ' ' << sourceLine.fileName();
6932 +void
6933 +TextTestResult::printFailureDetail( Exception *thrownException,
6934 + std::ostream &stream )
6936 + if ( thrownException->isInstanceOf( NotEqualException::type() ) )
6938 + NotEqualException *e = (NotEqualException*)thrownException;
6939 + stream << "expected: " << e->expectedValue() << std::endl
6940 + << "but was: " << e->actualValue();
6941 + if ( !e->additionalMessage().empty() )
6943 + stream << std::endl;
6944 + stream << "additional message:" << std::endl
6945 + << e->additionalMessage();
6948 + else
6950 + stream << " \"" << thrownException->what() << "\"";
6955 +void
6956 +TextTestResult::print( std::ostream& stream )
6958 + printHeader( stream );
6959 + stream << std::endl;
6960 + printFailures( stream );
6964 +void
6965 +TextTestResult::printHeader( std::ostream &stream )
6967 + if (m_aResulter.wasSuccessful ())
6968 + stream << std::endl << "OK (" << m_aResulter.runTests () << " tests)"
6969 + << std::endl;
6970 + else
6972 + stream << std::endl;
6973 + printFailureWarning( stream );
6974 + printStatistics( stream );
6979 +void
6980 +TextTestResult::printFailureWarning( std::ostream &stream )
6982 + stream << "!!!FAILURES!!!" << std::endl;
6986 +void
6987 +TextTestResult::printStatistics( std::ostream &stream )
6989 + stream << "Test Results:" << std::endl;
6991 + stream << "Run: " << m_aResulter.runTests()
6992 + << " Failures: " << m_aResulter.testFailures()
6993 + << " Errors: " << m_aResulter.testErrors()
6994 + << std::endl;
6998 +std::ostream &
6999 +operator <<( std::ostream &stream,
7000 + TextTestResult &result )
7002 + result.print (stream); return stream;
7006 +} // namespace CppUnit
7007 Nur in misc/build/cppunit-1.8.0/src/result: TextTestResult.cpp.dummy.
7008 --- misc/cppunit-1.8.0/src/result/emacsTestResult.cxx 2008-12-10 20:46:09.419267625 +0100
7009 +++ misc/build/cppunit-1.8.0/src/result/emacsTestResult.cxx 2008-12-09 09:06:11.000000000 +0100
7010 @@ -1 +1,193 @@
7011 -dummy
7012 +/*************************************************************************
7014 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7015 + *
7016 + * Copyright 2008 by Sun Microsystems, Inc.
7018 + * OpenOffice.org - a multi-platform office productivity suite
7020 + * $RCSfile$
7021 + * $Revision$
7023 + * This file is part of OpenOffice.org.
7025 + * OpenOffice.org is free software: you can redistribute it and/or modify
7026 + * it under the terms of the GNU Lesser General Public License version 3
7027 + * only, as published by the Free Software Foundation.
7029 + * OpenOffice.org is distributed in the hope that it will be useful,
7030 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7031 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7032 + * GNU Lesser General Public License version 3 for more details
7033 + * (a copy is included in the LICENSE file that accompanied this code).
7035 + * You should have received a copy of the GNU Lesser General Public License
7036 + * version 3 along with OpenOffice.org. If not, see
7037 + * <http://www.openoffice.org/license.html>
7038 + * for a copy of the LGPLv3 License.
7040 + ************************************************************************/
7042 +// MARKER(update_precomp.py): autogen include statement, do not remove
7043 +// #include "precompiled_cppunit.hxx"
7045 +#include <stdlib.h>
7047 +#include <map>
7048 +#include <cppunit/Exception.h>
7049 +#include <cppunit/NotEqualException.h>
7050 +#include <cppunit/Test.h>
7051 +#include <cppunit/TestFailure.h>
7052 +#include <cppunit/result/emacsTestResult.hxx>
7053 +// #include <TextTestResult.h>
7054 +//!io #include <iostream>
7055 +#include <string>
7057 +#include <rtl/string.hxx>
7058 +#include "cppunit/result/outputter.hxx"
7060 +namespace CppUnit {
7062 + emacsTestResult::emacsTestResult(GetOpt & _aOptions)
7063 + :TestResult(_aOptions),
7064 + m_aOptions(_aOptions),
7065 + m_aResulter(this)
7067 + addListener( &m_aResulter );
7070 + //# struct ltstr
7071 + //# {
7072 + //# bool operator()(const CppUnit::Test* p1, const CppUnit::Test* p2) const
7073 + //# {
7074 + //# return p1 < p2;
7075 + //# }
7076 + //# };
7077 + //# typedef std::map<CppUnit::Test*, bool, ltstr> TestPtrList;
7079 + void
7080 + emacsTestResult::print( Outputter& stream )
7082 + printHeader( stream );
7083 + // stream << std::endl;
7084 + // printFailures( stream );
7086 + // TestPtrList aFailedTests;
7088 + for (TestResultCollector::TestFailures::const_iterator it2 = m_aResulter.failures().begin();
7089 + it2 != m_aResulter.failures().end();
7090 + ++it2)
7092 + TestFailureEnvelope *pEnvelop = *it2;
7093 + TestFailure *pFailure = pEnvelop->getTestFailure();
7094 + std::string sNodeName = pEnvelop->getString();
7096 + // aFailedTests[ pFailure->failedTest() ] = true;
7098 + printFailureLine(stream, pFailure, sNodeName);
7101 + // only errors are from interest here
7102 + //# for (TestResultCollector::Tests::const_iterator it = m_aResulter.tests().begin();
7103 + //# it != m_aResulter.tests().end();
7104 + //# ++it)
7105 + //# {
7106 + //# TestEnvelope *pEnvelop = *it;
7107 + //# Test* pTest = pEnvelop->getTest();
7108 + //# std::string sNodeName = pEnvelop->getString();
7109 + //#
7110 + //# if (aFailedTests.find(pTest) == aFailedTests.end())
7111 + //# {
7112 + //# std::string sInfo = m_aResulter.getInfo(pTest);
7113 + //# printTestLine(stream, pTest, sNodeName, sInfo);
7114 + //# }
7115 + //# }
7116 + stream << "Test #PASSED#" << Outputter::endl();
7120 + void
7121 + emacsTestResult::printHeader( Outputter &stream )
7123 + std::string sDate(m_aOptionHelper.createDateTag());
7124 + stream << sDate << Outputter::endl();
7127 + void
7128 + emacsTestResult::printFailureLine( Outputter &stream, TestFailure *_pFailure, std::string const& _sNodeName)
7130 + std::string aName;
7131 + aName += _sNodeName;
7132 + aName += ".";
7133 + aName += _pFailure->failedTestName();
7135 + SourceLine aLine = _pFailure->sourceLine();
7136 + sal_Int32 nLine = -1;
7137 + std::string sFilename;
7138 + if (aLine.isValid())
7140 + nLine = aLine.lineNumber();
7141 + sFilename = aLine.fileName();
7144 + Exception *pExp = _pFailure->thrownException();
7145 + std::string sWhat;
7146 + if (pExp)
7148 + sWhat = pExp->what();
7151 + stream << sFilename;
7152 + stream << ":";
7153 + stream << nLine;
7154 + stream << ":";
7156 + stream << aName;
7157 + stream << ";#FAILED#";
7158 + // ErrorType::num eErr = _pFailure->getErrorType();
7159 + //# if (isErr)
7160 + //# stream << "FAILED#;";
7161 + //# else
7162 + //# stream << "ERROR#;";
7164 + stream << sWhat;
7165 + stream << Outputter::endl();
7168 + //# void
7169 + //# emacsTestResult::printTestLine( Outputter &stream, Test* _pTest, std::string const& _sNodeName, std::string const& _sInfo)
7170 + //# {
7171 + //# std::string aName;
7172 + //# aName += _sNodeName;
7173 + //# aName += ".";
7174 + //# aName += _pTest->getName();
7175 + //#
7176 + //# stream << aName;
7177 + //# stream << ";";
7178 + //# stream << _sInfo << "#";
7179 + //# stream << "OK#";
7180 + //# stream << std::endl;
7181 + //# }
7184 +//# void
7185 +//# emacsTestResult::printStatistics( Outputter &stream )
7186 +//# {
7187 +//# stream << "Test Results:" << std::endl;
7188 +//#
7189 +//# stream << "Run: " << runTests()
7190 +//# << " Failures: " << testFailures()
7191 +//# << " Errors: " << testErrors()
7192 +//# << std::endl;
7193 +//# }
7196 + Outputter &
7197 + operator <<( Outputter &stream,
7198 + emacsTestResult &result )
7199 + {
7200 + result.print (stream); return stream;
7204 +} // namespace CppUnit
7205 Nur in misc/build/cppunit-1.8.0/src/result: emacsTestResult.cxx.dummy.
7206 --- misc/cppunit-1.8.0/src/result/log.cxx 2008-12-10 20:46:09.499346711 +0100
7207 +++ misc/build/cppunit-1.8.0/src/result/log.cxx 2008-12-10 20:42:45.000000000 +0100
7208 @@ -1 +1,125 @@
7209 -dummy
7210 +/*************************************************************************
7212 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7213 + *
7214 + * Copyright 2008 by Sun Microsystems, Inc.
7216 + * OpenOffice.org - a multi-platform office productivity suite
7218 + * $RCSfile$
7219 + * $Revision$
7221 + * This file is part of OpenOffice.org.
7223 + * OpenOffice.org is free software: you can redistribute it and/or modify
7224 + * it under the terms of the GNU Lesser General Public License version 3
7225 + * only, as published by the Free Software Foundation.
7227 + * OpenOffice.org is distributed in the hope that it will be useful,
7228 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7229 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7230 + * GNU Lesser General Public License version 3 for more details
7231 + * (a copy is included in the LICENSE file that accompanied this code).
7233 + * You should have received a copy of the GNU Lesser General Public License
7234 + * version 3 along with OpenOffice.org. If not, see
7235 + * <http://www.openoffice.org/license.html>
7236 + * for a copy of the LGPLv3 License.
7238 + ************************************************************************/
7240 +// MARKER(update_precomp.py): autogen include statement, do not remove
7241 +// #include "precompiled_cppunit.hxx"
7243 +#include "testshl/log.hxx"
7245 +// #include <hash_map>
7246 +// #include <list>
7247 +// #include <set>
7249 +using namespace std;
7251 +::osl::FileBase::RC Log::open( sal_Bool append ) {
7253 + ::osl::FileBase::RC ret;
7255 + if ( ! append ) {
7256 + ret = ::osl::File::remove( m_logurl );
7259 + if( m_logfile->open( OpenFlag_Write ) == ::osl::FileBase::E_NOENT ) {
7260 + ret = m_logfile->open( OpenFlag_Write | OpenFlag_Create );
7262 + else {
7263 + ret = m_logfile->setPos( Pos_End, 0 );
7265 + return ret;
7268 +::osl::FileBase::RC Log::write( const sal_Char* buf, sal_Bool v ) {
7269 + sal_uInt64 uBytes=0;
7270 + sal_uInt32 len = 0;
7271 + const sal_Char* ptr = buf;
7273 + if( ptr ) {
7274 + while( *ptr++ ) len++;
7277 + if ( v ) {
7278 + // cout << buf << flush;
7279 + printf("%s", buf);
7281 + return m_logfile->write( buf, len , uBytes );
7284 +::osl::FileBase::RC Log::write( const rtl::OString& buf, sal_Bool v ) {
7285 + sal_uInt64 uBytes=0;
7286 + if ( v ) {
7287 + // cout << buf.getStr() << flush;
7288 + printf("%s", buf.getStr());
7290 + return m_logfile->write( buf.getStr(), buf.getLength(), uBytes );
7293 +// LLA: due to a problem with sal/OUStingBuffer getLength() which isn't const, this
7294 +// is so not compilable.
7295 +::osl::FileBase::RC Log::write( rtl::OStringBuffer const& buf, sal_Bool v ) {
7296 + sal_uInt64 uBytes=0;
7297 + if ( v ) {
7298 + cout << buf.getStr() << flush;
7300 + return m_logfile->write( buf.getStr(), buf.getLength(), uBytes );
7303 +::osl::FileBase::RC Log::write( const rtl::OUString& buf,
7304 + rtl_TextEncoding tenc, sal_Bool v ) {
7305 + sal_uInt64 uBytes=0;
7306 + if ( ! tenc ) {
7307 + tenc = RTL_TEXTENCODING_ASCII_US;
7309 + rtl::OStringBuffer osbuf(
7310 + rtl::OUStringToOString( buf, tenc ).getStr() );
7312 + if ( v ) {
7313 + // cout << osbuf.getStr() << flush;
7314 + printf("%s", osbuf.getStr());
7316 + return m_logfile->write( osbuf.getStr(), osbuf.getLength(), uBytes );
7319 +Log &operator <<( Log &_aLog, const sal_Char * _sValue )
7321 + _aLog.write(_sValue); return _aLog;
7323 +Log &operator <<( Log &_aLog, rtl::OString const& _sValue )
7325 + _aLog.write(_sValue); return _aLog;
7327 +Log &operator <<( Log &_aLog, rtl::OUString const& _sValue )
7329 + _aLog.write(_sValue); return _aLog;
7331 +//! Log &operator <<( Log &_aLog, rtl::OStringBuffer const& _sValue )
7332 +//! {
7333 +//! _aLog.write(_sValue); return _aLog;
7334 +//! }
7335 Nur in misc/build/cppunit-1.8.0/src/result: log.cxx.dummy.
7336 --- misc/cppunit-1.8.0/src/result/makefile.mk 2008-12-10 20:46:09.542019008 +0100
7337 +++ misc/build/cppunit-1.8.0/src/result/makefile.mk 2008-12-10 20:23:07.000000000 +0100
7338 @@ -1 +1,88 @@
7339 -dummy
7340 +#*************************************************************************
7342 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7344 +# Copyright 2008 by Sun Microsystems, Inc.
7346 +# OpenOffice.org - a multi-platform office productivity suite
7348 +# $RCSfile$
7350 +# $Revision$
7352 +# This file is part of OpenOffice.org.
7354 +# OpenOffice.org is free software: you can redistribute it and/or modify
7355 +# it under the terms of the GNU Lesser General Public License version 3
7356 +# only, as published by the Free Software Foundation.
7358 +# OpenOffice.org is distributed in the hope that it will be useful,
7359 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
7360 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7361 +# GNU Lesser General Public License version 3 for more details
7362 +# (a copy is included in the LICENSE file that accompanied this code).
7364 +# You should have received a copy of the GNU Lesser General Public License
7365 +# version 3 along with OpenOffice.org. If not, see
7366 +# <http://www.openoffice.org/license.html>
7367 +# for a copy of the LGPLv3 License.
7369 +#*************************************************************************
7371 +PRJ=..$/..$/..$/..$/..$/..
7372 +INCEXT=..$/..$/include
7373 +# INCEXT=$(SOLARSRC)$/cppunit/$/$(INPATH)/$/misc$/build$/cppunit-1.8.0$/include
7374 +# PRJ=..$/..
7375 +# PRJINC=..$/..
7378 +PRJNAME=cppunit
7379 +TARGET=c5t_testresult
7380 +LIBTARGET=NO
7381 +ENABLE_EXCEPTIONS=TRUE
7382 +# ENABLE_RTTI=TRUE
7384 +# --- Settings -----------------------------------------------------
7386 +.INCLUDE : settings.mk
7388 +# --- Files --------------------------------------------------------
7390 +# CXXFILES = \
7391 +# querytemplate.cxx \
7392 +# stringhelper.cxx
7394 +# ENVCFLAGSCXX+=-DCPPUNIT_BUILD_DLL
7395 +SLOFILES = \
7396 + $(SLO)$/SynchronizedObject.obj \
7397 + $(SLO)$/TestResult.obj \
7398 + $(SLO)$/TestResultCollector.obj \
7399 + $(SLO)$/TestSucessListener.obj \
7400 + $(SLO)$/emacsTestResult.obj \
7401 + $(SLO)$/log.obj \
7402 + $(SLO)$/optionhelper.obj \
7403 + $(SLO)$/outputter.obj \
7404 + $(SLO)$/signal.obj \
7405 + $(SLO)$/testshlTestResult.obj \
7406 + $(SLO)$/treswrapper.obj
7408 +# currently unused
7409 +# $(SLO)$/TextTestResult.obj
7411 +LIB1TARGET= $(LB)$/$(TARGET).lib
7412 +LIB1OBJFILES= $(SLOFILES)
7414 +.IF "$(GUI)"=="WNT"
7415 +.IF "$(COM)"=="GCC"
7416 +LIB1ARCHIV=$(LB)$/lib$(TARGET)$(DLLPOSTFIX).a
7417 +.ENDIF
7418 +.ENDIF
7420 +.IF "$(GUI)" == "UNX"
7421 +LIB1ARCHIV=$(LB)$/lib$(TARGET)$(DLLPOSTFIX).a
7422 +.ENDIF
7424 +# --- Targets ------------------------------------------------------
7426 +.INCLUDE : target.mk
7428 Nur in misc/build/cppunit-1.8.0/src/result: makefile.mk.dummy.
7429 --- misc/cppunit-1.8.0/src/result/optionhelper.cxx 2008-12-10 20:46:09.615952197 +0100
7430 +++ misc/build/cppunit-1.8.0/src/result/optionhelper.cxx 2008-12-09 09:06:14.000000000 +0100
7431 @@ -1 +1,317 @@
7432 -dummy
7433 +/*************************************************************************
7435 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7436 + *
7437 + * Copyright 2008 by Sun Microsystems, Inc.
7439 + * OpenOffice.org - a multi-platform office productivity suite
7441 + * $RCSfile$
7442 + * $Revision$
7444 + * This file is part of OpenOffice.org.
7446 + * OpenOffice.org is free software: you can redistribute it and/or modify
7447 + * it under the terms of the GNU Lesser General Public License version 3
7448 + * only, as published by the Free Software Foundation.
7450 + * OpenOffice.org is distributed in the hope that it will be useful,
7451 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7452 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7453 + * GNU Lesser General Public License version 3 for more details
7454 + * (a copy is included in the LICENSE file that accompanied this code).
7456 + * You should have received a copy of the GNU Lesser General Public License
7457 + * version 3 along with OpenOffice.org. If not, see
7458 + * <http://www.openoffice.org/license.html>
7459 + * for a copy of the LGPLv3 License.
7461 + ************************************************************************/
7463 +// MARKER(update_precomp.py): autogen include statement, do not remove
7464 +// #include "precompiled_cppunit.hxx"
7466 +#include "cppunit/result/optionhelper.hxx"
7467 +// #include <sstream>
7468 +// #include <string>
7469 +#include <osl/time.h>
7470 +#include "cppunit/cmdlinebits.hxx"
7472 +// -----------------------------------------------------------------------------
7474 +namespace
7476 + void split( const rtl::OString& opt,
7477 + const rtl::OString& _sSeparator,
7478 + OStringList& optLine )
7480 + optLine.clear();
7481 + // const sal_Int32 cSetLen = cSet.getLength();
7482 + sal_Int32 index = 0;
7483 + sal_Int32 oldIndex = 0;
7485 + // sal_Int32 i;
7486 + // sal_Int32 j = 0;
7487 + while ( opt.getLength() > 0)
7489 + // for ( i = 0; i < cSetLen; i++ )
7490 + // {
7491 + index = opt.indexOf( _sSeparator, oldIndex);
7492 + if( index != -1 )
7494 + optLine.push_back( opt.copy( oldIndex, index - oldIndex ) );
7495 + oldIndex = index + _sSeparator.getLength();
7497 + // }
7498 + else // if (index == -1)
7500 + optLine.push_back( opt.copy( oldIndex ) );
7501 + break;
7504 + } ///< split
7506 + bool match(OStringList const& _aFilter, OStringList const& _aName)
7508 + OStringList::const_iterator aFilterIter = _aFilter.begin();
7509 + OStringList::const_iterator aValueIter = _aName.begin();
7511 + bool bMatch = false;
7513 + while (aFilterIter != _aFilter.end() && aValueIter != _aName.end())
7515 + rtl::OString sFilter = *aFilterIter;
7516 + rtl::OString sName = *aValueIter;
7518 + if (sFilter == sName)
7520 + bMatch = true;
7521 + ++aFilterIter;
7522 + ++aValueIter;
7524 + else if (sFilter == "*")
7526 + bMatch = true;
7527 + break;
7529 + else
7531 + // Filter does not match
7532 + bMatch = false;
7533 + break;
7536 + return bMatch;
7540 +/* static */
7541 +std::string OptionHelper::integerToAscii(sal_Int32 nValue)
7543 + sal_Char cBuf[30];
7544 + sal_Char *pBuf = cBuf;
7545 + sprintf(pBuf, "%d", static_cast<int>(nValue));
7546 +//# std::ostringstream sBuf;
7547 +//# sBuf << nValue;
7548 +// rtl::OString sStr;
7549 +// sStr = rtl::OString::valueOf(nValue);
7550 + return std::string(pBuf);
7553 +/* static */
7554 +// if a given String is less then 2 char, add a "0" in front.
7555 +std::string OptionHelper::twoDigits(std::string const& _sValue)
7557 + std::string sBack;
7558 + if (_sValue.length() == 0)
7560 + sBack = "00";
7562 + else if (_sValue.length() == 1)
7564 + sBack = "0";
7565 + sBack += _sValue;
7567 + else
7569 + sBack = _sValue;
7571 + return sBack;
7575 +std::string OptionHelper::createDateTag(std::string const& _sProjectId, std::string const& _sBuildId)
7577 + TimeValue tmv_system;
7578 + TimeValue tmv_local;
7579 + oslDateTime dt;
7580 + osl_getSystemTime( &tmv_system );
7581 + osl_getLocalTimeFromSystemTime(&tmv_system, &tmv_local);
7582 + osl_getDateTimeFromTimeValue( &tmv_local, &dt );
7584 + sal_Int32 nYear = dt.Year;
7585 + sal_Int32 nMonth = dt.Month;
7586 + sal_Int32 nDay = dt.Day;
7588 + std::string sDate;
7589 + sDate = "# Current Time: ";
7590 + sDate += std::string(twoDigits(integerToAscii(dt.Hours)));
7591 + sDate += ":";
7592 + sDate += std::string(twoDigits(integerToAscii(dt.Minutes)));
7593 + sDate += ":";
7594 + sDate += std::string(twoDigits(integerToAscii(dt.Seconds)));
7595 + sDate += "\n";
7597 + sDate += "[";
7599 + // sDate += rtl::OString::valueOf(nYear);
7600 + sDate.append(integerToAscii(nYear));
7601 + sDate += ".";
7602 + if (nMonth < 10)
7603 + sDate += "0";
7604 + // sDate += rtl::OString::valueOf(nMonth);
7605 + sDate.append(integerToAscii(nMonth));
7606 + sDate += ".";
7607 + if (nDay < 10)
7608 + sDate += "0";
7609 + // sDate += rtl::OString::valueOf(nDay);
7610 + sDate += std::string(integerToAscii(nDay));
7611 + sDate += "/";
7612 + sDate += _sProjectId;
7613 + sDate += "/";
7614 + sDate += _sBuildId;
7615 + sDate += "]";
7617 + return sDate;
7620 +//# rtl::OString createDateTag()
7621 +//# {
7622 +//# TimeValue tmv;
7623 +//# oslDateTime dt;
7624 +//# osl_getSystemTime( &tmv );
7625 +//# osl_getDateTimeFromTimeValue( &tmv, &dt );
7626 +//#
7627 +//# sal_Int32 nYear = dt.Year;
7628 +//# sal_Int32 nMonth = dt.Month;
7629 +//# sal_Int32 nDay = dt.Day;
7630 +//#
7631 +//# rtl::OString sDate("[");
7632 +//# sDate += rtl::OString::valueOf(nYear);
7633 +//# sDate += ".";
7634 +//# if (nMonth < 10)
7635 +//# sDate += "0";
7636 +//# sDate += rtl::OString::valueOf(nMonth);
7637 +//# sDate += ".";
7638 +//# if (nDay < 10)
7639 +//# sDate += "0";
7640 +//# sDate += rtl::OString::valueOf(nDay);
7641 +//# sDate += "//]";
7642 +//#
7643 +//# return sDate;
7644 +//# }
7646 +std::string OptionHelper::createDateTag()
7648 + return createDateTag(m_sProjectId, m_sBuildId);
7651 +bool OptionHelper::showErrors()
7653 + bool bRetValue = true; // default, show all
7654 + if (m_aOption.hasOpt("-noerrors"))
7656 + bRetValue = false;
7658 + return bRetValue;
7661 +bool OptionHelper::showTests()
7663 + bool bRetValue = true; // default, show all
7664 + if (m_aOption.hasOpt("-onlyerrors"))
7666 + bRetValue = false;
7668 + return bRetValue;
7671 +// Check which parameter is given for handle the jobs.
7672 +// If no parameter is given, all jobs (tests) will run through
7673 +void OptionHelper::handleJobs()
7675 + // load job file, the file contains the functions which we only want to test.
7676 + if (m_aOption.hasOpt("-jobexclude"))
7678 + rtl::OString sJobFile = m_aOption.getOpt("-jobexclude");
7679 + m_aJobExcludeList.readfile(sJobFile.getStr(), JOB_EXCLUDE_LIST);
7682 + if (m_aOption.hasOpt("-jobonly"))
7684 + rtl::OString sJobFile = m_aOption.getOpt("-jobonly");
7685 + m_aJobOnlyList.readfile(sJobFile.getStr(), JOB_ONLY_LIST);
7688 + //
7689 + if (m_aOption.hasOpt("-jobfilter"))
7691 + rtl::OString sJobFilter = m_aOption.getOpt("-jobfilter");
7692 + split(sJobFilter, ".", m_aJobFilter);
7696 +// -----------------------------------------------------------------------------
7697 +// Here will be decide, if a job/test will execute or not.
7698 +// therefore exist some lists, in which stay all jobs (positive list) or a list (negative list) which jobs should not execute
7699 +// or if only specific jobs should execute by a given filter
7701 +bool OptionHelper::isAllowedToExecute(std::string const& _sNodeName, std::string const& _sName)
7703 + std::string sJobName = _sNodeName + "." + _sName;
7704 + // t_print(T_VERBOSE, "Jobname %s\n", sJobName.c_str());
7705 + if (isOnlyShowJobs()) // true, if parameter -onlyshowjob
7707 + m_aJobOnlyList.setJobListEntry(sJobName, JOB_ACCESS);
7708 + return false;
7711 + if (m_aJobOnlyList.size()) // >0 if parameter -jobonly
7713 + if (m_aJobOnlyList.getJobListEntry(sJobName) != JOB_NOT_FOUND)
7715 + // job entry found, mark as accessed
7716 + m_aJobOnlyList.setJobListEntry(sJobName, JOB_ACCESS);
7717 + return true;
7719 + return false;
7721 + else if (m_aJobFilter.size() > 0) // >0 if parameter -jobfilter
7723 + OStringList aSplitName;
7724 + split(sJobName.c_str(), ".", aSplitName);
7725 + if (! match(m_aJobFilter, aSplitName))
7727 + t_print(T_VERBOSE, "job: '%s' filtered by [-jobfilter]\n", sJobName.c_str());
7728 + return false;
7731 + else if (m_aJobExcludeList.size() > 0) // >0 if parameter -jobexclude
7733 + if (m_aJobExcludeList.getJobListEntry(sJobName) != JOB_NOT_FOUND)
7735 + // job entry found, this job should not executed, so return false
7736 + t_print(T_VERBOSE, "job: '%s' filtered by [-jobexclude]\n", sJobName.c_str());
7737 + return false;
7739 + // m_aJobOnlyList.setJobListEntry(sJobName, JOB_ACCESS);
7740 + return true;
7742 + else
7744 + //! not handled yet
7747 + return true;
7750 Nur in misc/build/cppunit-1.8.0/src/result: optionhelper.cxx.dummy.
7751 --- misc/cppunit-1.8.0/src/result/outputter.cxx 2008-12-10 20:46:09.657356434 +0100
7752 +++ misc/build/cppunit-1.8.0/src/result/outputter.cxx 2008-12-09 09:06:18.000000000 +0100
7753 @@ -1 +1,106 @@
7754 -dummy
7755 +/*************************************************************************
7757 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7758 + *
7759 + * Copyright 2008 by Sun Microsystems, Inc.
7761 + * OpenOffice.org - a multi-platform office productivity suite
7763 + * $RCSfile$
7764 + * $Revision$
7766 + * This file is part of OpenOffice.org.
7768 + * OpenOffice.org is free software: you can redistribute it and/or modify
7769 + * it under the terms of the GNU Lesser General Public License version 3
7770 + * only, as published by the Free Software Foundation.
7772 + * OpenOffice.org is distributed in the hope that it will be useful,
7773 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7774 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7775 + * GNU Lesser General Public License version 3 for more details
7776 + * (a copy is included in the LICENSE file that accompanied this code).
7778 + * You should have received a copy of the GNU Lesser General Public License
7779 + * version 3 along with OpenOffice.org. If not, see
7780 + * <http://www.openoffice.org/license.html>
7781 + * for a copy of the LGPLv3 License.
7783 + ************************************************************************/
7785 +// MARKER(update_precomp.py): autogen include statement, do not remove
7786 +// #include "precompiled_cppunit.hxx"
7789 +#include <string>
7790 +#include <sal/types.h>
7791 +#include "cppunit/result/outputter.hxx"
7793 +// -----------------------------------------------------------------------------
7795 +Outputter::~Outputter()
7797 + // delete m_pLog;
7800 +void Outputter::writeToAll(const sal_Char* _sCharStr)
7802 + // std::cout << _sCharStr;
7803 + if (m_pStream)
7805 + *m_pStream << _sCharStr;
7807 + if (m_pLog.get())
7809 + m_pLog->write(_sCharStr);
7813 +void Outputter::write(const sal_Char* _sCharStr)
7815 + writeToAll(_sCharStr);
7818 +void Outputter::write(std::string const& _sStr)
7820 + writeToAll(_sStr.c_str());
7823 +void Outputter::write(sal_Int32 _nValue)
7825 + sal_Char cBuf[20];
7826 + sal_Char* pBuf = cBuf;
7827 + sprintf(pBuf, "%d", SAL_STATIC_CAST(int, _nValue));
7828 + writeToAll(pBuf);
7831 +// -----------------------------------------------------------------------------
7833 +Outputter& operator <<( Outputter &_aStreamWrapper, const sal_Char* _sValue)
7835 + _aStreamWrapper.write(_sValue);
7836 + return _aStreamWrapper;
7839 +Outputter& operator <<( Outputter &_aStreamWrapper, std::string const& _sValue)
7841 + _aStreamWrapper.write(_sValue);
7842 + return _aStreamWrapper;
7845 +Outputter& operator <<( Outputter &_aStreamWrapper, sal_Int32 _nValue)
7847 + _aStreamWrapper.write(_nValue);
7848 + return _aStreamWrapper;
7851 +//# Outputter& operator <<( Outputter &_aStreamWrapper, double )
7852 +//# {
7853 +//# return _aStreamWrapper;
7854 +//# }
7856 +Outputter& operator <<( Outputter &_aStreamWrapper, Outputter::endl const&)
7858 + _aStreamWrapper.write("\n");
7859 + return _aStreamWrapper;
7861 Nur in misc/build/cppunit-1.8.0/src/result: outputter.cxx.dummy.
7862 --- misc/cppunit-1.8.0/src/result/signal.cxx 2008-12-10 20:46:09.750401577 +0100
7863 +++ misc/build/cppunit-1.8.0/src/result/signal.cxx 2008-12-10 20:42:46.000000000 +0100
7864 @@ -1 +1,998 @@
7865 -dummy
7866 +/*************************************************************************
7868 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
7869 + *
7870 + * Copyright 2008 by Sun Microsystems, Inc.
7872 + * OpenOffice.org - a multi-platform office productivity suite
7874 + * $RCSfile$
7875 + * $Revision$
7877 + * This file is part of OpenOffice.org.
7879 + * OpenOffice.org is free software: you can redistribute it and/or modify
7880 + * it under the terms of the GNU Lesser General Public License version 3
7881 + * only, as published by the Free Software Foundation.
7883 + * OpenOffice.org is distributed in the hope that it will be useful,
7884 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
7885 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7886 + * GNU Lesser General Public License version 3 for more details
7887 + * (a copy is included in the LICENSE file that accompanied this code).
7889 + * You should have received a copy of the GNU Lesser General Public License
7890 + * version 3 along with OpenOffice.org. If not, see
7891 + * <http://www.openoffice.org/license.html>
7892 + * for a copy of the LGPLv3 License.
7894 + ************************************************************************/
7896 +// MARKER(update_precomp.py): autogen include statement, do not remove
7897 +// #include "precompiled_cppunit.hxx"
7899 +#include <stdio.h>
7900 +#include <stdlib.h>
7901 +#include <string.h>
7902 +#if (defined UNX) || (defined OS2)
7903 +#include <signal.h>
7904 +#include <errno.h>
7905 +#endif
7907 +#include <fstream>
7908 +#include <vector>
7909 +#include <hash_map>
7911 +#include <rtl/tres.h>
7912 +#include <rtl/string.hxx>
7914 +#include "testshl/autoregisterhelper.hxx"
7915 +#include "testshl/getopt.hxx"
7916 +#include "signal.hxx"
7917 +#include <cppunit/tagvalues.hxx>
7918 +#include <unistd.h>
7919 +#include "testshl/filehelper.hxx"
7920 +#include <cppunit/result/TestResult.h>
7921 +#include "cppunit/signaltest.h"
7922 +#include "cppunit/Exception.h"
7924 +#ifdef WNT
7925 +#include "testshl/winstuff.hxx"
7926 +#endif
7928 +// typedef std::vector<std::string> StringList;
7929 +// StringList sCurrentNodeName;
7930 +CppUnit::TestResult *pTestResult = NULL;
7931 +std::string sSignalFile;
7933 +typedef std::hash_map< std::string, int > HashMap;
7934 +HashMap m_aSignalHash;
7935 +bool bSignalsCached = false;
7936 +bool bDoNotTouchSignalFile = false;
7938 +// -----------------------------------------------------------------------------
7940 +// return 'true' if signalfile doesn't exist.
7941 +// else 'false'
7942 +bool existsSignalFile(std::string const& _sSignalFilename)
7944 + FILE* pFile = fopen(_sSignalFilename.c_str(), "r");
7945 + if (!pFile)
7947 + return false;
7949 + fprintf(stderr, "'%s' exists.\n", _sSignalFilename.c_str());
7950 + fclose(pFile);
7951 + return true;
7954 +// -----------------------------------------------------------------------------
7955 +void createEmptySignalFile(std::string const& _sSignalFilename)
7957 + FILE* pFile = fopen(_sSignalFilename.c_str(), "w");
7958 + if (!pFile)
7960 + fprintf(stderr, "error: Could not create signal helper file %s for signal info.\n", _sSignalFilename.c_str());
7962 + else
7964 + fprintf(pFile, "# This is an auto generated helper file for signal handling.\n");
7965 + fprintf(pFile, "# An entry start by '#' is a comment.\n");
7966 + fprintf(pFile, "# All other are test functions which have abort, before this line is removed.\n");
7967 + fprintf(pFile, "# So you have to check this functions by hand.\n");
7969 + fclose(pFile);
7973 +// -----------------------------------------------------------------------------
7974 +/** get Current PID.
7976 +inline ::rtl::OUString getCurrentPID( )
7978 + //~ Get current PID and turn it into OUString;
7979 + sal_uInt32 nPID = 0;
7980 +#ifdef WNT
7981 + nPID = WinGetCurrentProcessId();
7982 +#else
7983 + nPID = getpid();
7984 +#endif
7985 + return ( ::rtl::OUString::valueOf( static_cast<long>(nPID ) ) );
7987 +// -----------------------------------------------------------------------------
7988 +static std::string integerToAscii(sal_uInt32 nValue)
7990 + sal_Char cBuf[30];
7991 + sal_Char *pBuf = cBuf;
7992 + sprintf(pBuf, "%d", static_cast<unsigned int>(nValue));
7993 + return std::string(pBuf);
7995 +void my_sleep(int sec);
7997 +// -----------------------------------------------------------------------------
7998 +void setSignalFilename(GetOpt & opt)
8000 + if (opt.hasOpt("-dntsf") || opt.hasOpt("-donottouchsignalfile"))
8002 + // special feature, for debugging, so the signal file will not manipulate.
8003 + // but create, if no one exist.
8004 + bDoNotTouchSignalFile = true;
8007 + if (opt.hasOpt("-sf") || opt.hasOpt("-signalfile"))
8009 + if (opt.hasOpt("-sf"))
8011 + sSignalFile = opt.getOpt("-sf");
8013 + else if (opt.hasOpt("-signalfile"))
8015 + sSignalFile = opt.getOpt("-signalfile");
8018 + else
8020 + std::string sPath;
8021 + // std::string sPath(FileHelper::getTempPath());
8022 + std::string sFilename("signalfile");
8023 + std::string sFilenameExt(".txt");
8024 + bool bCanQuitLoop = true;
8025 + do
8028 +// #ifdef WNT
8029 +// sPath += "\\";
8030 +// #endif
8031 +// #ifdef UNX
8032 +// sPath += "/";
8033 +// #endif
8034 + sPath = sFilename;
8035 + // BUG: i72675
8036 + // add "_12345" where 12345 is the current process ID
8038 + TimeValue aTimeValue;
8039 + osl_getSystemTime(&aTimeValue);
8041 + sPath += "_";
8042 + sPath += integerToAscii(aTimeValue.Seconds);
8043 + // rtl::OUString suPID = getCurrentPID();
8044 + // rtl::OString sPID = rtl::OUStringToOString(suPID, RTL_TEXTENCODING_ASCII_US);
8045 + // sPath += sPID.getStr();
8046 + sPath += sFilenameExt;
8047 + bCanQuitLoop = true;
8048 + if (existsSignalFile(sPath))
8050 + // there is already a signal file, wait a second, choose an other one.
8051 + my_sleep(1);
8052 + bCanQuitLoop = false;
8055 + while (!(bCanQuitLoop));
8057 + sSignalFile = sPath;
8058 + fprintf(stderr, "Use default signal file name '%s'\n", sSignalFile.c_str());
8061 + if (opt.hasOpt("-dnrmsf"))
8063 + fprintf(stderr, "'Don't remove signal file' (-dnrmsf) is set.\n");
8065 + else
8067 + if (bDoNotTouchSignalFile == true)
8069 + fprintf(stderr, "warning: 'Don't touch signal file' parameter (-dntsf) is set, will not remove existing signal file.\n");
8071 + else
8073 + // remove signalfile
8074 + createEmptySignalFile(sSignalFile);
8079 +// -----------------------------------------------------------------------------
8080 +bool doNotTouchSignalFile() { return bDoNotTouchSignalFile; }
8082 +// -----------------------------------------------------------------------------
8083 +std::string buildTestFunctionName(std::string const& _sName)
8085 + std::string sName;
8086 + if (pTestResult)
8088 + sName = pTestResult->getNodeName();
8089 + sName += ".";
8093 + for (StringList::const_iterator it = sCurrentNodeName.begin();
8094 + it != sCurrentNodeName.end();
8095 + ++it)
8097 + sName += *it;
8098 + sName += ".";
8100 +*/
8101 + sName += _sName;
8103 + return sName;
8105 +// -----------------------------------------------------------------------------
8106 +// old: void executionPushName(std::string const& _sName)
8107 +// old: {
8108 +// old: sCurrentNodeName.push_back(_sName);
8109 +// old: }
8110 +// old: void executionPopName()
8111 +// old: {
8112 +// old: sCurrentNodeName.pop_back();
8113 +// old: }
8114 +// old:
8116 +// -----------------------------------------------------------------------------
8117 +// ------------------------------ Signal Handling ------------------------------
8118 +// -----------------------------------------------------------------------------
8120 +// std::string sLastTestFunctionName;
8122 +std::string getSignalName(sal_Int32 nSignalNo);
8123 +// -----------------------------------------------------------------------------
8125 +std::string getSignalFilename()
8127 + return sSignalFile;
8130 +// -----------------------------------------------------------------------------
8131 +// void storeNoSignal(std::string const& _sTestName)
8132 +// {
8133 + // sLastTestFunctionName = buildTestFunctionName(_sTestName);
8134 + // std::ofstream out(getSignalFilename().c_str(), std::ios::out);
8135 + // out << NO_SIGNAL << std::endl; // no signal!
8136 +// }
8138 +void markSignalAsAlreadyDone(sal_Int32 _nSignalNo)
8140 + // std::ofstream out(getSignalFilename().c_str(), std::ios::out | std::ios::app);
8141 + FILE *out = fopen(getSignalFilename().c_str(), "a");
8142 + if (out != NULL)
8144 +//# out << "# the previous test function creates signal: "
8145 +//# << getSignalName(_nSignalNo)
8146 +//# << " ("
8147 +//# << _nSignalNo
8148 +//# << ")" << std::endl;
8149 +//# // out << sLastTestFunctionName << std::endl; // SIGNAL!
8151 + fprintf(out, "# the previous test function creates signal: %s(%d)\n", getSignalName(_nSignalNo).c_str(), SAL_STATIC_CAST(int, _nSignalNo));
8152 + // fprintf(out, "%s\n", sLastTestFunctionName );
8153 + fclose(out);
8155 + else
8157 + fprintf(stderr, "error: Can't write signal info to file %s \n", getSignalFilename().c_str());
8161 +// -----------------------------------------------------------------------------
8163 +Signal hasSignaled(std::string const& _sTestName)
8165 + // BACK: true: signal
8166 + // false: nothing
8168 + if (bSignalsCached == true)
8171 + if (m_aSignalHash.find(buildTestFunctionName(_sTestName)) != m_aSignalHash.end())
8173 + return HAS_SIGNAL;
8175 + return NO_SIGNAL;
8178 + std::ifstream in(getSignalFilename().c_str(), std::ios::in);
8180 + // std::cout << "Check for signal" << std::endl;
8181 + std::string sLine, sLastLine;
8182 + while (std::getline(in, sLine))
8184 + // std::cout << sTest << std::endl;
8185 + char ch = sLine[0];
8186 + if (isspace(ch) == 0 &&
8187 + sLine.size() > 0)
8189 + if (ch == '#')
8191 + if (sLastLine.size() > 0)
8193 + rtl::OString aStrLine(sLine.c_str());
8194 + sal_Int32 nIdx = aStrLine.indexOf("(") + 1;
8195 + sal_Int32 nIdx2 = aStrLine.indexOf(")");
8196 + sal_Int32 nSignalNo = 0;
8197 + if (nIdx > 0 && nIdx2 > 0)
8199 + rtl::OString sSignalNo = aStrLine.copy(nIdx, nIdx2 - nIdx);
8200 + nSignalNo = sSignalNo.toInt32();
8201 + m_aSignalHash[sLastLine] = nSignalNo;
8203 + sLastLine.clear();
8206 + else
8208 + // if (sTest == buildTestFunctionName(_sTestName))
8209 + m_aSignalHash[sLine] = 1;
8210 + sLastLine = sLine;
8211 + // return HAS_SIGNAL;
8216 + bSignalsCached = true;
8217 + return hasSignaled(_sTestName);
8218 + // return NO_SIGNAL;
8221 +#ifdef UNX
8223 +// -----------------------------------------------------------------------------
8225 +void release_signal_Handling();
8227 +//# void signalFunction(int value)
8228 +//# {
8229 +//# std::cout << "Signal caught: (" << value << "), please restart." << std::endl;
8230 +//# markSignalAsAlreadyDone();
8231 +//#
8232 +//# release_signal_Handling();
8233 +//# std::cout.flush();
8234 +//# abort();
8235 +//# }
8237 +// -----------------------------------------------------------------------------
8238 +extern "C" void SignalHandlerFunction(int _nSignalNo, siginfo_t *, void*)
8240 + // std::cout << "Signal caught: " << getSignalName(_nSignalNo) << " (" << _nSignalNo << "), please restart." << std::endl;
8241 + fprintf(stderr, "Signal caught %s(%d)\n", getSignalName(_nSignalNo).c_str(), _nSignalNo);
8242 + markSignalAsAlreadyDone(_nSignalNo);
8244 + release_signal_Handling();
8245 + // std::cout.flush();
8246 + abort();
8249 +// -----------------------------------------------------------------------------
8250 +// This is a copy of the osl/signal.c code
8251 +#define ACT_IGNORE 1
8252 +#define ACT_ABORT 2
8253 +#define ACT_EXIT 3
8254 +#define ACT_SYSTEM 4
8255 +#define ACT_HIDE 5
8257 +extern "C" {
8258 +static struct SignalAction
8260 + int Signal;
8261 + int Action;
8262 + void (*Handler)(int);
8263 +} Signals[] =
8265 + { SIGHUP, ACT_IGNORE, NULL }, /* hangup */
8266 + { SIGINT, ACT_EXIT, NULL }, /* interrupt (rubout) */
8267 + { SIGQUIT, ACT_ABORT, NULL }, /* quit (ASCII FS) */
8268 + { SIGILL, ACT_SYSTEM, NULL }, /* illegal instruction (not reset when caught) */
8269 +/* changed from ACT_ABOUT to ACT_SYSTEM to try and get collector to run*/
8270 + { SIGTRAP, ACT_ABORT, NULL }, /* trace trap (not reset when caught) */
8271 +#if ( SIGIOT != SIGABRT )
8272 + { SIGIOT, ACT_ABORT, NULL }, /* IOT instruction */
8273 +#endif
8274 +// { SIGABRT, ACT_ABORT, NULL }, /* used by abort, replace SIGIOT in the future */
8275 +#ifdef SIGEMT
8276 + { SIGEMT, ACT_SYSTEM, NULL }, /* EMT instruction */
8277 +/* changed from ACT_ABORT to ACT_SYSTEM to remove handler*/
8278 +/* SIGEMT may also be used by the profiler - so it is probably not a good
8279 + plan to have the new handler use this signal*/
8280 +#endif
8281 + { SIGFPE, ACT_ABORT, NULL }, /* floating point exception */
8282 + { SIGKILL, ACT_SYSTEM, NULL }, /* kill (cannot be caught or ignored) */
8283 + { SIGBUS, ACT_ABORT, NULL }, /* bus error */
8284 + { SIGSEGV, ACT_ABORT, NULL }, /* segmentation violation */
8285 +#ifdef SIGSYS
8286 + { SIGSYS, ACT_ABORT, NULL }, /* bad argument to system call */
8287 +#endif
8288 + { SIGPIPE, ACT_HIDE, NULL }, /* write on a pipe with no one to read it */
8289 + { SIGALRM, ACT_EXIT, NULL }, /* alarm clock */
8290 + { SIGTERM, ACT_EXIT, NULL }, /* software termination signal from kill */
8291 + { SIGUSR1, ACT_SYSTEM, NULL }, /* user defined signal 1 */
8292 + { SIGUSR2, ACT_SYSTEM, NULL }, /* user defined signal 2 */
8293 + { SIGCHLD, ACT_SYSTEM, NULL }, /* child status change */
8294 +#ifdef SIGPWR
8295 + { SIGPWR, ACT_IGNORE, NULL }, /* power-fail restart */
8296 +#endif
8297 + { SIGWINCH, ACT_IGNORE, NULL }, /* window size change */
8298 + { SIGURG, ACT_EXIT, NULL }, /* urgent socket condition */
8299 +#ifdef SIGPOLL
8300 + { SIGPOLL, ACT_EXIT, NULL }, /* pollable event occured */
8301 +#endif
8302 + { SIGSTOP, ACT_SYSTEM, NULL }, /* stop (cannot be caught or ignored) */
8303 + { SIGTSTP, ACT_SYSTEM, NULL }, /* user stop requested from tty */
8304 + { SIGCONT, ACT_SYSTEM, NULL }, /* stopped process has been continued */
8305 + { SIGTTIN, ACT_SYSTEM, NULL }, /* background tty read attempted */
8306 + { SIGTTOU, ACT_SYSTEM, NULL }, /* background tty write attempted */
8307 + { SIGVTALRM, ACT_EXIT, NULL }, /* virtual timer expired */
8308 + { SIGPROF, ACT_SYSTEM, NULL }, /* profiling timer expired */
8309 +/*Change from ACT_EXIT to ACT_SYSTEM for SIGPROF is so that profiling signals do
8310 + not get taken by the new handler - the new handler does not pass on context
8311 + information which causes 'collect' to crash. This is a way of avoiding
8312 + what looks like a bug in the new handler*/
8313 + { SIGXCPU, ACT_ABORT, NULL }, /* exceeded cpu limit */
8314 + { SIGXFSZ, ACT_ABORT, NULL } /* exceeded file size limit */
8318 +const int NoSignals = sizeof(Signals) / sizeof(struct SignalAction);
8320 +#endif /* UNX */
8322 +// -----------------------------------------------------------------------------
8323 +void init_signal_Handling(CppUnit::TestResult *_pResult)
8325 + pTestResult = _pResult;
8326 +#ifdef UNX
8328 +// signal(SIGSEGV, signalFunction);
8329 + // signal(SIGSEGV, signalFunction);
8330 + // signal(SIGFPE, signalFunction);
8332 +// signal(1, signalFunction);
8333 + // struct sigaction action, oldaction;
8334 + // action.sa_sigaction = signalFunction2;
8335 + // action.sa_flags = SA_ONESHOT /* | SA_SIGINFO */;
8337 + struct sigaction act;
8338 + struct sigaction oact;
8340 + // act.sa_handler = SignalHandlerFunction;
8341 + act.sa_flags = SA_RESTART;
8342 + // act.sa_flags = SA_ONESHOT /* | SA_SIGINFO */;
8343 + act.sa_sigaction = SignalHandlerFunction;
8345 + sigfillset(&(act.sa_mask));
8347 + /* Initialize the rest of the signals */
8348 + for (int i = 0; i < NoSignals; i++)
8350 + if (Signals[i].Action != ACT_SYSTEM)
8352 + if (Signals[i].Action == ACT_HIDE)
8354 + struct sigaction ign;
8356 + ign.sa_handler = SIG_IGN;
8357 + ign.sa_flags = 0;
8358 + sigemptyset(&ign.sa_mask);
8360 + if (sigaction(Signals[i].Signal, &ign, &oact) == 0)
8361 + Signals[i].Handler = oact.sa_handler;
8362 + else
8363 + Signals[i].Handler = SIG_DFL;
8365 + else
8366 + if (sigaction(Signals[i].Signal, &act, &oact) == 0)
8367 + Signals[i].Handler = oact.sa_handler;
8368 + else
8369 + Signals[i].Handler = SIG_DFL;
8372 +#endif
8374 + // ------------ signal helper file must exist -----------------
8375 + FILE* pFile = fopen(getSignalFilename().c_str(), "r");
8376 + if (!pFile)
8378 + createEmptySignalFile( getSignalFilename() );
8380 + else
8382 + fclose(pFile);
8383 + }
8386 +// -----------------------------------------------------------------------------
8387 +void release_signal_Handling()
8389 + // frees all signals
8390 +#ifdef UNX
8391 + int i;
8392 + struct sigaction act;
8394 + act.sa_flags = 0;
8395 + sigemptyset(&(act.sa_mask));
8397 + /* Initialize the rest of the signals */
8398 + for (i = NoSignals - 1; i >= 0; i--)
8400 + if (Signals[i].Action != ACT_SYSTEM)
8402 + act.sa_handler = Signals[i].Handler;
8404 + sigaction(Signals[i].Signal, &act, NULL);
8407 +#endif
8410 +// -----------------------------------------------------------------------------
8411 +Signal signalCheck(CppUnit::TestResult* _pResult, std::string const& _sTestName)
8413 + // BACK: HAS_SIGNAL: the test has already done and signaled
8414 + if (hasSignaled(_sTestName) == HAS_SIGNAL)
8416 + // std::cout << "The Test '" << buildTestFunctionName(_sTestName) << "' is marked as signaled." << std::endl;
8417 + std::string sTestFunctionName = buildTestFunctionName(_sTestName);
8418 + fprintf(stderr, "The Test '%s' is marked as signaled.\n", sTestFunctionName.c_str());
8419 + if (_pResult)
8421 + CppUnit::SignalTest *pTest = new CppUnit::SignalTest(_sTestName);
8423 + std::string sErrorText = "Function is marked as signaled: ";
8424 + sal_Int32 nSignalNo = m_aSignalHash[sTestFunctionName];
8425 + sErrorText += getSignalName(nSignalNo);
8426 + sErrorText += " (";
8427 + sErrorText += OptionHelper::integerToAscii(nSignalNo);
8428 + sErrorText += ")";
8430 + _pResult->addError(pTest, new CppUnit::SignalException(sErrorText), ErrorType::ET_SIGNAL);
8432 + return HAS_SIGNAL;
8435 + // storeNoSignal(_sTestName);
8436 + return NO_SIGNAL;
8439 +// -----------------------------------------------------------------------------
8440 +bool copyFile(std::string const& _sFrom, std::string const& _sTo)
8442 + bool bRetValue = false;
8443 + const int MAXBUFSIZE = 1024;
8444 + char buff[MAXBUFSIZE];
8445 + FILE *in = fopen(_sFrom.c_str(), "r");
8446 + if (in == NULL)
8448 + fprintf(stderr, "error: Can't open file %s for read to copy.\n", _sFrom.c_str());
8449 + bRetValue = false;
8451 + else
8453 + FILE *out = fopen(_sTo.c_str(), "w");
8454 + if (out == NULL)
8456 + fclose(in);
8457 + fprintf(stderr, "error: Can't open file %s for write to copy.\n", _sTo.c_str());
8458 + bRetValue = false;
8460 + else
8462 + int nRealGot = 0;
8463 + while(!feof(in))
8465 + nRealGot = fread(buff, sizeof(char), MAXBUFSIZE, in);
8466 + if (nRealGot > 0)
8468 + fwrite(buff, sizeof(char), nRealGot, out);
8471 + bRetValue = true;
8472 + fclose(out);
8473 + fclose(in);
8476 + return bRetValue;
8479 +// -----------------------------------------------------------------------------
8480 +void signalStartTest(std::string const& _sName)
8482 + if (doNotTouchSignalFile()) return;
8484 + // fprintf(stderr, "### signalStartTest!\n");
8485 + // due to the fact, that functions are vicious, we write the name first.
8486 + // if it isn't vivious, than we removed it.
8487 + std::string sNewName = getSignalFilename();
8488 + sNewName += ".bak";
8489 + if (copyFile(getSignalFilename(), sNewName))
8491 + // std::ofstream out(getSignalFilename().c_str(), std::ios::out | std::ios::app);
8492 + FILE *out = fopen(getSignalFilename().c_str(), "a");
8493 + if (out != NULL)
8495 + // out << buildTestFunctionName(_sName) << std::endl;
8496 + fprintf(out, "%s\n", buildTestFunctionName(_sName).c_str());
8497 + fclose(out);
8499 + else
8501 + fprintf(stderr, "error: Can't open file %s for append.\n", getSignalFilename().c_str());
8504 + else
8506 + fprintf(stderr, "error: Can't copy signal helper from file %s to file %s, %d\n", getSignalFilename().c_str(), sNewName.c_str(), errno);
8510 +// -----------------------------------------------------------------------------
8511 +void signalEndTest()
8513 + if (doNotTouchSignalFile()) return;
8515 + // fprintf(stderr, "### signalEndTest!\n");
8516 + if (0 != remove(getSignalFilename().c_str()))
8518 + fprintf(stderr, "error: Can't delete file %s\n", getSignalFilename().c_str());
8520 + else
8522 + std::string sNewName = getSignalFilename();
8523 + sNewName += ".bak";
8524 + if (0 != rename(sNewName.c_str(), getSignalFilename().c_str()))
8526 + fprintf(stderr, "error: Can't rename file %s to file %s errno: %d\n", sNewName.c_str(), getSignalFilename().c_str(), errno);
8531 +// -----------------------------------------------------------------------------
8532 +void removeSignalFile(GetOpt & opt)
8534 + // fprintf(stderr, "### remove signal file: '%s'\n", sSignalFile.c_str());
8535 + if (opt.hasOpt("-dnrmsf"))
8537 + return;
8539 + if (bDoNotTouchSignalFile == true)
8541 + return;
8543 + remove(getSignalFilename().c_str());
8546 +// -----------------------------------------------------------------------------
8548 +sal_Int32 SignalHandlerA( TagHelper const& _aTagItems )
8550 + sal_Int32 nRetValue = 0;
8551 + TagData nTagType = _aTagItems.GetTagData(TAG_TYPE, 0);
8552 +// LLA: unused
8553 +// hTestResult hResult = (hTestResult) _aTagItems.GetTagData(TAG_RESULT_PTR, 0 /* NULL */ );
8554 +// CppUnit::TestResult* pResult = (CppUnit::TestResult*)hResult;
8556 + try
8558 + switch(nTagType)
8560 + // old: case SIGNAL_PUSH_NAME:
8561 + // old: {
8562 + // old: const char* sName = (const char*) _aTagItems.GetTagData(TAG_NODENAME);
8563 + // old: if (sName != NULL)
8564 + // old: signalPushName(sName);
8565 + // old: break;
8566 + // old: }
8567 + // old:
8568 + // old: case SIGNAL_POP_NAME:
8569 + // old: signalPopName();
8570 + // old: break;
8572 + // old: case SIGNAL_CHECK:
8573 + // old: {
8574 + // old: const char* sName = (const char*) _aTagItems.GetTagData(TAG_NODENAME);
8575 + // old: if (sName != NULL)
8576 + // old: {
8577 + // old: nRetValue = signalCheck(sName);
8578 + // old: }
8579 + // old: break;
8580 + // old: }
8582 + // old: case INIT_SIGNAL_HANDLING:
8583 + // old: init_signal_Handling();
8584 + // old: break;
8585 + // old:
8586 + // old: case RELEASE_SIGNAL_HANDLING:
8587 + // old: release_signal_Handling();
8588 + // old: break;
8590 + case SIGNAL_START_TEST:
8592 + // fprintf(stderr, "### SIGNAL_START_TEST!\n");
8593 + const char* sName = (const char*) _aTagItems.GetTagData(TAG_NODENAME);
8594 + if (sName != NULL)
8596 + signalStartTest(sName);
8598 + break;
8601 + case SIGNAL_END_TEST:
8603 + // fprintf(stderr, "### SIGNAL_END_TEST!\n");
8604 + const char* sName = (const char*) _aTagItems.GetTagData(TAG_NODENAME);
8605 + if (sName != NULL)
8607 + signalEndTest();
8609 + break;
8612 + default:
8613 + fprintf(stderr, "error: SignalHandlerA: Can't handle the tag type %d\n", SAL_STATIC_CAST(int, nTagType));
8614 + fflush(stderr);
8615 + // throw std::exception(/*std::string("Unknown TYPE_TAG Exception.")*/);
8618 + catch (std::exception &e)
8620 + fprintf(stderr, "error: SignalHandlerA: Exception caught: %s\n", e.what());
8621 + fflush(stderr);
8622 + // throw e;
8625 + return nRetValue;
8627 +// -----------------------------------------------------------------------------
8628 +// This a little bit more abstract code, could be easier to modify or expand.
8630 +sal_Int32 CheckExecution(CppUnit::TestResult* _pResult, std::string const& _sName)
8632 + // more checks in the corresponding job lists
8633 + if (_pResult)
8635 + if (! _pResult->isAllowedToExecute(_sName))
8637 + return DO_NOT_EXECUTE;
8641 + // Check if the given test should be executed.
8642 + if (signalCheck(_pResult, _sName) == HAS_SIGNAL)
8644 + return DO_NOT_EXECUTE;
8647 + return GO_EXECUTE;
8650 +// -----------------------------------------------------------------------------
8651 +sal_Int32 ExecutionA( TagHelper const& _aTagItems )
8653 + sal_Int32 nRetValue = 0;
8654 + TagData nTagType = _aTagItems.GetTagData(TAG_TYPE, 0);
8655 + hTestResult hResult = (hTestResult) _aTagItems.GetTagData(TAG_RESULT_PTR, 0 /* NULL */ );
8656 + CppUnit::TestResult* pResult = (CppUnit::TestResult*)hResult;
8658 + try
8660 + switch(nTagType)
8662 + case EXECUTION_CHECK:
8664 + const char* sName = (const char*) _aTagItems.GetTagData(TAG_NODENAME);
8665 + if (sName)
8667 + nRetValue = CheckExecution(pResult, sName);
8668 + if (nRetValue == GO_EXECUTE)
8670 + if (pResult && pResult->isOptionWhereAmI())
8672 + printf("# This is: %s\n", buildTestFunctionName(sName).c_str());
8677 + break;
8680 + // old: case EXECUTION_PUSH_NAME:
8681 + // old: {
8682 + // old: const char* sName = (const char*) _aTagItems.GetTagData(TAG_NODENAME);
8683 + // old: if (sName != NULL)
8684 + // old: executionPushName(sName);
8685 + // old: break;
8686 + // old: }
8687 + // old:
8688 + // old: case EXECUTION_POP_NAME:
8689 + // old: executionPopName();
8690 + // old: break;
8692 + case INIT_TEST:
8693 + init_signal_Handling(pResult);
8694 + break;
8696 + case RELEASE_TEST:
8697 + release_signal_Handling();
8698 + break;
8700 + default:
8701 + fprintf(stderr, "ExceptionA: Can't handle the tag type %d\n", SAL_STATIC_CAST(int, nTagType));
8702 + break;
8705 + catch (std::exception &e)
8707 + fprintf(stderr, "ExecutionA: exception caught: %s\n", e.what());
8708 + fflush(stderr);
8709 + // throw e;
8711 + return nRetValue;
8714 +// -----------------------------------------------------------------------------
8715 +std::string getSignalName(sal_Int32 nSignalNo)
8717 + std::string sValue;
8718 +#ifdef UNX
8719 + switch(nSignalNo)
8721 + case SIGHUP:
8722 + sValue = "SIGHUP";
8723 + break;
8725 + case SIGINT:
8726 + sValue = "SIGINT";
8727 + break;
8729 + case SIGQUIT:
8730 + sValue = "SIGQUIT";
8731 + break;
8733 + case SIGILL:
8734 + sValue = "SIGILL";
8735 + break;
8737 + case SIGTRAP:
8738 + sValue = "SIGTRAP";
8739 + break;
8741 +#if ( SIGIOT != SIGABRT )
8742 + case SIGIOT:
8743 + sValue = "SIGIOT";
8744 + break;
8745 +#endif
8746 +// case SIGABRT:
8747 +#ifdef SIGEMT
8748 + case SIGEMT:
8749 + sValue = "SIGEMT";
8750 + break;
8751 +#endif
8752 + case SIGFPE:
8753 + sValue = "SIGFPE";
8754 + break;
8756 + case SIGKILL:
8757 + sValue = "SIGKILL";
8758 + break;
8760 + case SIGBUS:
8761 + sValue = "SIGBUS";
8762 + break;
8764 + case SIGSEGV:
8765 + sValue = "SIGSEGV";
8766 + break;
8768 +#ifdef SIGSYS
8769 + case SIGSYS:
8770 + sValue = "SIGSYS";
8771 + break;
8772 +#endif
8773 + case SIGPIPE:
8774 + sValue = "SIGPIPE";
8775 + break;
8777 + case SIGALRM:
8778 + sValue = "SIGALRM";
8779 + break;
8781 + case SIGTERM:
8782 + sValue = "SIGTERM";
8783 + break;
8785 + case SIGUSR1:
8786 + sValue = "SIGUSR1";
8787 + break;
8789 + case SIGUSR2:
8790 + sValue = "SIGUSR2";
8791 + break;
8793 + case SIGCHLD:
8794 + sValue = "SIGCHLD";
8795 + break;
8797 +#ifdef SIGPWR
8798 + case SIGPWR:
8799 + sValue = "SIGPWR";
8800 + break;
8801 +#endif
8802 + case SIGWINCH:
8803 + sValue = "SIGWINCH";
8804 + break;
8806 + case SIGURG:
8807 + sValue = "SIGURG";
8808 + break;
8810 +#ifdef SIGPOLL
8811 + case SIGPOLL:
8812 + sValue = "SIGPOLL";
8813 + break;
8814 +#endif
8815 + case SIGSTOP:
8816 + sValue = "SIGSTOP";
8817 + break;
8819 + case SIGTSTP:
8820 + sValue = "SIGTSTP";
8821 + break;
8823 + case SIGCONT:
8824 + sValue = "SIGCONT";
8825 + break;
8827 + case SIGTTIN:
8828 + sValue = "SIGTTIN";
8829 + break;
8831 + case SIGTTOU:
8832 + sValue = "SIGTTOU";
8833 + break;
8835 + case SIGVTALRM:
8836 + sValue = "SIGVTALRM";
8837 + break;
8839 + case SIGPROF:
8840 + sValue = "SIGPROF";
8841 + break;
8843 + case SIGXCPU:
8844 + sValue = "SIGXCPU";
8845 + break;
8847 + case SIGXFSZ:
8848 + sValue = "SIGXFSZ";
8849 + break;
8851 + default:
8852 + sValue = "Unhandled Signal.";
8854 +#else
8855 + (void) nSignalNo; // unused
8856 +#endif
8857 + return sValue;
8860 +// The following sets variables for GNU EMACS
8861 +// Local Variables:
8862 +// tab-width:4
8863 +// End:
8864 Nur in misc/build/cppunit-1.8.0/src/result: signal.cxx.dummy.
8865 --- misc/cppunit-1.8.0/src/result/signal.hxx 2008-12-10 20:46:09.813916116 +0100
8866 +++ misc/build/cppunit-1.8.0/src/result/signal.hxx 2008-07-07 08:14:56.000000000 +0200
8867 @@ -1 +1,42 @@
8868 -dummy
8869 +/*************************************************************************
8871 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8872 + *
8873 + * Copyright 2008 by Sun Microsystems, Inc.
8875 + * OpenOffice.org - a multi-platform office productivity suite
8877 + * $RCSfile$
8878 + * $Revision$
8880 + * This file is part of OpenOffice.org.
8882 + * OpenOffice.org is free software: you can redistribute it and/or modify
8883 + * it under the terms of the GNU Lesser General Public License version 3
8884 + * only, as published by the Free Software Foundation.
8886 + * OpenOffice.org is distributed in the hope that it will be useful,
8887 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
8888 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8889 + * GNU Lesser General Public License version 3 for more details
8890 + * (a copy is included in the LICENSE file that accompanied this code).
8892 + * You should have received a copy of the GNU Lesser General Public License
8893 + * version 3 along with OpenOffice.org. If not, see
8894 + * <http://www.openoffice.org/license.html>
8895 + * for a copy of the LGPLv3 License.
8897 + ************************************************************************/
8899 +#ifndef SIGNAL_HXX
8900 +#define SIGNAL_HXX
8902 +#include <sal/types.h>
8904 +#define HAS_SIGNAL 1
8905 +#define NO_SIGNAL 0
8907 +typedef sal_Int32 Signal;
8909 +#endif
8911 Nur in misc/build/cppunit-1.8.0/src/result: signal.hxx.dummy.
8912 --- misc/cppunit-1.8.0/src/result/testshlTestResult.cxx 2008-12-10 20:46:09.880238139 +0100
8913 +++ misc/build/cppunit-1.8.0/src/result/testshlTestResult.cxx 2008-12-09 09:06:11.000000000 +0100
8914 @@ -1 +1,428 @@
8915 -dummy
8916 +/*************************************************************************
8918 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8919 + *
8920 + * Copyright 2008 by Sun Microsystems, Inc.
8922 + * OpenOffice.org - a multi-platform office productivity suite
8924 + * $RCSfile$
8925 + * $Revision$
8927 + * This file is part of OpenOffice.org.
8929 + * OpenOffice.org is free software: you can redistribute it and/or modify
8930 + * it under the terms of the GNU Lesser General Public License version 3
8931 + * only, as published by the Free Software Foundation.
8933 + * OpenOffice.org is distributed in the hope that it will be useful,
8934 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
8935 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8936 + * GNU Lesser General Public License version 3 for more details
8937 + * (a copy is included in the LICENSE file that accompanied this code).
8939 + * You should have received a copy of the GNU Lesser General Public License
8940 + * version 3 along with OpenOffice.org. If not, see
8941 + * <http://www.openoffice.org/license.html>
8942 + * for a copy of the LGPLv3 License.
8944 + ************************************************************************/
8946 +// MARKER(update_precomp.py): autogen include statement, do not remove
8947 +// #include "precompiled_cppunit.hxx"
8949 +#include <stdlib.h>
8951 +#include <map>
8952 +#include <cppunit/Exception.h>
8953 +#include <cppunit/NotEqualException.h>
8954 +#include <cppunit/Test.h>
8955 +#include <cppunit/TestFailure.h>
8956 +#include <cppunit/result/testshlTestResult.h>
8957 +// #include <TextTestResult.h>
8958 +//!io #include <iostream>
8959 +#include <string>
8961 +#include <rtl/string.hxx>
8962 +#include "cppunit/result/outputter.hxx"
8964 +namespace CppUnit {
8966 + testshlTestResult::testshlTestResult(GetOpt & _aOptions)
8967 + :TestResult(_aOptions),
8968 + m_aOptions(_aOptions),
8969 + // m_aOptionHelper(_aOptions),
8970 + m_aResulter(this)
8972 + addListener( &m_aResulter );
8975 + testshlTestResult::~testshlTestResult()
8979 +//# void
8980 +//# testshlTestResult::addFailure( const TestFailure &failure )
8981 +//# {
8982 +//# // TestResultCollector::addFailure( failure );
8983 +//# // std::cerr << ( failure.isError() ? "E" : "F" );
8984 +//# m_aResulter.addFailure(failure);
8985 +//# }
8986 +//#
8987 +//#
8988 +//# void
8989 +//# testshlTestResult::startTest( Test *test )
8990 +//# {
8991 +//# // TestResultCollector::startTest (test);
8992 +//# m_aResulter.startTest(test);
8993 +//# // std::cerr << ".";
8994 +//# }
8995 +//#
8996 +//# void testshlTestResult::endTest( Test *test )
8997 +//# {
8998 +//# }
9000 +// -----------------------------------------------------------------------------
9002 +//# void
9003 +//# testshlTestResult::printFailures( Outputter &stream )
9004 +//# {
9005 +//# TestFailures::const_iterator itFailure = failures().begin();
9006 +//# int failureNumber = 1;
9007 +//# while ( itFailure != failures().end() )
9008 +//# {
9009 +//# stream << std::endl;
9010 +//# printFailure( *itFailure++, failureNumber++, stream );
9011 +//# }
9012 +//# }
9013 +//#
9014 +//#
9015 +//# void
9016 +//# testshlTestResult::printFailure( TestFailure *failure,
9017 +//# int failureNumber,
9018 +//# std::ostream &stream )
9019 +//# {
9020 +//# printFailureListMark( failureNumber, stream );
9021 +//# stream << ' ';
9022 +//# printFailureTestName( failure, stream );
9023 +//# stream << ' ';
9024 +//# printFailureType( failure, stream );
9025 +//# stream << ' ';
9026 +//# printFailureLocation( failure->sourceLine(), stream );
9027 +//# stream << std::endl;
9028 +//# printFailureDetail( failure->thrownException(), stream );
9029 +//# stream << std::endl;
9030 +//# }
9031 +//#
9032 +//#
9033 +//# void
9034 +//# testshlTestResult::printFailureListMark( int failureNumber,
9035 +//# std::ostream &stream )
9036 +//# {
9037 +//# stream << failureNumber << ")";
9038 +//# }
9039 +//#
9040 +//#
9041 +//# void
9042 +//# testshlTestResult::printFailureTestName( TestFailure *failure,
9043 +//# std::ostream &stream )
9044 +//# {
9045 +//# Test* pTest = failure->failedTest();
9046 +//# stream << "test: " << pTest->getName();
9047 +//# }
9048 +//#
9049 +//#
9050 +//# void
9051 +//# testshlTestResult::printFailureType( TestFailure *failure,
9052 +//# std::ostream &stream )
9053 +//# {
9054 +//# stream << "("
9055 +//# << (failure->isError() ? "E" : "F")
9056 +//# << ")";
9057 +//# }
9058 +//#
9059 +//#
9060 +//# void
9061 +//# testshlTestResult::printFailureLocation( SourceLine sourceLine,
9062 +//# std::ostream &stream )
9063 +//# {
9064 +//# if ( !sourceLine.isValid() )
9065 +//# return;
9066 +//#
9067 +//# stream << "line: " << sourceLine.lineNumber()
9068 +//# << ' ' << sourceLine.fileName();
9069 +//# }
9070 +//#
9071 +//#
9072 +//# void
9073 +//# testshlTestResult::printFailureDetail( Exception *thrownException,
9074 +//# std::ostream &stream )
9075 +//# {
9076 +//# if ( thrownException->isInstanceOf( NotEqualException::type() ) )
9077 +//# {
9078 +//# NotEqualException *e = (NotEqualException*)thrownException;
9079 +//# stream << "expected: " << e->expectedValue() << std::endl
9080 +//# << "but was: " << e->actualValue();
9081 +//# if ( !e->additionalMessage().empty() )
9082 +//# {
9083 +//# stream << std::endl;
9084 +//# stream << "additional message:" << std::endl
9085 +//# << e->additionalMessage();
9086 +//# }
9087 +//# }
9088 +//# else
9089 +//# {
9090 +//# stream << " \"" << thrownException->what() << "\"";
9091 +//# }
9092 +//# }
9095 +// LLA: output format:
9096 +// Header
9097 +// # -- BEGIN
9098 +// Error lines
9099 +// No error lines
9100 +// unknown lines
9101 +// # -- END
9102 +// Text 'Test #PASSED#' or 'Errors only'
9104 +void
9105 +testshlTestResult::print( Outputter& stream )
9107 + printHeader( stream );
9108 + // stream << std::endl;
9109 + // printFailures( stream );
9111 + bool bPassed = false;
9112 + if (isOnlyShowJobs())
9114 + JobList jl(m_aOptionHelper.getJobOnlyList());
9115 + HashMap aJobList = jl.getHashMap();
9116 + printLines(stream, aJobList);
9118 + else
9120 + stream << "# -- BEGIN:" << Outputter::endl();
9122 + TestPtrList aFailedTests;
9124 + // List of failures
9125 + printFailedTests(stream, aFailedTests);
9127 + if (! m_aOptionHelper.getOptions().hasOpt("-onlyerrors"))
9129 + // List of well done tests
9130 + printTestLines(stream, aFailedTests);
9132 + // List of unknown Tests
9133 + JobList jl(m_aOptionHelper.getJobOnlyList());
9134 + HashMap aJobList = jl.getHashMap();
9135 + printUnknownLines(stream, aJobList);
9137 + bPassed = true;
9139 + stream << "# -- END:" << Outputter::endl();
9141 + if (bPassed)
9143 + stream << "Test #PASSED#" << Outputter::endl();
9146 + if (m_aOptionHelper.getOptions().hasOpt("-onlyerrors"))
9148 + stream << "Errors only." << Outputter::endl();
9153 +// -----------------------------------------------------------------------------
9154 +void
9155 +testshlTestResult::printLines(Outputter &stream, HashMap & _aJobList)
9157 + int nCount = _aJobList.size();
9158 + if (nCount != 0)
9160 + for (HashMap::const_iterator it = _aJobList.begin();
9161 + it != _aJobList.end();
9162 + ++it)
9164 + std::string aKey = (*it).first;
9165 + if (_aJobList[aKey] == JOB_ACCESS)
9167 + stream << aKey;
9168 + stream << Outputter::endl();
9174 +void
9175 +testshlTestResult::printFailedTests(Outputter &stream, TestPtrList &aFailedTests)
9177 + for (TestResultCollector::TestFailures::const_iterator it2 = m_aResulter.failures().begin();
9178 + it2 != m_aResulter.failures().end();
9179 + ++it2)
9181 + TestFailureEnvelope *pEnvelop = *it2;
9182 + TestFailure *pFailure = pEnvelop->getTestFailure();
9183 + std::string sNodeName = pEnvelop->getString();
9185 + aFailedTests[ pFailure->failedTest() ] = true;
9187 + printFailureLine(stream, pFailure, sNodeName);
9191 +void
9192 +testshlTestResult::printTestLines(Outputter &stream, TestPtrList &aFailedTests)
9194 + for (TestResultCollector::Tests::const_iterator it = m_aResulter.tests().begin();
9195 + it != m_aResulter.tests().end();
9196 + ++it)
9198 + TestEnvelope *pEnvelop = *it;
9199 + Test* pTest = pEnvelop->getTest();
9200 + std::string sNodeName = pEnvelop->getString();
9202 + if (aFailedTests.find(pTest) == aFailedTests.end())
9204 + std::string sInfo = m_aResulter.getInfo(pTest);
9205 + printTestLine(stream, pTest, sNodeName, sInfo);
9210 +void
9211 +testshlTestResult::printUnknownLines(Outputter &stream, HashMap & _aJobList)
9213 + int nCount = _aJobList.size();
9214 + if (nCount != 0)
9216 + for (HashMap::const_iterator it = _aJobList.begin();
9217 + it != _aJobList.end();
9218 + ++it)
9220 + std::string aKey = (*it).first;
9221 + if (_aJobList[aKey] == JOB_UNKNOWN)
9223 + printUnknownLine(stream, aKey);
9229 +void
9230 +testshlTestResult::printHeader( Outputter &stream )
9232 + std::string sDate(m_aOptionHelper.createDateTag());
9233 + if (isOnlyShowJobs())
9235 + stream << "# This is an automatically generated job file." << Outputter::endl();
9236 + stream << "# ";
9238 + else
9240 + stream << sDate << Outputter::endl();
9244 +void
9245 +testshlTestResult::printFailureLine( Outputter &stream, TestFailure *_pFailure, std::string const& _sNodeName)
9247 + std::string aName;
9248 + aName += _sNodeName;
9249 + aName += ".";
9250 + aName += _pFailure->failedTestName();
9252 + SourceLine aLine = _pFailure->sourceLine();
9253 + sal_Int32 nLine = -1;
9254 + std::string sFilename;
9255 + if (aLine.isValid())
9257 + nLine = aLine.lineNumber();
9258 + sFilename = aLine.fileName();
9261 + Exception *pExp = _pFailure->thrownException();
9262 + std::string sWhat;
9263 + if (pExp)
9265 + sWhat = pExp->what();
9268 + ErrorType::num eErr = _pFailure->getErrorType();
9270 + stream << aName;
9271 + stream << ";";
9273 + if (eErr == ErrorType::ET_FAILURE)
9274 + stream << "FAILED";
9276 + else if (eErr == ErrorType::ET_ERROR)
9277 + stream << "ERROR";
9279 + else if (eErr == ErrorType::ET_SIGNAL)
9280 + stream << "SIGNAL";
9282 + else
9283 + stream << "UNKNOWN";
9285 + stream << "#FAILED#";
9287 + stream << sWhat;
9288 + stream << Outputter::endl();
9291 +void
9292 +testshlTestResult::printTestLine( Outputter &stream, Test* _pTest, std::string const& _sNodeName, std::string const& _sInfo)
9294 + std::string aName;
9295 + aName += _sNodeName;
9296 + aName += ".";
9297 + aName += _pTest->getName();
9299 + stream << aName;
9300 + stream << ";";
9301 + stream << _sInfo << "#";
9302 + if (_sInfo == "PASSED")
9304 + stream << "OK#";
9306 + else
9308 + stream << "FAILED#";
9310 + stream << Outputter::endl();
9313 +void
9314 +testshlTestResult::printUnknownLine( Outputter &stream, std::string const& _sTestName)
9316 + stream << _sTestName;
9317 + stream << ";";
9318 + stream << "UNKNOWN#";
9319 + stream << "FAILED#";
9320 + stream << Outputter::endl();
9323 +//# void
9324 +//# testshlTestResult::printStatistics( Outputter &stream )
9325 +//# {
9326 +//# stream << "Test Results:" << std::endl;
9327 +//#
9328 +//# stream << "Run: " << runTests()
9329 +//# << " Failures: " << testFailures()
9330 +//# << " Errors: " << testErrors()
9331 +//# << std::endl;
9332 +//# }
9335 +Outputter &
9336 +operator <<( Outputter &stream,
9337 + testshlTestResult &result )
9339 + result.print (stream); return stream;
9343 +} // namespace CppUnit
9344 Nur in misc/build/cppunit-1.8.0/src/result: testshlTestResult.cxx.dummy.
9345 --- misc/cppunit-1.8.0/src/result/treswrapper.cxx 2008-12-10 20:46:09.979665912 +0100
9346 +++ misc/build/cppunit-1.8.0/src/result/treswrapper.cxx 2008-12-09 09:06:10.000000000 +0100
9347 @@ -1 +1,261 @@
9348 -dummy
9349 +/*************************************************************************
9351 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9352 + *
9353 + * Copyright 2008 by Sun Microsystems, Inc.
9355 + * OpenOffice.org - a multi-platform office productivity suite
9357 + * $RCSfile$
9358 + * $Revision$
9360 + * This file is part of OpenOffice.org.
9362 + * OpenOffice.org is free software: you can redistribute it and/or modify
9363 + * it under the terms of the GNU Lesser General Public License version 3
9364 + * only, as published by the Free Software Foundation.
9366 + * OpenOffice.org is distributed in the hope that it will be useful,
9367 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
9368 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9369 + * GNU Lesser General Public License version 3 for more details
9370 + * (a copy is included in the LICENSE file that accompanied this code).
9372 + * You should have received a copy of the GNU Lesser General Public License
9373 + * version 3 along with OpenOffice.org. If not, see
9374 + * <http://www.openoffice.org/license.html>
9375 + * for a copy of the LGPLv3 License.
9377 + ************************************************************************/
9379 +// MARKER(update_precomp.py): autogen include statement, do not remove
9380 +// #include "precompiled_cppunit.hxx"
9382 +#include <cstdarg>
9383 +#include <stdlib.h>
9384 +#include <stdio.h>
9386 +#include <sal/types.h>
9387 +#include <cppunit/Test.h>
9388 +#include "cppunit/autoregister/htestresult.h"
9389 +#include "cppunit/autoregister/callbackfunc_fktptr.h"
9390 +#include "cppunit/result/callbackfunc.h"
9391 +#include "cppunit/result/TestResult.h"
9393 +#include <cppunit/tagvalues.hxx>
9395 +namespace
9397 + void TestResult_startTest(hTestResult _pResult, hTest _pTest)
9398 + {
9399 + CppUnit::TestResult* pResult = (CppUnit::TestResult*)_pResult;
9400 + CppUnit::Test* pTest = (CppUnit::Test*)_pTest;
9402 + std::string sName = pTest->getName();
9403 + CallbackDispatch(0 /* NULL */, TAG_TYPE, SIGNAL_START_TEST, TAG_RESULT_PTR, _pResult, TAG_NODENAME, sName.c_str(), TAG_DONE);
9405 + pResult->startTest(pTest);
9408 + void TestResult_endTest( hTestResult _pResult, hTest _pTest )
9410 + CppUnit::TestResult* pResult = (CppUnit::TestResult*)_pResult;
9411 + CppUnit::Test* pTest = (CppUnit::Test*)_pTest;
9412 + pResult->endTest(pTest);
9414 + std::string sName = pTest->getName();
9415 + CallbackDispatch(0 /* NULL */, TAG_TYPE, SIGNAL_END_TEST, TAG_RESULT_PTR, _pResult, TAG_NODENAME, sName.c_str(), TAG_DONE);
9418 +// -----------------------------------------------------------------------------
9420 + void TestResult_addFailure( hTestResult _pResult, hTest _pTest, hException _pException )
9422 + CppUnit::TestResult* pResult = (CppUnit::TestResult*)_pResult;
9423 + CppUnit::Test* pTest = (CppUnit::Test*)_pTest;
9424 + CppUnit::Exception* pException = (CppUnit::Exception*)_pException;
9425 + pResult->addFailure(pTest, pException);
9428 + void TestResult_addError( hTestResult _pResult, hTest _pTest, hException _pException )
9430 + CppUnit::TestResult* pResult = (CppUnit::TestResult*)_pResult;
9431 + CppUnit::Test* pTest = (CppUnit::Test*)_pTest;
9432 + CppUnit::Exception* pException = (CppUnit::Exception*)_pException;
9433 + pResult->addError(pTest, pException);
9436 + sal_Int32 TestResult_shouldStop(hTestResult _pResult)
9438 + CppUnit::TestResult* pResult = (CppUnit::TestResult*)_pResult;
9439 + return pResult->shouldStop() == true ? 1 : 0;
9442 +// -----------------------------------------------------------------------------
9443 + void TestResult_addInfo( hTestResult _pResult, hTest _pTest, const char* _sInfo )
9445 + CppUnit::TestResult* pResult = (CppUnit::TestResult*)_pResult;
9446 + CppUnit::Test* pTest = (CppUnit::Test*)_pTest;
9447 + // CppUnit::Exception* pException = (CppUnit::Exception*)_pException;
9448 + pResult->addInfo(pTest, _sInfo);
9450 +// -----------------------------------------------------------------------------
9451 + void TestResult_enterNode( hTestResult _pResult, const char* _sNode )
9453 + // signalPushName(getName());
9454 + // CallbackDispatch(NULL, TAG_TYPE, EXECUTION_PUSH_NAME, TAG_RESULT_PTR, _pResult, TAG_NODENAME, _sNode, TAG_DONE);
9456 + CppUnit::TestResult* pResult = (CppUnit::TestResult*)_pResult;
9457 + // CppUnit::Test* pTest = (CppUnit::Test*)_pTest;
9458 + // CppUnit::Exception* pException = (CppUnit::Exception*)_pException;
9459 + pResult->enterNode(_sNode);
9461 + void TestResult_leaveNode( hTestResult _pResult, const char* _sNode )
9463 + CppUnit::TestResult* pResult = (CppUnit::TestResult*)_pResult;
9464 + // CppUnit::Test* pTest = (CppUnit::Test*)_pTest;
9465 + // CppUnit::Exception* pException = (CppUnit::Exception*)_pException;
9466 + pResult->leaveNode(_sNode);
9468 + // CallbackDispatch(NULL, TAG_TYPE, EXECUTION_POP_NAME, TAG_RESULT_PTR, _pResult, TAG_DONE);
9471 +// -----------------------------------------------------------------------------
9472 + sal_Int32 TestResult_StarterA(TagHelper const& _aTagItems)
9474 + sal_Int32 nRetValue = 0;
9475 + TagData nTagType = _aTagItems.GetTagData(TAG_TYPE, 0);
9476 + hTestResult pResult = (hTestResult) _aTagItems.GetTagData(TAG_RESULT_PTR, 0 /* NULL */);
9477 + CppUnit::Test* pTest = (CppUnit::Test*) _aTagItems.GetTagData(TAG_TEST_PTR, 0 /* NULL */);
9479 + try
9481 + switch(nTagType)
9483 + case RESULT_START:
9484 + TestResult_startTest(pResult, pTest);
9485 + break;
9487 + case RESULT_END:
9488 + TestResult_endTest(pResult, pTest);
9489 + break;
9491 + case RESULT_ADD_FAILURE:
9493 + hException pException = (hException) _aTagItems.GetTagData(TAG_EXCEPTION, 0);
9494 + TestResult_addFailure(pResult, pTest, pException);
9495 + break;
9498 + case RESULT_ADD_ERROR:
9500 + hException pException = (hException) _aTagItems.GetTagData(TAG_EXCEPTION, 0);
9501 + TestResult_addError(pResult, pTest, pException);
9502 + break;
9505 + case RESULT_ADD_INFO:
9507 + const char* pInfo = (const char* ) _aTagItems.GetTagData(TAG_INFO, 0);
9508 + TestResult_addInfo(pResult, pTest, pInfo);
9509 + break;
9512 + case RESULT_ENTER_NODE:
9514 + const char* pNode = (const char* )_aTagItems.GetTagData(TAG_NODENAME, 0);
9515 + TestResult_enterNode(pResult, pNode);
9516 + break;
9519 + case RESULT_LEAVE_NODE:
9521 + const char* pNode = (const char* ) _aTagItems.GetTagData(TAG_NODENAME, 0);
9522 + TestResult_leaveNode(pResult, pNode);
9523 + break;
9526 + case RESULT_SHOULD_STOP:
9527 + nRetValue = TestResult_shouldStop(pResult);
9528 + break;
9530 + default:
9531 + fprintf(stderr, "TestResult_StarterA: Can't handle the tag type %8x\n", SAL_STATIC_CAST(int, nTagType));
9532 + fflush(stderr);
9533 + // throw std::exception(/*std::string("Unknown TYPE_TAG Exception.")*/);
9536 + catch (std::exception &e)
9538 + fprintf(stderr, "TestResult_StarterA: Exception caught: %s\n", e.what());
9539 + // throw e;
9542 + return nRetValue;
9544 +} // namespace anonymous
9546 +// --------------------------------- Prototypes ---------------------------------
9548 +sal_Int32 SignalHandlerA( TagHelper const& _aTagItems );
9549 +sal_Int32 ExecutionA( TagHelper const& _aTagItems );
9551 +// -----------------------------------------------------------------------------
9552 +sal_Int32 CallbackDispatch(int x, ...)
9554 + (void) x; // avoid warning
9556 + // The idea behind TagItems are from the Amiga OS.
9557 + // Due to the fact that the following code does not find my ok
9558 + // I decide to wrote a simple helper
9559 + //
9560 + // struct TagItem *tags = (struct TagItem *)&x + 1;
9562 + TagHelper aTagItems;
9564 + // the following code could also be in a #define, so other functions could
9565 + // use this, but at the moment this function a the only one.
9567 + // FILL_TAGS(aTagItems, x);
9568 + std::va_list args;
9569 + va_start( args, x );
9570 + Tag nTag;
9571 + do
9573 + nTag = va_arg(args, Tag);
9574 + if (nTag != TAG_DONE)
9576 + TagData nValue = va_arg(args, TagData);
9577 + // printf("Tag: %8x Value:%8x\n", nTag, nValue);
9578 + aTagItems.insert(nTag, nValue);
9580 + } while (nTag != TAG_DONE);
9582 + va_end ( args );
9584 + // FILL_TAGS:END
9586 + // printf(".\n");
9588 + sal_Int32 nRetValue = 0;
9589 + Tag nPreTag = aTagItems.GetTagData(TAG_TYPE);
9590 + if ( (nPreTag & TAG_RESULT) == TAG_RESULT)
9592 + nRetValue = TestResult_StarterA( aTagItems );
9594 + else if ((nPreTag & TAG_SIGNAL) == TAG_SIGNAL)
9596 + nRetValue = SignalHandlerA(aTagItems);
9598 + else if (( nPreTag & TAG_EXECUTION) == TAG_EXECUTION)
9600 + nRetValue = ExecutionA(aTagItems);
9602 + else
9604 + fprintf(stderr, "CallbackDispatch: First tag is unknown %8x\n", SAL_STATIC_CAST(int, nPreTag));
9605 + // unknown TAG_TYPE
9607 + return nRetValue;
9610 Nur in misc/build/cppunit-1.8.0/src/result: treswrapper.cxx.dummy.
9611 --- misc/cppunit-1.8.0/src/win32/makefile.mk 2008-12-10 20:46:10.024158685 +0100
9612 +++ misc/build/cppunit-1.8.0/src/win32/makefile.mk 2008-12-10 19:45:23.000000000 +0100
9613 @@ -1 +1,67 @@
9614 -dummy
9615 +#*************************************************************************
9617 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9619 +# Copyright 2008 by Sun Microsystems, Inc.
9621 +# OpenOffice.org - a multi-platform office productivity suite
9623 +# $RCSfile$
9625 +# $Revision$
9627 +# This file is part of OpenOffice.org.
9629 +# OpenOffice.org is free software: you can redistribute it and/or modify
9630 +# it under the terms of the GNU Lesser General Public License version 3
9631 +# only, as published by the Free Software Foundation.
9633 +# OpenOffice.org is distributed in the hope that it will be useful,
9634 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
9635 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9636 +# GNU Lesser General Public License version 3 for more details
9637 +# (a copy is included in the LICENSE file that accompanied this code).
9639 +# You should have received a copy of the GNU Lesser General Public License
9640 +# version 3 along with OpenOffice.org. If not, see
9641 +# <http://www.openoffice.org/license.html>
9642 +# for a copy of the LGPLv3 License.
9644 +#*************************************************************************
9645 +PRJ=..$/..$/..$/..$/..$/..
9646 +INCEXT=..$/..$/include
9647 +# PRJ=..$/..
9648 +# PRJINC=..
9650 +PRJNAME=cppunit
9651 +TARGET=c5t_winstuff
9652 +LIBTARGET=NO
9653 +ENABLE_EXCEPTIONS=TRUE
9655 +# --- Settings -----------------------------------------------------
9656 +.INCLUDE : settings.mk
9658 +# ------------------------------------------------------------------
9660 +SLOFILES = \
9661 + $(SLO)$/winstuff.obj
9663 +#-------------------------------------------------------------------------------
9664 +# This is a static lib
9665 +LIB1TARGET= $(LB)$/$(TARGET).lib
9666 +LIB1OBJFILES= \
9667 + $(SLOFILES)
9669 +.IF "$(GUI)"=="WNT"
9670 +.IF "$(COM)"=="GCC"
9671 +LIB1ARCHIV=$(LB)$/lib$(TARGET)$(DLLPOSTFIX).a
9672 +.ENDIF
9673 +.ENDIF
9675 +.IF "$(GUI)" == "UNX"
9676 +LIB1ARCHIV=$(LB)$/lib$(TARGET)$(DLLPOSTFIX).a
9677 +.ENDIF
9679 +# --- Targets ------------------------------------------------------
9681 +.INCLUDE : target.mk
9682 Nur in misc/build/cppunit-1.8.0/src/win32: makefile.mk.dummy.
9683 --- misc/cppunit-1.8.0/src/win32/winstuff.cxx 2008-12-10 20:46:10.106772548 +0100
9684 +++ misc/build/cppunit-1.8.0/src/win32/winstuff.cxx 2008-12-10 20:42:44.000000000 +0100
9685 @@ -1 +1,143 @@
9686 -dummy
9687 +/*************************************************************************
9689 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9690 + *
9691 + * Copyright 2008 by Sun Microsystems, Inc.
9693 + * OpenOffice.org - a multi-platform office productivity suite
9695 + * $RCSfile$
9696 + * $Revision$
9698 + * This file is part of OpenOffice.org.
9700 + * OpenOffice.org is free software: you can redistribute it and/or modify
9701 + * it under the terms of the GNU Lesser General Public License version 3
9702 + * only, as published by the Free Software Foundation.
9704 + * OpenOffice.org is distributed in the hope that it will be useful,
9705 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
9706 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9707 + * GNU Lesser General Public License version 3 for more details
9708 + * (a copy is included in the LICENSE file that accompanied this code).
9710 + * You should have received a copy of the GNU Lesser General Public License
9711 + * version 3 along with OpenOffice.org. If not, see
9712 + * <http://www.openoffice.org/license.html>
9713 + * for a copy of the LGPLv3 License.
9715 + ************************************************************************/
9717 +// MARKER(update_precomp.py): autogen include statement, do not remove
9718 +// #include "precompiled_cppunit.hxx"
9720 +#ifdef WIN32
9721 +#include "testshl/winstuff.hxx"
9723 +#if defined _MSC_VER
9724 +#pragma warning(push, 1)
9725 +#endif
9726 +#include <windows.h>
9727 +#if defined _MSC_VER
9728 +#pragma warning(pop)
9729 +#endif
9730 +#include <MAPIWin.h>
9732 +void WinDebugBreak()
9734 + // forward to WinAPI. Note that the whole story is simply to
9735 + // disentangle OOo headers from Windows headers (which are largely
9736 + // incompatible, due to name clashes and macro mess-ups)
9737 + DebugBreak();
9740 +void WinSleep( sal_uInt32 sec )
9742 + Sleep(sec * 1000);
9745 +sal_uInt32 WinGetCurrentProcessId()
9747 + return GetCurrentProcessId();
9750 +#define TA_FAILED 0
9751 +#define TA_SUCCESS_CLEAN 1
9752 +#define TA_SUCCESS_KILL 2
9753 +#define TA_SUCCESS_16 3
9755 + // Declare Callback Enum Functions.
9756 +bool CALLBACK TerminateAppEnum( HWND hwnd, LPARAM lParam );
9758 +/*----------------------------------------------------------------
9759 + DWORD WINAPI TerminateApp( DWORD dwPID, DWORD dwTimeout )
9761 + Purpose:
9762 + Shut down a 32-Bit Process (or 16-bit process under Windows 95)
9764 + Parameters:
9765 + dwPID
9766 + Process ID of the process to shut down.
9768 + dwTimeout
9769 + Wait time in milliseconds before shutting down the process.
9771 + Return Value:
9772 + TA_FAILED - If the shutdown failed.
9773 + TA_SUCCESS_CLEAN - If the process was shutdown using WM_CLOSE.
9774 + TA_SUCCESS_KILL - if the process was shut down with
9775 + TerminateProcess().
9776 + NOTE: See header for these defines.
9777 + ----------------------------------------------------------------*/
9778 +void WinTerminateApp( sal_uInt32 dwPID, sal_uInt32 dwTimeout )
9780 + HANDLE hProc;
9781 + DWORD dwRet;
9783 + // If we can't open the process with PROCESS_TERMINATE rights,
9784 + // then we give up immediately.
9785 + hProc = OpenProcess(SYNCHRONIZE|PROCESS_TERMINATE, false,
9786 + dwPID);
9788 + if(hProc == NULL)
9789 + return;
9791 + // TerminateAppEnum() posts WM_CLOSE to all windows whose PID
9792 + // matches your process's.
9793 + EnumWindows((WNDENUMPROC)TerminateAppEnum, (LPARAM) dwPID);
9795 + // Wait on the handle. If it signals, great. If it times out,
9796 + // then you kill it.
9797 + if (WaitForSingleObject(hProc, dwTimeout) != WAIT_OBJECT_0)
9798 + dwRet= (TerminateProcess(hProc,0) ? TA_SUCCESS_KILL : TA_FAILED);
9799 + else
9800 + dwRet = TA_SUCCESS_CLEAN;
9802 + CloseHandle(hProc);
9805 +bool CALLBACK TerminateAppEnum( HWND hwnd, LPARAM lParam )
9807 + DWORD dwID;
9809 + GetWindowThreadProcessId(hwnd, &dwID);
9811 + if(dwID == (DWORD)lParam)
9813 + PostMessage(hwnd, WM_CLOSE, 0, 0);
9816 + return true;
9818 +#else
9820 +// this file is only need within Windows.
9821 +// due to the fact that empty files don't create libraries
9822 +// we store one function in it.
9823 +int WinStuffDummy_this_function_will_never_need()
9825 + return 42; // we need some code
9828 +#endif /* WIN32 */
9830 Nur in misc/build/cppunit-1.8.0/src/win32: winstuff.cxx.dummy.