OTest2
A C++ testing framework
context.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 OTest2INCLUDE_CONTEXT_H_
21 #define OTest2INCLUDE_CONTEXT_H_
22 
23 namespace OTest2 {
24 
25 class CommandStack;
26 class ExcCatcher;
27 class ObjectPath;
28 class Reporter;
29 class SemanticStack;
30 class TestMarkFactory;
31 class TestMarkStorage;
32 class TimeSource;
33 class UserData;
34 
38 class Context {
39  public:
49 
50  /* -- avoid copying */
51  Context(
52  const Context&) = delete;
54  const Context&) = delete;
55 
59  explicit Context(
60  CommandStack* command_stack_,
61  SemanticStack* semantic_stack_,
62  ObjectPath* object_path_,
63  TimeSource* time_source_,
64  ExcCatcher* exception_catcher_,
65  Reporter* reporter_,
66  TestMarkFactory* test_mark_factory_,
67  TestMarkStorage* test_mark_storage_,
68  UserData* user_data_);
69 
73  ~Context();
74 };
75 
76 } /* -- namespace OTest2 */
77 
78 #endif /* -- OTest2INCLUDE_CONTEXT_H_ */
OTest2::Context::time_source
TimeSource *const time_source
Definition: context.h:43
OTest2::ObjectPath
This is a simple object keeping path to current testing object.
Definition: objectpath.h:32
OTest2::Context::test_mark_storage
TestMarkStorage *const test_mark_storage
Definition: context.h:47
OTest2::Reporter
Generic test reporter.
Definition: reporter.h:34
OTest2::Context::reporter
Reporter *const reporter
Definition: context.h:45
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::SemanticStack
Semantic stack.
Definition: semanticstack.h:31
OTest2::Context::test_mark_factory
TestMarkFactory *const test_mark_factory
Definition: context.h:46
OTest2::Context::user_data
UserData *const user_data
Definition: context.h:48
OTest2::Context::command_stack
CommandStack *const command_stack
Definition: context.h:40
OTest2
Definition: assertbean.h:25
OTest2::Context::~Context
~Context()
Dtor.
Definition: context.cpp:46
OTest2::TestMarkStorage
Storage of test marks.
Definition: testmarkstorage.h:34
OTest2::Context::object_path
ObjectPath *const object_path
Definition: context.h:42
OTest2::Context::semantic_stack
SemanticStack *const semantic_stack
Definition: context.h:41
OTest2::Context::Context
Context(const Context &)=delete
OTest2::Context::operator=
Context & operator=(const Context &)=delete
OTest2::ExcCatcher
Generic exception catcher interface.
Definition: exccatcher.h:39
OTest2::Context::exception_catcher
ExcCatcher *const exception_catcher
Definition: context.h:44
OTest2::Context
OTest2 runtime context.
Definition: context.h:38
OTest2::CommandStack
Stack of framework commands.
Definition: commandstack.h:30
OTest2::TestMarkFactory
A factory of testmark objects used for deserialization.
Definition: testmarkfactory.h:45