blob: e7a1bd7cf034c21503174b4b74b61137bf925ccf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#include "config.h"
#include "ntp_stdlib.h"
#include "ntp.h" // needed for MAX_MAC_LEN used in ntp_control.h
#include "ntp_control.h"
#include "unity.h"
void setUp(void);
void test_PeerRestart(void);
void test_SysUnspecified(void);
void test_ClockCodeExists(void);
void test_ClockCodeUnknown(void);
void
setUp(void)
{
init_lib();
return;
}
// eventstr()
void
test_PeerRestart(void) {
TEST_ASSERT_EQUAL_STRING("restart", eventstr(PEVNT_RESTART));
}
void
test_SysUnspecified(void) {
TEST_ASSERT_EQUAL_STRING("unspecified", eventstr(EVNT_UNSPEC));
}
// ceventstr()
void
test_ClockCodeExists(void) {
TEST_ASSERT_EQUAL_STRING("clk_unspec", ceventstr(CTL_CLK_OKAY));
}
void
test_ClockCodeUnknown(void) {
TEST_ASSERT_EQUAL_STRING("clk_-1", ceventstr(-1));
}
|