F´ Flight Software - C/C++ Documentation
NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
ComponentTest.hpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title ComponentTest.hpp
3
// \author T. Chieu
4
// \brief hpp file for component test classes
5
//
6
// \copyright
7
// Copyright (C) 2009-2023 California Institute of Technology.
8
// ALL RIGHTS RESERVED. United States Government Sponsorship
9
// acknowledged.
10
//
11
// ======================================================================
12
13
#ifndef FPP_TEST_COMPONENT_TEST_HPP
14
#define FPP_TEST_COMPONENT_TEST_HPP
15
16
#include "test/ut/Tester.hpp"
17
18
#include "gtest/gtest.h"
19
20
template
<
typename
FormalParamType>
21
class
ComponentCommandTest
:
public
::testing::Test {
22
protected
:
23
Tester
tester
;
24
FormalParamType
data
;
25
};
26
27
TYPED_TEST_SUITE_P
(
ComponentCommandTest
);
28
29
TYPED_TEST_P
(
ComponentCommandTest
, CommandTest) {
30
this->tester.testCommand(0, this->data);
31
}
32
33
REGISTER_TYPED_TEST_SUITE_P
(
ComponentCommandTest
,
34
CommandTest
35
);
36
37
template
<
typename
FormalParamType>
38
class
ComponentAsyncCommandTest
:
public
::testing::Test {
39
protected
:
40
Tester
tester
;
41
FormalParamType
data
;
42
};
43
44
TYPED_TEST_SUITE_P
(
ComponentAsyncCommandTest
);
45
46
TYPED_TEST_P
(
ComponentAsyncCommandTest
, AsyncCommandTest) {
47
this->tester.testAsyncCommand(0, this->data);
48
}
49
50
REGISTER_TYPED_TEST_SUITE_P
(
ComponentAsyncCommandTest
,
51
AsyncCommandTest
52
);
53
54
template
<
typename
FormalParamType>
55
class
ComponentEventTest
:
public
::testing::Test {
56
protected
:
57
Tester
tester
;
58
FormalParamType
data
;
59
};
60
61
TYPED_TEST_SUITE_P
(
ComponentEventTest
);
62
63
TYPED_TEST_P
(
ComponentEventTest
, EventTest) {
64
this->tester.connectTimeGetOut();
65
this->tester.testEvent(0, this->data);
66
}
67
68
REGISTER_TYPED_TEST_SUITE_P
(
ComponentEventTest
,
69
EventTest
70
);
71
72
template
<
typename
FormalParamType>
73
class
ComponentTelemetryTest
:
public
::testing::Test {
74
protected
:
75
Tester
tester
;
76
FormalParamType
data
;
77
};
78
79
TYPED_TEST_SUITE_P
(
ComponentTelemetryTest
);
80
81
TYPED_TEST_P
(
ComponentTelemetryTest
, TelemetryTest) {
82
this->tester.connectTimeGetOut();
83
this->tester.testTelemetry(0, this->data);
84
}
85
86
REGISTER_TYPED_TEST_SUITE_P
(
ComponentTelemetryTest
,
87
TelemetryTest
88
);
89
90
template
<
typename
FormalParamType>
91
class
ComponentParamCommandTest
:
public
::testing::Test {
92
protected
:
93
Tester
tester
;
94
FormalParamType
data
;
95
};
96
97
TYPED_TEST_SUITE_P
(
ComponentParamCommandTest
);
98
99
TYPED_TEST_P
(
ComponentParamCommandTest
, ParamTest) {
100
this->tester.testParamCommand(0, this->data);
101
}
102
103
REGISTER_TYPED_TEST_SUITE_P
(
ComponentParamCommandTest
,
104
ParamTest
105
);
106
107
template
<
typename
FormalParamType>
108
class
ComponentInternalInterfaceTest
:
public
::testing::Test {
109
protected
:
110
Tester
tester
;
111
FormalParamType
data
;
112
};
113
114
TYPED_TEST_SUITE_P
(
ComponentInternalInterfaceTest
);
115
116
TYPED_TEST_P
(
ComponentInternalInterfaceTest
, InternalInterfaceTest) {
117
this->tester.testInternalInterface(this->data);
118
}
119
120
REGISTER_TYPED_TEST_SUITE_P
(
ComponentInternalInterfaceTest
,
121
InternalInterfaceTest);
122
123
#endif
TYPED_TEST_P
TYPED_TEST_P(ComponentCommandTest, CommandTest)
Definition
ComponentTest.hpp:29
REGISTER_TYPED_TEST_SUITE_P
REGISTER_TYPED_TEST_SUITE_P(ComponentCommandTest, CommandTest)
TYPED_TEST_SUITE_P
TYPED_TEST_SUITE_P(ComponentCommandTest)
ComponentAsyncCommandTest
Definition
ComponentTest.hpp:38
ComponentAsyncCommandTest::data
FormalParamType data
Definition
ComponentTest.hpp:41
ComponentAsyncCommandTest::tester
Tester tester
Definition
ComponentTest.hpp:40
ComponentCommandTest
Definition
ComponentTest.hpp:21
ComponentCommandTest::tester
Tester tester
Definition
ComponentTest.hpp:23
ComponentCommandTest::data
FormalParamType data
Definition
ComponentTest.hpp:24
ComponentEventTest
Definition
ComponentTest.hpp:55
ComponentEventTest::tester
Tester tester
Definition
ComponentTest.hpp:57
ComponentEventTest::data
FormalParamType data
Definition
ComponentTest.hpp:58
ComponentInternalInterfaceTest
Definition
ComponentTest.hpp:108
ComponentInternalInterfaceTest::data
FormalParamType data
Definition
ComponentTest.hpp:111
ComponentInternalInterfaceTest::tester
Tester tester
Definition
ComponentTest.hpp:110
ComponentParamCommandTest
Definition
ComponentTest.hpp:91
ComponentParamCommandTest::tester
Tester tester
Definition
ComponentTest.hpp:93
ComponentParamCommandTest::data
FormalParamType data
Definition
ComponentTest.hpp:94
ComponentTelemetryTest
Definition
ComponentTest.hpp:73
ComponentTelemetryTest::tester
Tester tester
Definition
ComponentTest.hpp:75
ComponentTelemetryTest::data
FormalParamType data
Definition
ComponentTest.hpp:76
FppTest
typed_tests
ComponentTest.hpp
Generated by
1.10.0