OTest2
A C++ testing framework
runnerordinary.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Ondrej Starek
3  *
4  * This file is part of OTest2.
5  *
6  * OTest2 is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License,
9  * or (at your option) any later version.
10  *
11  * OTest2 is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14  * License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with OTest2. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef OTest2__INCLUDE_OTEST2_RUNNERORDINARY_H_
21 #define OTest2__INCLUDE_OTEST2_RUNNERORDINARY_H_
22 
23 #include <otest2/runner.h>
24 #include <otest2/scenarioiterptr.h>
25 
26 namespace OTest2 {
27 
28 class ExcCatcher;
29 class Registry;
30 class Reporter;
31 class TestMarkFactory;
32 class TestMarkStorage;
33 class TimeSource;
34 class UserData;
35 
42 class RunnerOrdinary : public Runner {
43  private:
44  struct Impl;
45  Impl* pimpl;
46 
47  public:
48  /* -- avoid copying */
50  const RunnerOrdinary&) = delete;
52  const RunnerOrdinary&) = delete;
53 
68  explicit RunnerOrdinary(
69  TimeSource* time_source_,
70  ExcCatcher* exc_catcher_,
71  Reporter* reporter_,
72  TestMarkFactory* test_mark_factory_,
73  TestMarkStorage* test_mark_storage_,
74  UserData* user_data_,
75  ScenarioIterPtr test_scenario_);
76 
80  virtual ~RunnerOrdinary();
81 
82  /* -- runner interface */
83  virtual RunnerResult runNext() override;
84 };
85 
86 } /* namespace OTest2 */
87 
88 #endif /* OTest2__INCLUDE_OTEST2_RUNNERORDINARY_H_ */
OTest2::RunnerOrdinary::runNext
virtual RunnerResult runNext() override
Run next pack of work.
Definition: runnerordinary.cpp:123
scenarioiterptr.h
OTest2::Reporter
Generic test reporter.
Definition: reporter.h:34
OTest2::RunnerOrdinary
Ordinary implementation of the Runner interface.
Definition: runnerordinary.h:42
OTest2::TimeSource
Generic interface for getting of current time.
Definition: timesource.h:30
OTest2::UserData
An object keeping user data passed from user's custom main function.
Definition: userdata.h:120
OTest2::Runner
Generic test runner.
Definition: runner.h:112
OTest2
Definition: assertbean.h:25
OTest2::TestMarkStorage
Storage of test marks.
Definition: testmarkstorage.h:34
OTest2::ScenarioIterPtr
std::shared_ptr< ScenarioIter > ScenarioIterPtr
Shared pointer of the scenario iter interface.
Definition: scenarioiterptr.h:27
runner.h
OTest2::RunnerOrdinary::~RunnerOrdinary
virtual ~RunnerOrdinary()
Dtor.
Definition: runnerordinary.cpp:119
OTest2::RunnerOrdinary::RunnerOrdinary
RunnerOrdinary(const RunnerOrdinary &)=delete
OTest2::RunnerResult
Result of test run.
Definition: runner.h:40
OTest2::RunnerOrdinary::operator=
RunnerOrdinary & operator=(const RunnerOrdinary &)=delete
OTest2::ExcCatcher
Generic exception catcher interface.
Definition: exccatcher.h:39
OTest2::TestMarkFactory
A factory of testmark objects used for deserialization.
Definition: testmarkfactory.h:45