Loading...
Searching...
No Matches
TestRunner.h
Go to the documentation of this file.
/*
* Robot Testing Framework
*
* Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef ROBOTTESTINGFRAMEWORK_TESTRUNNER_H
#define ROBOTTESTINGFRAMEWORK_TESTRUNNER_H
#include <robottestingframework/Test.h>
#include <robottestingframework/TestResult.h>
#include <vector>
namespace robottestingframework {
class TestRunner
{
typedef std::vector<Test*> TestContainer;
typedef std::vector<Test*>::iterator TestIterator;
public:
TestRunner();
virtual ~TestRunner();
void addTest(Test* test);
void removeTest(Test* test);
void reset();
void run(TestResult& result);
void interrupt();
private:
TestContainer tests;
Test* current;
bool interrupted;
};
} // namespace robottestingframework
#endif // ROBOTTESTINGFRAMEWORK_TESTRUNNER_H
TestResult.h
Test.h
robottestingframework::TestResult
The TestResult class is used to deliver the test results including any error and failures produced by...
Definition TestResult.h:44
robottestingframework::TestRunner::TestRunner
TestRunner()
TestRunner constructor.
robottestingframework::TestRunner::~TestRunner
virtual ~TestRunner()
TestRunner destructor.
robottestingframework::TestRunner::run
void run(TestResult &result)
Run all the tests in the list.
robottestingframework::TestRunner::TestIterator
std::vector< Test * >::iterator TestIterator
Definition TestRunner.h:45
robottestingframework::TestRunner::interrupt
void interrupt()
interrupt interrupts the current test run
robottestingframework::TestRunner::tests
TestContainer tests
Definition TestRunner.h:89
robottestingframework::TestRunner::TestContainer
std::vector< Test * > TestContainer
Definition TestRunner.h:44
robottestingframework::TestRunner::reset
void reset()
Clear the test list.
robottestingframework::TestRunner::addTest
void addTest(Test *test)
Adding a new test.
robottestingframework::TestRunner::interrupted
bool interrupted
Definition TestRunner.h:91
robottestingframework::TestRunner::current
Test * current
Definition TestRunner.h:90
robottestingframework::TestRunner::removeTest
void removeTest(Test *test)
Remove a test.
robottestingframework::Test
The simplest form of a test unit.
Definition Test.h:35
robottestingframework
Definition Arguments.h:25