1 /* $NetBSD: statestr.c,v 1.1.1.2 2015/07/10 13:11:14 christos Exp $ */ 2 3 #include "config.h" 4 5 #include "ntp_stdlib.h" 6 #include "ntp_calendar.h" 7 #include "ntp.h" // Needed for MAX_MAC_LEN used in ntp_control.h 8 #include "ntp_control.h" 9 10 #include "unity.h" 11 12 void setUp(void) 13 { 14 } 15 16 void tearDown(void) 17 { 18 } 19 20 21 // eventstr() 22 void test_PeerRestart(void) { 23 TEST_ASSERT_EQUAL_STRING("restart", eventstr(PEVNT_RESTART)); 24 } 25 26 void test_SysUnspecified(void) { 27 TEST_ASSERT_EQUAL_STRING("unspecified", eventstr(EVNT_UNSPEC)); 28 } 29 30 // ceventstr() 31 void test_ClockCodeExists(void) { 32 TEST_ASSERT_EQUAL_STRING("clk_unspec", ceventstr(CTL_CLK_OKAY)); 33 } 34 35 void test_ClockCodeUnknown(void) { 36 TEST_ASSERT_EQUAL_STRING("clk_-1", ceventstr(-1)); 37 } 38 39