mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-16 18:56:52 +02:00
submitted 1.2.0
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// CppUnit.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/CppUnit.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/CppUnit.h#1 $
|
||||
//
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
// CppUnit_API functions as being imported from a DLL, wheras this DLL sees symbols
|
||||
// defined with this macro as being exported.
|
||||
//
|
||||
#if (defined(_WIN32) || defined(__CYGWIN__)) && defined(POCO_DLL)
|
||||
#if defined(_WIN32) && defined(POCO_DLL)
|
||||
#if defined(CppUnit_EXPORTS)
|
||||
#define CppUnit_API __declspec(dllexport)
|
||||
#else
|
||||
@@ -41,13 +41,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Macros to declare the namespace
|
||||
//
|
||||
#define CppUnit_BEGIN namespace CppUnit {
|
||||
#define CppUnit_END }
|
||||
|
||||
|
||||
// Turn off some annoying warnings
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4786) // identifier truncation warning
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// CppUnitException.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/CppUnitException.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/CppUnitException.h#1 $
|
||||
//
|
||||
|
||||
|
||||
@@ -9,20 +9,12 @@
|
||||
#define CppUnit_CppUnitException_INCLUDED
|
||||
|
||||
|
||||
#ifndef CppUnit_CppUnit_INCLUDED
|
||||
#include "CppUnit/CppUnit.h"
|
||||
#endif
|
||||
#ifndef STD_EXCEPTION_INCLUDED
|
||||
#include <exception>
|
||||
#define STD_EXCEPTION_INCLUDED
|
||||
#endif
|
||||
#ifndef STD_STRING_INCLUDED
|
||||
#include <string>
|
||||
#define STD_STRING_INCLUDED
|
||||
#endif
|
||||
|
||||
|
||||
CppUnit_BEGIN
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
class CppUnit_API CppUnitException: public std::exception
|
||||
@@ -33,6 +25,15 @@ public:
|
||||
CppUnitException(const std::string& message = "",
|
||||
long lineNumber = CPPUNIT_UNKNOWNLINENUMBER,
|
||||
const std::string& fileName = CPPUNIT_UNKNOWNFILENAME);
|
||||
CppUnitException(const std::string& message,
|
||||
long lineNumber,
|
||||
long data1lineNumber,
|
||||
const std::string& fileName);
|
||||
CppUnitException(const std::string& message,
|
||||
long lineNumber,
|
||||
long data1lineNumber,
|
||||
long data2lineNumber,
|
||||
const std::string& fileName);
|
||||
CppUnitException(const CppUnitException& other);
|
||||
virtual ~CppUnitException() throw();
|
||||
|
||||
@@ -41,6 +42,8 @@ public:
|
||||
const char* what() const throw ();
|
||||
|
||||
long lineNumber() const;
|
||||
long data1LineNumber() const;
|
||||
long data2LineNumber() const;
|
||||
const std::string& fileName() const;
|
||||
|
||||
static const std::string CPPUNIT_UNKNOWNFILENAME;
|
||||
@@ -49,18 +52,33 @@ public:
|
||||
private:
|
||||
std::string _message;
|
||||
long _lineNumber;
|
||||
long _data1lineNumber;
|
||||
long _data2lineNumber;
|
||||
std::string _fileName;
|
||||
};
|
||||
|
||||
|
||||
inline CppUnitException::CppUnitException(const CppUnitException& other): exception (other)
|
||||
{
|
||||
_message = other._message;
|
||||
_lineNumber = other._lineNumber;
|
||||
_fileName = other._fileName;
|
||||
_message = other._message;
|
||||
_lineNumber = other._lineNumber;
|
||||
_data1lineNumber = other._data1lineNumber;
|
||||
_data2lineNumber = other._data2lineNumber;
|
||||
_fileName = other._fileName;
|
||||
}
|
||||
|
||||
inline CppUnitException::CppUnitException (const std::string& message, long lineNumber, const std::string& fileName): _message(message), _lineNumber(lineNumber), _fileName(fileName)
|
||||
|
||||
inline CppUnitException::CppUnitException (const std::string& message, long lineNumber, const std::string& fileName): _message(message), _lineNumber(lineNumber), _data1lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _data2lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _fileName(fileName)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
inline CppUnitException::CppUnitException (const std::string& message, long lineNumber, long data1lineNumber, const std::string& fileName): _message(message), _lineNumber(lineNumber), _data1lineNumber(data1lineNumber), _data2lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _fileName(fileName)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
inline CppUnitException::CppUnitException (const std::string& message, long lineNumber, long data1lineNumber, long data2lineNumber, const std::string& fileName): _message(message), _lineNumber(lineNumber), _data1lineNumber(data1lineNumber), _data2lineNumber(data2lineNumber), _fileName(fileName)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -78,6 +96,8 @@ inline CppUnitException& CppUnitException::operator = (const CppUnitException& o
|
||||
{
|
||||
_message = other._message;
|
||||
_lineNumber = other._lineNumber;
|
||||
_data1lineNumber = other._data1lineNumber;
|
||||
_data2lineNumber = other._data2lineNumber;
|
||||
_fileName = other._fileName;
|
||||
}
|
||||
return *this;
|
||||
@@ -96,6 +116,18 @@ inline long CppUnitException::lineNumber() const
|
||||
}
|
||||
|
||||
|
||||
inline long CppUnitException::data1LineNumber() const
|
||||
{
|
||||
return _data1lineNumber;
|
||||
}
|
||||
|
||||
|
||||
inline long CppUnitException::data2LineNumber() const
|
||||
{
|
||||
return _data2lineNumber;
|
||||
}
|
||||
|
||||
|
||||
// The file in which the error occurred
|
||||
inline const std::string& CppUnitException::fileName() const
|
||||
{
|
||||
@@ -103,8 +135,7 @@ inline const std::string& CppUnitException::fileName() const
|
||||
}
|
||||
|
||||
|
||||
CppUnit_END
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
#endif // CppUnit_CppUnitException_INCLUDED
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Guards.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/Guards.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/Guards.h#1 $
|
||||
//
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Orthodox.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/Orthodox.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/Orthodox.h#1 $
|
||||
//
|
||||
|
||||
|
||||
@@ -9,15 +9,11 @@
|
||||
#define CppUnit_Orthodox_INCLUDED
|
||||
|
||||
|
||||
#ifndef CppUnit_CppUnit_INCLUDED
|
||||
#include "CppUnit/CppUnit.h"
|
||||
#endif
|
||||
#ifndef CppUnit_TestCase_INCLUDED
|
||||
#include "CppUnit/TestCase.h"
|
||||
#endif
|
||||
|
||||
|
||||
CppUnit_BEGIN
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
/*
|
||||
@@ -103,7 +99,7 @@ ClassUnderTest Orthodox<ClassUnderTest>::call(ClassUnderTest object)
|
||||
}
|
||||
|
||||
|
||||
CppUnit_END
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
#endif // CppUnit_Orthodox_INCLUDED
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// RepeatedTest.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/RepeatedTest.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/RepeatedTest.h#1 $
|
||||
//
|
||||
|
||||
|
||||
@@ -9,18 +9,12 @@
|
||||
#define CppUnit_RepeatedTest_INCLUDED
|
||||
|
||||
|
||||
#ifndef CppUnit_CppUnit_INCLUDED
|
||||
#include "CppUnit/CppUnit.h"
|
||||
#endif
|
||||
#ifndef CppUnit_Guards_INCLUDED
|
||||
#include "CppUnit/Guards.h"
|
||||
#endif
|
||||
#ifndef CppUnit_TestDecorator_INCLUDED
|
||||
#include "CppUnit/TestDecorator.h"
|
||||
#endif
|
||||
|
||||
|
||||
CppUnit_BEGIN
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
class Test;
|
||||
@@ -53,14 +47,14 @@ private:
|
||||
// Counts the number of test cases that will be run by this test.
|
||||
inline RepeatedTest::countTestCases ()
|
||||
{
|
||||
return TestDecorator::countTestCases () * _timesRepeat;
|
||||
return TestDecorator::countTestCases() * _timesRepeat;
|
||||
}
|
||||
|
||||
|
||||
// Returns the name of the test instance.
|
||||
inline std::string RepeatedTest::toString()
|
||||
{
|
||||
return TestDecorator::toString () + " (repeated)";
|
||||
return TestDecorator::toString() + " (repeated)";
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +71,7 @@ inline void RepeatedTest::run(TestResult *result)
|
||||
}
|
||||
|
||||
|
||||
CppUnit_END
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
#endif // CppUnit_RepeatedTest_INCLUDED
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Test.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/Test.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/Test.h#1 $
|
||||
//
|
||||
|
||||
|
||||
@@ -9,16 +9,11 @@
|
||||
#define CppUnit_Test_INCLUDED
|
||||
|
||||
|
||||
#ifndef CppUnit_CppUnit_INCLUDED
|
||||
#include "CppUnit/CppUnit.h"
|
||||
#endif
|
||||
#ifndef STD_STRING_INCLUDED
|
||||
#include <string>
|
||||
#define STD_STRING_INCLUDED
|
||||
#endif
|
||||
|
||||
|
||||
CppUnit_BEGIN
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
class TestResult;
|
||||
@@ -64,7 +59,7 @@ inline std::string Test::toString()
|
||||
}
|
||||
|
||||
|
||||
CppUnit_END
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
#endif // CppUnit_Test_INCLUDED
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// TestCaller.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestCaller.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestCaller.h#1 $
|
||||
//
|
||||
|
||||
|
||||
@@ -9,22 +9,13 @@
|
||||
#define CppUnit_TestCaller_INCLUDED
|
||||
|
||||
|
||||
#ifndef CppUnit_CppUnit_INCLUDED
|
||||
#include "CppUnit/CppUnit.h"
|
||||
#endif
|
||||
#ifndef CppUnit_Guards_INCLUDED
|
||||
#include "Guards.h"
|
||||
#endif
|
||||
#ifndef CppUnit_TestCase_INCLUDED
|
||||
#include "TestCase.h"
|
||||
#endif
|
||||
#ifndef STD_MEMORY_INCLUDED
|
||||
#include <memory>
|
||||
#define STD_MEMORY_INCLUDED
|
||||
#endif
|
||||
|
||||
|
||||
CppUnit_BEGIN
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
/*
|
||||
@@ -65,7 +56,10 @@ class TestCaller: public TestCase
|
||||
typedef void (Fixture::*TestMethod)();
|
||||
|
||||
public:
|
||||
TestCaller(const std::string& name, TestMethod test): TestCase(name), _fixture(new Fixture(name)), _test(test)
|
||||
TestCaller(const std::string& name, TestMethod test):
|
||||
TestCase(name),
|
||||
_test(test),
|
||||
_fixture(new Fixture(name))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -91,7 +85,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
CppUnit_END
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
#define CppUnit_addTest(suite, cls, mth) \
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// TestCase.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestCase.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestCase.h#1 $
|
||||
//
|
||||
|
||||
|
||||
@@ -9,29 +9,15 @@
|
||||
#define CppUnit_TestCase_INCLUDED
|
||||
|
||||
|
||||
#ifndef CppUnit_CppUnit_INCLUDED
|
||||
#include "CppUnit/CppUnit.h"
|
||||
#endif
|
||||
#ifndef CppUnit_Guards_INCLUDED
|
||||
#include "CppUnit/Guards.h"
|
||||
#endif
|
||||
#ifndef CppUnit_Test_INCLUDED
|
||||
#include "CppUnit/Test.h"
|
||||
#endif
|
||||
#ifndef CppUnit_CppUnitException_INCLUDED
|
||||
#include "CppUnit/CppUnitException.h"
|
||||
#endif
|
||||
#ifndef STD_STRING_INCLUDED
|
||||
#include <string>
|
||||
#define STD_STRING_INCLUDED
|
||||
#endif
|
||||
#ifndef STD_TYPEINFO_INCLUDED
|
||||
#include <typeinfo>
|
||||
#define STD_TYPEINFO_INCLUDED
|
||||
#endif
|
||||
|
||||
|
||||
CppUnit_BEGIN
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
class TestResult;
|
||||
@@ -123,6 +109,19 @@ protected:
|
||||
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||
const std::string& fileName = CppUnitException::CPPUNIT_UNKNOWNFILENAME);
|
||||
|
||||
void loop1assertImplementation(bool condition,
|
||||
const std::string& conditionExpression = "",
|
||||
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||
long dataLineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||
const std::string& fileName = CppUnitException::CPPUNIT_UNKNOWNFILENAME);
|
||||
|
||||
void loop2assertImplementation(bool condition,
|
||||
const std::string& conditionExpression = "",
|
||||
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||
long data1LineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||
long data2LineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||
const std::string& fileName = CppUnitException::CPPUNIT_UNKNOWNFILENAME);
|
||||
|
||||
void assertEquals(long expected,
|
||||
long actual,
|
||||
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||
@@ -150,9 +149,9 @@ protected:
|
||||
std::string notEqualsMessage(const std::string& expected, const std::string& actual);
|
||||
|
||||
void assertNotNull(const void* pointer,
|
||||
const std::string& pointerExpression = "",
|
||||
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||
const std::string& fileName = CppUnitException::CPPUNIT_UNKNOWNFILENAME);
|
||||
const std::string& pointerExpression = "",
|
||||
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||
const std::string& fileName = CppUnitException::CPPUNIT_UNKNOWNFILENAME);
|
||||
|
||||
void assertNull(const void* pointer,
|
||||
const std::string& pointerExpression = "",
|
||||
@@ -222,6 +221,12 @@ inline std::string TestCase::toString()
|
||||
#define assert(condition) \
|
||||
(this->assertImplementation((condition), (#condition), __LINE__, __FILE__))
|
||||
|
||||
#define loop_1_assert(data1line, condition) \
|
||||
(this->loop1assertImplementation((condition), (#condition), __LINE__, data1line, __FILE__))
|
||||
|
||||
#define loop_2_assert(data1line, data2line, condition) \
|
||||
(this->loop2assertImplementation((condition), (#condition), __LINE__, data1line, data2line, __FILE__))
|
||||
|
||||
#define assertEqualDelta(expected, actual, delta) \
|
||||
(this->assertEquals((expected), (actual), (delta), __LINE__, __FILE__))
|
||||
|
||||
@@ -238,7 +243,7 @@ inline std::string TestCase::toString()
|
||||
(this->fail(msg, __LINE__, __FILE__))
|
||||
|
||||
|
||||
CppUnit_END
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
#endif // CppUnit_TestCase_INCLUDED
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// TestDecorator.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestDecorator.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestDecorator.h#1 $
|
||||
//
|
||||
|
||||
|
||||
@@ -9,18 +9,12 @@
|
||||
#define CppUnit_TestDecorator_INCLUDED
|
||||
|
||||
|
||||
#ifndef CppUnit_CppUnit_INCLUDED
|
||||
#include "CppUnit/CppUnit.h"
|
||||
#endif
|
||||
#ifndef CppUnit_Guards_INCLUDED
|
||||
#include "CppUnit/Guards.h"
|
||||
#endif
|
||||
#ifndef CppUnit_Test_INCLUDED
|
||||
#include "CppUnit/Test.h"
|
||||
#endif
|
||||
|
||||
|
||||
CppUnit_BEGIN
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
class TestResult;
|
||||
@@ -52,7 +46,7 @@ protected:
|
||||
};
|
||||
|
||||
|
||||
CppUnit_END
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
#endif // CppUnit_TestDecorator_INCLUDED
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// TestFailure.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestFailure.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestFailure.h#1 $
|
||||
//
|
||||
|
||||
|
||||
@@ -9,18 +9,12 @@
|
||||
#define CppUnit_TestFailure_INCLUDED
|
||||
|
||||
|
||||
#ifndef CppUnit_CppUnit_INCLUDED
|
||||
#include "CppUnit/CppUnit.h"
|
||||
#endif
|
||||
#ifndef CppUnit_CppUnitException_INCLUDED
|
||||
#include "CppUnit/CppUnitException.h"
|
||||
#endif
|
||||
#ifndef CppUnit_Guards_INCLUDED
|
||||
#include "CppUnit/Guards.h"
|
||||
#endif
|
||||
|
||||
|
||||
CppUnit_BEGIN
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
class Test;
|
||||
@@ -84,7 +78,7 @@ inline CppUnitException* TestFailure::thrownException()
|
||||
}
|
||||
|
||||
|
||||
CppUnit_END
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
#endif // CppUnit_TestFailure_INCLUDED
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// TestResult.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestResult.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestResult.h#1 $
|
||||
//
|
||||
|
||||
|
||||
@@ -9,22 +9,13 @@
|
||||
#define CppUnit_TestResult_INCLUDED
|
||||
|
||||
|
||||
#ifndef CppUnit_CppUnit_INCLUDED
|
||||
#include "CppUnit/CppUnit.h"
|
||||
#endif
|
||||
#ifndef CppUnit_Guards_INCLUDED
|
||||
#include "CppUnit/Guards.h"
|
||||
#endif
|
||||
#ifndef CppUnit_TestFailure_INCLUDED
|
||||
#include "CppUnit/TestFailure.h"
|
||||
#endif
|
||||
#ifndef STD_VECTOR_INCLUDED
|
||||
#include <vector>
|
||||
#define STD_VECTOR_INCLUDED
|
||||
#endif
|
||||
|
||||
|
||||
CppUnit_BEGIN
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
class CppUnitException;
|
||||
@@ -234,7 +225,7 @@ inline void TestResult::setSynchronizationObject(SynchronizationObject* syncObje
|
||||
}
|
||||
|
||||
|
||||
CppUnit_END
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
#endif // CppUnit_TestResult_INCLUDED
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// TestRunner.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestRunner.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestRunner.h#1 $
|
||||
//
|
||||
|
||||
|
||||
@@ -9,20 +9,12 @@
|
||||
#define CppUnit_TestRunner_INCLUDED
|
||||
|
||||
|
||||
#ifndef CppUnit_CppUnit_INCLUDED
|
||||
#include "CppUnit/CppUnit.h"
|
||||
#endif
|
||||
#ifndef STD_VECTOR_INCLUDED
|
||||
#include <vector>
|
||||
#define STD_VECTOR_INCLUDED
|
||||
#endif
|
||||
#ifndef STD_STRING_INCLUDED
|
||||
#include <string>
|
||||
#define STD_STRING_INCLUDED
|
||||
#endif
|
||||
|
||||
|
||||
CppUnit_BEGIN
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
class Test;
|
||||
@@ -65,7 +57,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
CppUnit_END
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
#define CppUnitMain(testCase) \
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// TestSetup.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestSetup.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestSetup.h#1 $
|
||||
//
|
||||
|
||||
|
||||
@@ -9,18 +9,12 @@
|
||||
#define CppUnit_TestSetup_INCLUDED
|
||||
|
||||
|
||||
#ifndef CppUnit_CppUnit_INCLUDED
|
||||
#include "CppUnit/CppUnit.h"
|
||||
#endif
|
||||
#ifndef CppUnit_Guards_INCLUDED
|
||||
#include "CppUnit/Guards.h"
|
||||
#endif
|
||||
#ifndef CppUnit_TestDecorator_INCLUDED
|
||||
#include "CppUnit/TestDecorator.h"
|
||||
#endif
|
||||
|
||||
|
||||
CppUnit_BEGIN
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
class Test;
|
||||
@@ -57,7 +51,7 @@ inline void TestSetup::run(TestResult* result)
|
||||
}
|
||||
|
||||
|
||||
CppUnit_END
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
#endif // CppUnit_TestSetup_INCLUDED
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// TestSuite.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestSuite.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestSuite.h#1 $
|
||||
//
|
||||
|
||||
|
||||
@@ -9,26 +9,14 @@
|
||||
#define CppUnit_TestSuite_INCLUDED
|
||||
|
||||
|
||||
#ifndef CppUnit_CppUnit_INCLUDED
|
||||
#include "CppUnit/CppUnit.h"
|
||||
#endif
|
||||
#ifndef CppUnit_Guards_INCLUDED
|
||||
#include "CppUnit/Guards.h"
|
||||
#endif
|
||||
#ifndef CppUnit_Test_INCLUDED
|
||||
#include "CppUnit/Test.h"
|
||||
#endif
|
||||
#ifndef STD_VECTOR_INCLUDED
|
||||
#include <vector>
|
||||
#define STD_VECTOR_INCLUDED
|
||||
#endif
|
||||
#ifndef STD_STRING_INCLUDED
|
||||
#include <string>
|
||||
#define STD_STRING_INCLUDED
|
||||
#endif
|
||||
|
||||
|
||||
CppUnit_BEGIN
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
class TestResult;
|
||||
@@ -104,7 +92,7 @@ inline const std::vector<Test*> TestSuite::tests() const
|
||||
}
|
||||
|
||||
|
||||
CppUnit_END
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
#endif // CppUnit_TestSuite_INCLUDED
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// TextTestResult.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TextTestResult.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/TextTestResult.h#1 $
|
||||
//
|
||||
|
||||
|
||||
@@ -9,19 +9,12 @@
|
||||
#define CppUnit_TextTestResult_INCLUDED
|
||||
|
||||
|
||||
#ifndef CppUnit_CppUnit_INCLUDED
|
||||
#include "CppUnit/CppUnit.h"
|
||||
#endif
|
||||
#ifndef CppUnit_TestResult_INCLUDED
|
||||
#include "CppUnit/TestResult.h"
|
||||
#endif
|
||||
#ifndef STD_OSTREAM_INCLUDED
|
||||
#include <ostream>
|
||||
#define STD_OSTREAM_INCLUDED
|
||||
#endif
|
||||
|
||||
|
||||
CppUnit_BEGIN
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
class CppUnit_API TextTestResult: public TestResult
|
||||
@@ -48,7 +41,7 @@ inline std::ostream& operator<< (std::ostream& stream, TextTestResult& result)
|
||||
}
|
||||
|
||||
|
||||
CppUnit_END
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
#endif // CppUnit_TextTestResult_INCLUDED
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// estring.h
|
||||
//
|
||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/estring.h#1 $
|
||||
// $Id: //poco/1.2/CppUnit/include/CppUnit/estring.h#1 $
|
||||
//
|
||||
|
||||
|
||||
@@ -9,20 +9,12 @@
|
||||
#define CppUnit_estring_INCLUDED
|
||||
|
||||
|
||||
#ifndef CppUnit_CppUnit_INCLUDED
|
||||
#include "CppUnit/CppUnit.h"
|
||||
#endif
|
||||
#ifndef STD_STRING_INCLUDED
|
||||
#include <string>
|
||||
#define STD_STRING_INCLUDED
|
||||
#endif
|
||||
#ifndef STD_STDIO_INCLUDED
|
||||
#include <stdio.h>
|
||||
#define STD_STDIO_INCLUDED
|
||||
#endif
|
||||
|
||||
|
||||
CppUnit_BEGIN
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
// Create a std::string from a const char pointer
|
||||
@@ -75,7 +67,7 @@ inline std::string estring(const void* ptr)
|
||||
}
|
||||
|
||||
|
||||
CppUnit_END
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
#endif // CppUnit_estring_INCLUDED
|
||||
|
Reference in New Issue
Block a user