mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 20:59:45 +01:00
Add -setup, a command line argument.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "CppUnit/CppUnit.h"
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace CppUnit {
|
||||
@@ -29,6 +30,11 @@ public:
|
||||
virtual void run(TestResult* result) = 0;
|
||||
virtual int countTestCases() = 0;
|
||||
virtual std::string toString() = 0;
|
||||
|
||||
void addSetup(const std::vector<std::string>& setup);
|
||||
|
||||
protected:
|
||||
std::vector<std::string> _setup;
|
||||
};
|
||||
|
||||
|
||||
@@ -57,6 +63,11 @@ inline std::string Test::toString()
|
||||
}
|
||||
|
||||
|
||||
inline void Test::addSetup(const std::vector<std::string>& setup)
|
||||
{
|
||||
_setup = setup;
|
||||
}
|
||||
|
||||
} // namespace CppUnit
|
||||
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ public:
|
||||
std::string toString();
|
||||
|
||||
virtual void setUp();
|
||||
virtual void setUp(const std::vector<std::string>& setup);
|
||||
virtual void tearDown();
|
||||
|
||||
protected:
|
||||
@@ -202,6 +203,12 @@ inline void TestCase::setUp()
|
||||
}
|
||||
|
||||
|
||||
// A hook for fixture set up with command line arguments
|
||||
inline void TestCase::setUp(const std::vector<std::string>& setup)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
// A hook for fixture tear down
|
||||
inline void TestCase::tearDown()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user