blob: 506b079aa4786ddbf26fb98b8a9faf6f7bc6bd8f (
plain)
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
|
#include "libntptest.h"
extern "C" {
#include "ntp.h" // Needed for MAX_MAC_LEN used in ntp_control.h
#include "ntp_control.h"
};
class statestrTest : public libntptest {
};
// eventstr()
TEST_F(statestrTest, PeerRestart) {
EXPECT_STREQ("restart", eventstr(PEVNT_RESTART));
}
TEST_F(statestrTest, SysUnspecified) {
EXPECT_STREQ("unspecified", eventstr(EVNT_UNSPEC));
}
// ceventstr()
TEST_F(statestrTest, ClockCodeExists) {
EXPECT_STREQ("clk_unspec", ceventstr(CTL_CLK_OKAY));
}
TEST_F(statestrTest, ClockCodeUnknown) {
EXPECT_STREQ("clk_-1", ceventstr(-1));
}
|