F´ Flight Software - C/C++ Documentation
NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
z
Functions
a
b
c
d
e
f
g
h
i
j
l
m
o
p
r
s
t
u
v
w
Variables
b
c
f
g
k
l
m
o
p
r
s
t
u
w
z
Typedefs
a
b
c
d
e
f
g
h
i
l
n
o
p
r
s
t
u
v
w
Enumerations
Enumerator
a
b
f
h
i
k
n
o
p
s
v
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
e
f
i
m
r
s
t
w
Enumerations
b
c
d
f
g
h
m
o
q
r
s
t
u
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Related Symbols
:
a
b
c
d
f
g
h
l
p
q
r
s
t
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Functions
f
g
i
m
p
r
s
t
u
Variables
_
b
c
f
g
i
l
p
r
s
w
Typedefs
a
b
c
e
f
i
n
p
s
t
u
Enumerations
Enumerator
a
b
c
f
g
h
p
r
s
t
Macros
_
a
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
PortTest.hpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title PortTest.hpp
3
// \author T. Chieu
4
// \brief hpp file for PortTest class
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_PORT_TEST_HPP
14
#define FPP_TEST_PORT_TEST_HPP
15
16
#include "test/ut/Tester.hpp"
17
#include "FppTest/component/active/TypedPortIndexEnumAc.hpp"
18
19
#include "gtest/gtest.h"
20
21
// Typed port tests (sync and guarded)
22
template
<
typename
PortType>
23
class
TypedPortTest
:
public
::testing::Test {
24
protected
:
25
Tester
tester
;
26
PortType
port
;
27
};
23
class
TypedPortTest
:
public
::testing::Test {
…
};
28
29
TYPED_TEST_SUITE_P
(
TypedPortTest
);
30
31
TYPED_TEST_P
(
TypedPortTest
, SyncPort) {
32
this->tester.testSyncPortInvoke(TypedPortIndex::TYPED, this->port);
33
this->tester.testSyncPortCheck(this->port);
34
}
31
TYPED_TEST_P
(
TypedPortTest
, SyncPort) {
…
}
35
36
TYPED_TEST_P
(
TypedPortTest
, GuardedPort) {
37
this->tester.testGuardedPortInvoke(TypedPortIndex::TYPED, this->port);
38
this->tester.testGuardedPortCheck(this->port);
39
}
36
TYPED_TEST_P
(
TypedPortTest
, GuardedPort) {
…
}
40
41
REGISTER_TYPED_TEST_SUITE_P
(
TypedPortTest
,
42
SyncPort,
43
GuardedPort
44
);
45
46
// Typed async port tests
47
template
<
typename
PortType>
48
class
TypedAsyncPortTest
:
public
::testing::Test {
49
protected
:
50
Tester
tester
;
51
PortType
port
;
52
};
48
class
TypedAsyncPortTest
:
public
::testing::Test {
…
};
53
54
TYPED_TEST_SUITE_P
(
TypedAsyncPortTest
);
55
56
TYPED_TEST_P
(
TypedAsyncPortTest
, AsyncPort) {
57
this->tester.testAsyncPortInvoke(TypedPortIndex::TYPED, this->port);
58
this->tester.doDispatch();
59
this->tester.testAsyncPortCheck(this->port);
60
}
56
TYPED_TEST_P
(
TypedAsyncPortTest
, AsyncPort) {
…
}
61
62
REGISTER_TYPED_TEST_SUITE_P
(
TypedAsyncPortTest
,
63
AsyncPort
64
);
65
66
// Serial port tests (sync and guarded)
67
template
<
typename
PortType>
68
class
SerialPortTest
:
public
::testing::Test {
69
protected
:
70
Tester
tester
;
71
PortType
port
;
72
};
68
class
SerialPortTest
:
public
::testing::Test {
…
};
73
74
TYPED_TEST_SUITE_P
(
SerialPortTest
);
75
76
TYPED_TEST_P
(
SerialPortTest
, ToSerialSync) {
77
this->tester.testSyncPortInvoke(TypedPortIndex::SERIAL, this->port);
78
this->tester.testSyncPortCheckSerial(this->port);
79
}
76
TYPED_TEST_P
(
SerialPortTest
, ToSerialSync) {
…
}
80
81
TYPED_TEST_P
(
SerialPortTest
, FromSerialSync) {
82
this->tester.testSyncPortInvokeSerial(TypedPortIndex::SERIAL, this->port);
83
this->tester.testSyncPortCheck(this->port);
84
}
81
TYPED_TEST_P
(
SerialPortTest
, FromSerialSync) {
…
}
85
86
TYPED_TEST_P
(
SerialPortTest
, ToSerialGuarded) {
87
this->tester.testGuardedPortInvoke(TypedPortIndex::SERIAL, this->port);
88
this->tester.testGuardedPortCheckSerial(this->port);
89
}
86
TYPED_TEST_P
(
SerialPortTest
, ToSerialGuarded) {
…
}
90
91
TYPED_TEST_P
(
SerialPortTest
, FromSerialGuarded) {
92
this->tester.testGuardedPortInvokeSerial(TypedPortIndex::SERIAL, this->port);
93
this->tester.testGuardedPortCheck(this->port);
94
}
91
TYPED_TEST_P
(
SerialPortTest
, FromSerialGuarded) {
…
}
95
96
REGISTER_TYPED_TEST_SUITE_P
(
SerialPortTest
,
97
ToSerialSync,
98
FromSerialSync,
99
ToSerialGuarded,
100
FromSerialGuarded
101
);
102
103
// Serial async port tests
104
template
<
typename
PortType>
105
class
SerialAsyncPortTest
:
public
::testing::Test {
106
protected
:
107
Tester
tester
;
108
PortType
port
;
109
};
105
class
SerialAsyncPortTest
:
public
::testing::Test {
…
};
110
111
TYPED_TEST_SUITE_P
(
SerialAsyncPortTest
);
112
113
TYPED_TEST_P
(
SerialAsyncPortTest
, ToSerialAsync) {
114
this->tester.testAsyncPortInvoke(TypedPortIndex::SERIAL, this->port);
115
this->tester.doDispatch();
116
this->tester.testAsyncPortCheckSerial(this->port);
117
}
113
TYPED_TEST_P
(
SerialAsyncPortTest
, ToSerialAsync) {
…
}
118
119
TYPED_TEST_P
(
SerialAsyncPortTest
, FromSerialAsync) {
120
this->tester.testAsyncPortInvokeSerial(TypedPortIndex::SERIAL, this->port);
121
this->tester.testAsyncPortCheck(this->port);
122
}
119
TYPED_TEST_P
(
SerialAsyncPortTest
, FromSerialAsync) {
…
}
123
124
REGISTER_TYPED_TEST_SUITE_P
(
SerialAsyncPortTest
,
125
ToSerialAsync,
126
FromSerialAsync
127
);
128
129
#endif
REGISTER_TYPED_TEST_SUITE_P
REGISTER_TYPED_TEST_SUITE_P(TypedPortTest, SyncPort, GuardedPort)
TYPED_TEST_P
TYPED_TEST_P(TypedPortTest, SyncPort)
Definition
PortTest.hpp:31
TYPED_TEST_SUITE_P
TYPED_TEST_SUITE_P(TypedPortTest)
SerialAsyncPortTest
Definition
PortTest.hpp:105
SerialAsyncPortTest::tester
Tester tester
Definition
PortTest.hpp:107
SerialAsyncPortTest::port
PortType port
Definition
PortTest.hpp:108
SerialPortTest
Definition
PortTest.hpp:68
SerialPortTest::port
PortType port
Definition
PortTest.hpp:71
SerialPortTest::tester
Tester tester
Definition
PortTest.hpp:70
TypedAsyncPortTest
Definition
PortTest.hpp:48
TypedAsyncPortTest::tester
Tester tester
Definition
PortTest.hpp:50
TypedAsyncPortTest::port
PortType port
Definition
PortTest.hpp:51
TypedPortTest
Definition
PortTest.hpp:23
TypedPortTest::tester
Tester tester
Definition
PortTest.hpp:25
TypedPortTest::port
PortType port
Definition
PortTest.hpp:26
FppTest
typed_tests
PortTest.hpp
Generated by
1.10.0