mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 09:12:28 +02:00
Make CppUnit a component of Poco
Signed-off-by: FrancisANDRE <zosrothko@orange.fr>
This commit is contained in:
@@ -24,23 +24,52 @@
|
||||
// from a DLL simpler. All files within this DLL are compiled with the Poco_CppUnitEXPORTS
|
||||
// symbol defined on the command line. this symbol should not be defined on any project
|
||||
// that uses this DLL. This way any other project whose source files include this file see
|
||||
// Poco_CppUnit_API functions as being imported from a DLL, wheras this DLL sees symbols
|
||||
// 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(POCO_DLL)
|
||||
#if defined(Poco_CppUnit_EXPORTS)
|
||||
#define Poco_CppUnit_API __declspec(dllexport)
|
||||
#if defined(CppUnit_EXPORTS)
|
||||
#define CppUnit_API __declspec(dllexport)
|
||||
#else
|
||||
#define Poco_CppUnit_API __declspec(dllimport)
|
||||
#define CppUnit_API __declspec(dllimport)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(Poco_CppUnit_API)
|
||||
#if !defined(CppUnit_API)
|
||||
#if defined (__GNUC__) && (__GNUC__ >= 4)
|
||||
#define Poco_CppUnit_API __attribute__ ((visibility ("default")))
|
||||
#define CppUnit_API __attribute__ ((visibility ("default")))
|
||||
#else
|
||||
#define Poco_CppUnit_API
|
||||
#define CppUnit_API
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Automatically link Foundation library.
|
||||
//
|
||||
#if defined(_MSC_VER)
|
||||
#if defined(POCO_DLL)
|
||||
#if defined(_DEBUG)
|
||||
#define POCO_LIB_SUFFIX "d.lib"
|
||||
#else
|
||||
#define POCO_LIB_SUFFIX ".lib"
|
||||
#endif
|
||||
#elif defined(_DLL)
|
||||
#if defined(_DEBUG)
|
||||
#define POCO_LIB_SUFFIX "mdd.lib"
|
||||
#else
|
||||
#define POCO_LIB_SUFFIX "md.lib"
|
||||
#endif
|
||||
#else
|
||||
#if defined(_DEBUG)
|
||||
#define POCO_LIB_SUFFIX "mtd.lib"
|
||||
#else
|
||||
#define POCO_LIB_SUFFIX "mt.lib"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(CppUnit_EXPORTS)
|
||||
#pragma comment(lib, "PocoCppUnit" POCO_LIB_SUFFIX)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
class Poco_CppUnit_API CppUnitException: public std::exception
|
||||
class CppUnit_API CppUnitException: public std::exception
|
||||
/// CppUnitException is an exception that serves
|
||||
/// descriptive strings through its what() method
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ class TestResult;
|
||||
* Does not assume ownership of the test it decorates
|
||||
*
|
||||
*/
|
||||
class Poco_CppUnit_API RepeatedTest: public TestDecorator
|
||||
class CppUnit_API RepeatedTest: public TestDecorator
|
||||
{
|
||||
REFERENCEOBJECT (RepeatedTest)
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class TestResult;
|
||||
* See TestResult.
|
||||
*
|
||||
*/
|
||||
class Poco_CppUnit_API Test
|
||||
class CppUnit_API Test
|
||||
{
|
||||
public:
|
||||
virtual ~Test() = 0;
|
||||
|
||||
@@ -96,7 +96,7 @@ private:
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
#define Poco_CppUnit_addTest(suite, cls, mth) \
|
||||
#define CppUnit_addTest(suite, cls, mth) \
|
||||
suite->addTest(new CppUnit::TestCaller<cls>(#mth, &cls::mth))
|
||||
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class TestResult;
|
||||
* see TestResult, TestSuite and TestCaller
|
||||
*
|
||||
*/
|
||||
class Poco_CppUnit_API TestCase: public Test
|
||||
class CppUnit_API TestCase: public Test
|
||||
{
|
||||
REFERENCEOBJECT (TestCase)
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class TestResult;
|
||||
* Does not assume ownership of the test it decorates
|
||||
*
|
||||
*/
|
||||
class Poco_CppUnit_API TestDecorator: public Test
|
||||
class CppUnit_API TestDecorator: public Test
|
||||
{
|
||||
REFERENCEOBJECT(TestDecorator)
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class Test;
|
||||
* see TestSuite
|
||||
*
|
||||
*/
|
||||
class Poco_CppUnit_API TestFailure
|
||||
class CppUnit_API TestFailure
|
||||
{
|
||||
REFERENCEOBJECT (TestFailure)
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ class Test;
|
||||
*
|
||||
* see Test
|
||||
*/
|
||||
class Poco_CppUnit_API TestResult
|
||||
class CppUnit_API TestResult
|
||||
{
|
||||
REFERENCEOBJECT (TestResult)
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ class Test;
|
||||
* TestRunner [-all] [-print] [-wait] ExampleTestCase
|
||||
*
|
||||
*/
|
||||
class Poco_CppUnit_API TestRunner
|
||||
class CppUnit_API TestRunner
|
||||
{
|
||||
typedef std::pair<std::string, Test*> Mapping;
|
||||
typedef std::vector<Mapping> Mappings;
|
||||
|
||||
@@ -21,7 +21,7 @@ class Test;
|
||||
class TestResult;
|
||||
|
||||
|
||||
class Poco_CppUnit_API TestSetup: public TestDecorator
|
||||
class CppUnit_API TestSetup: public TestDecorator
|
||||
{
|
||||
REFERENCEOBJECT (TestSetup)
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class TestResult;
|
||||
*
|
||||
* see Test and TestCaller
|
||||
*/
|
||||
class Poco_CppUnit_API TestSuite: public Test
|
||||
class CppUnit_API TestSuite: public Test
|
||||
{
|
||||
REFERENCEOBJECT (TestSuite)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
namespace CppUnit {
|
||||
|
||||
|
||||
class Poco_CppUnit_API TextTestResult: public TestResult
|
||||
class CppUnit_API TextTestResult: public TestResult
|
||||
{
|
||||
public:
|
||||
TextTestResult();
|
||||
|
||||
Reference in New Issue
Block a user