Sen API
Sen Libraries
Toggle main menu visibility
Loading...
Searching...
No Matches
kernel_fixture.h
Go to the documentation of this file.
1
// === kernel_fixture.h ================================================================================================
2
// Sen Infrastructure
3
// Released under the Apache License v2.0 (SPDX-License-Identifier Apache-2.0).
4
// See the LICENSE.txt file for more information.
5
// © Airbus SAS, Airbus Helicopters, and Airbus Defence and Space SAU/GmbH/SAS.
6
// =====================================================================================================================
7
8
#ifndef SEN_SEN_LIBS_UTILS_TEST_UTILS_KERNEL_FIXTURE_H_H
9
#define SEN_SEN_LIBS_UTILS_TEST_UTILS_KERNEL_FIXTURE_H_H
10
11
// gtest
12
#include <gtest/gtest.h>
13
14
// sen
15
#include "
sen/kernel/test_kernel.h
"
16
19
class
KernelFixture
:
public
::testing::Test
20
{
21
protected
:
23
void
onInit
(
sen::kernel::TestComponent::InitFunc
initFunc);
24
26
void
onRun
(
sen::kernel::TestComponent::RunFunc
runFunc);
27
29
void
onUnload
(
sen::kernel::TestComponent::UnloadFunc
unloadFunc);
30
31
protected
:
34
std::unique_ptr<sen::kernel::TestKernel>
makeKernel
();
35
38
virtual
void
deallocateResources
();
39
40
private
:
41
sen::kernel::TestComponent
component_;
42
bool
unloadCallbackInstalled_ =
false
;
43
};
44
45
#endif
// SEN_SEN_LIBS_UTILS_TEST_UTILS_KERNEL_FIXTURE_H_H
KernelFixture
Wrapper class used in the integration tests that facilitates the interaction with the Sen kernel test...
Definition
kernel_fixture.h:20
KernelFixture::makeKernel
std::unique_ptr< sen::kernel::TestKernel > makeKernel()
Constructor for the Sen kernel test API that takes care about allocating and deallocating resources n...
KernelFixture::onInit
void onInit(sen::kernel::TestComponent::InitFunc initFunc)
Wrapper for the onInit method of the Sen kernel test API.
KernelFixture::onRun
void onRun(sen::kernel::TestComponent::RunFunc runFunc)
Wrapper for the onRun method of the Sen kernel test API.
KernelFixture::deallocateResources
virtual void deallocateResources()
Virtual method that can be implemented by integration test fixtures which need to deallocate specific...
KernelFixture::onUnload
void onUnload(sen::kernel::TestComponent::UnloadFunc unloadFunc)
Wrapper for the onUnload method of the Sen kernel test API.
sen::kernel::TestComponent
Convenience class for using lambdas instead of inheritance when defining test components.
Definition
test_kernel.h:58
sen::kernel::TestComponent::UnloadFunc
std::function< FuncResult(UnloadApi &&)> UnloadFunc
Definition
test_kernel.h:64
sen::kernel::TestComponent::RunFunc
std::function< FuncResult(RunApi &)> RunFunc
Definition
test_kernel.h:63
sen::kernel::TestComponent::InitFunc
std::function< PassResult(InitApi &&)> InitFunc
Definition
test_kernel.h:62
test_kernel.h
libs
util
test
utils
kernel_fixture.h
Generated by
1.17.0