Skip to content

Commit

Permalink
fixtures and test are now executed following the xml order
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Ruzzenenti committed Sep 27, 2017
1 parent 6c7763a commit a80cda2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/rtf/include/rtf/TestSuit.h
Expand Up @@ -16,7 +16,7 @@
#include <rtf/TestResult.h>
#include <rtf/TestMessage.h>
#include <rtf/FixtureManager.h>
#include <set>
#include <vector>

namespace RTF {
class TestSuit;
Expand All @@ -43,10 +43,10 @@ namespace RTF {
*/
class RTF_API RTF::TestSuit : public RTF::Test, public RTF::FixtureEvents {

typedef std::set<RTF::Test*> TestContainer;
typedef std::set<RTF::Test*>::iterator TestIterator;
typedef std::set<RTF::FixtureManager*> FixtureContainer;
typedef std::set<RTF::FixtureManager*>::iterator FixtureIterator;
typedef std::vector<RTF::Test*> TestContainer;
typedef std::vector<RTF::Test*>::iterator TestIterator;
typedef std::vector<RTF::FixtureManager*> FixtureContainer;
typedef std::vector<RTF::FixtureManager*>::iterator FixtureIterator;

public:

Expand Down
10 changes: 7 additions & 3 deletions src/rtf/src/TestSuit.cpp
Expand Up @@ -26,12 +26,16 @@ TestSuit::~TestSuit() {
}

void TestSuit::addTest(RTF::Test* test) {
tests.insert(test);
tests.push_back(test);
}


void TestSuit::removeTest(RTF::Test* test) {
tests.erase(test);
for (int i = 0; i < tests.size(); i++)
{
if(tests[i] == test) tests.erase(tests.begin()+i);
}

}

void TestSuit::reset() {
Expand Down Expand Up @@ -166,7 +170,7 @@ void TestSuit::run(TestResult &rsl) {

void TestSuit::addFixtureManager(RTF::FixtureManager* manager) {
manager->setDispatcher(this);
fixtureManagers.insert(manager);
fixtureManagers.push_back(manager);
}

void TestSuit::fixtureCollapsed(RTF::TestMessage reason) {
Expand Down

0 comments on commit a80cda2

Please sign in to comment.