File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,3 +25,27 @@ CASE("valid_priority() returns whether supplied priority is valid")
2525 EXPECT (Syslog::valid_priority (LOG_DEBUG) == true );
2626 EXPECT_NOT (Syslog::valid_priority (8192007 ) == true );
2727}
28+
29+ CASE (" valid_logopt() returns whether supplied logopt is valid" )
30+ {
31+ EXPECT (Syslog::valid_logopt (LOG_PID || LOG_NOWAIT) == true );
32+ }
33+
34+ CASE (" valid_facility() returns whether supplied facility is valid" )
35+ {
36+ EXPECT (Syslog::valid_facility (LOG_USER) == true );
37+ }
38+
39+ CASE (" ip() returns destination IP address" )
40+ {
41+ auto s = Syslog::ip ().to_string ();
42+ size_t dots = std::count (s.begin (), s.end (), ' .' );
43+ EXPECT (dots == 3 );
44+ }
45+
46+ CASE (" port() returns destination port" )
47+ {
48+ int port = Syslog::port ();
49+ EXPECT (port > -1 );
50+ EXPECT (port < 65536 );
51+ }
You can’t perform that action at this time.
0 commit comments