[Cppunit-devel] Small patch for cppunit on Alpha Tru64 Unix 5.1
Brought to you by:
blep
|
From: Petter R. <pe...@hu...> - 2001-06-09 00:25:22
|
Hello
I had to apply the following patch to get cppunit 1.5.5 to compile
using Compaq C++ on Tru64 Unix. Please include it in the next
distribution. :-)
diff -cr /store/store/palantir/cppunit/src-1.5.5/src/cppunit/TextTestResult.cpp src-1.5.5-alphadec5/src/cppunit/TextTestResult.cpp
*** /store/store/palantir/cppunit/src-1.5.5/src/cppunit/TextTestResult.cpp Thu Jun 7 10:19:51 2001
--- src-1.5.5-alphadec5/src/cppunit/TextTestResult.cpp Sat Jun 9 02:15:28 2001
***************
*** 1,3 ****
--- 1,7 ----
+ // Needed on Tru64 Unix 5.1 to choose if pre-ANSI or ANSI iostreams should
+ // be used.
+ #define __USE_STD_IOSTREAM
+
#include <iostream>
#include "cppunit/TextTestResult.h"
#include "cppunit/Exception.h"
***************
*** 7,13 ****
namespace CppUnit {
std::ostream&
! CppUnit::operator<< (std::ostream& stream, TextTestResult& result)
{
result.print (stream); return stream;
}
--- 11,17 ----
namespace CppUnit {
std::ostream&
! operator<< (std::ostream& stream, TextTestResult& result)
{
result.print (stream); return stream;
}
diff -cr /store/store/palantir/cppunit/src-1.5.5/examples/hierarchy/main.cpp src-1.5.5-alphadec5/examples/hierarchy/main.cpp
*** /store/store/palantir/cppunit/src-1.5.5/examples/hierarchy/main.cpp Thu Jun 7 10:19:49 2001
--- src-1.5.5-alphadec5/examples/hierarchy/main.cpp Sat Jun 9 02:16:23 2001
***************
*** 1,3 ****
--- 1,5 ----
+ #define __USE_STD_IOSTREAM
+
#include "cppunit/TestRegistry.h"
#include "cppunit/TextTestResult.h"
#include "cppunit/TestSuite.h"
diff -cr /store/store/palantir/cppunit/src-1.5.5/include/cppunit/Exception.h src-1.5.5-alphadec5/include/cppunit/Exception.h
*** /store/store/palantir/cppunit/src-1.5.5/include/cppunit/Exception.h Thu Jun 7 10:19:50 2001
--- src-1.5.5-alphadec5/include/cppunit/Exception.h Sat Jun 9 02:09:56 2001
***************
*** 12,18 ****
*
*/
! class Exception : public exception
{
public:
Exception (std::string message = "",
--- 12,18 ----
*
*/
! class Exception : public std::exception
{
public:
Exception (std::string message = "",
***************
*** 20,26 ****
std::string fileName = UNKNOWNFILENAME);
Exception (const Exception& other);
! virtual ~Exception ();
Exception& operator= (const Exception& other);
--- 20,26 ----
std::string fileName = UNKNOWNFILENAME);
Exception (const Exception& other);
! virtual ~Exception () throw();
Exception& operator= (const Exception& other);
diff -cr /store/store/palantir/cppunit/src-1.5.5/src/cppunit/Exception.cpp src-1.5.5-alphadec5/src/cppunit/Exception.cpp
*** /store/store/palantir/cppunit/src-1.5.5/src/cppunit/Exception.cpp Thu Jun 7 10:19:50 2001
--- src-1.5.5-alphadec5/src/cppunit/Exception.cpp Sat Jun 9 02:11:38 2001
***************
*** 23,29 ****
/// Destruct the exception
! CppUnit::Exception::~Exception ()
{}
--- 23,29 ----
/// Destruct the exception
! CppUnit::Exception::~Exception () throw ()
{}
diff -cr /store/store/palantir/cppunit/src-1.5.5/src/cppunit/TestCase.cpp src-1.5.5-alphadec5/src/cppunit/TestCase.cpp
*** /store/store/palantir/cppunit/src-1.5.5/src/cppunit/TestCase.cpp Thu Jun 7 10:19:51 2001
--- src-1.5.5-alphadec5/src/cppunit/TestCase.cpp Sat Jun 9 02:10:31 2001
***************
*** 31,37 ****
result->addFailure (this, copy);
}
! catch (exception& e) {
result->addError (this, new Exception (e.what ()));
}
--- 31,37 ----
result->addFailure (this, copy);
}
! catch (std::exception& e) {
result->addError (this, new Exception (e.what ()));
}
|