mirror of
https://github.com/unittest-cpp/unittest-cpp
synced 2026-09-27 00:28:49 +03:00
use char* instead of string (for dll export)
This commit is contained in:
parent
dabb1d28ff
commit
cb852cb53f
3 changed files with 7 additions and 8 deletions
|
|
@ -14,13 +14,13 @@ SuitePredicate::~SuitePredicate()
|
|||
}
|
||||
|
||||
|
||||
void SuitePredicate::addSuite(const string & suiteName)
|
||||
void SuitePredicate::addSuite(char const* suiteName)
|
||||
{
|
||||
_suiteNames.push_back(suiteName);
|
||||
}
|
||||
|
||||
|
||||
void SuitePredicate::addTest(const string & testName)
|
||||
void SuitePredicate::addTest(char const* testName)
|
||||
{
|
||||
_testNames.push_back(testName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ namespace UnitTest
|
|||
{
|
||||
using namespace std;
|
||||
|
||||
class SuitePredicate
|
||||
class UNITTEST_LINKAGE SuitePredicate
|
||||
{
|
||||
public:
|
||||
SuitePredicate();
|
||||
virtual ~SuitePredicate();
|
||||
|
||||
void addSuite(const string & suiteName);
|
||||
void addTest(const string & testName);
|
||||
void addSuite(char const* suiteName);
|
||||
void addTest(char const* testName);
|
||||
|
||||
bool operator()(Test const * const test) const;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,14 +32,13 @@ namespace UnitTest {
|
|||
int from = (suite) ? 2 : 1;
|
||||
for (int i = from; i < argc; ++i)
|
||||
{
|
||||
string name = argv[i];
|
||||
if (suite)
|
||||
{
|
||||
predicate.addSuite(name);
|
||||
predicate.addSuite(argv[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
predicate.addTest(name);
|
||||
predicate.addTest(argv[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue