Formula Student Electronics & Software
The code for the embedded software
Loading...
Searching...
No Matches
test_systemDiagnostics.cpp
Go to the documentation of this file.
1
#include "unity.h"
2
#include "
model/systemDiagnostics.hpp
"
3
4
void
test_hasAnyComponentTimedOut
(
void
) {
5
FailureDetection
fd;
6
TEST_ASSERT_FALSE(fd.
hasAnyComponentTimedOut
());
7
delay(
COMPONENT_TIMESTAMP_TIMEOUT
+ 1);
8
TEST_ASSERT_TRUE(fd.
hasAnyComponentTimedOut
());
9
}
10
11
void
setUp
(
void
) {
12
}
13
14
void
tearDown
(
void
) {
15
}
16
17
18
int
main
() {
19
UNITY_BEGIN();
20
RUN_TEST(
test_hasAnyComponentTimedOut
);
21
return
UNITY_END();
22
}
COMPONENT_TIMESTAMP_TIMEOUT
#define COMPONENT_TIMESTAMP_TIMEOUT
Definition
digitalSettings.hpp:3
FailureDetection
Definition
systemDiagnostics.hpp:65
FailureDetection::hasAnyComponentTimedOut
bool hasAnyComponentTimedOut()
Definition
systemDiagnostics.hpp:74
systemDiagnostics.hpp
setUp
void setUp(void)
Definition
test_systemDiagnostics.cpp:11
tearDown
void tearDown(void)
Definition
test_systemDiagnostics.cpp:14
test_hasAnyComponentTimedOut
void test_hasAnyComponentTimedOut(void)
Definition
test_systemDiagnostics.cpp:4
main
int main()
Definition
test_systemDiagnostics.cpp:18
master
test
test_model
test_systemDiagnostics.cpp
Generated by
1.9.8