]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/ntp/tests/libntp/statestr.c
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / ntp / tests / libntp / statestr.c
1 #include "config.h"
2
3 #include "ntp_stdlib.h"
4 #include "ntp_calendar.h"
5 #include "ntp.h"        // Needed for MAX_MAC_LEN used in ntp_control.h
6 #include "ntp_control.h"
7
8 #include "unity.h"
9
10 void setUp(void)
11
12 }
13
14 void tearDown(void)
15 {
16 }
17
18
19 // eventstr()
20 void test_PeerRestart(void) {
21         TEST_ASSERT_EQUAL_STRING("restart", eventstr(PEVNT_RESTART));
22 }
23
24 void test_SysUnspecified(void) {
25         TEST_ASSERT_EQUAL_STRING("unspecified", eventstr(EVNT_UNSPEC));
26 }
27
28 // ceventstr()
29 void test_ClockCodeExists(void) {
30         TEST_ASSERT_EQUAL_STRING("clk_unspec", ceventstr(CTL_CLK_OKAY));
31 }
32
33 void test_ClockCodeUnknown(void) {
34         TEST_ASSERT_EQUAL_STRING("clk_-1", ceventstr(-1));
35 }
36