File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 2.8.9 )
22project (unittests C CXX )
3+ set (CMAKE_EXPORT_COMPILE_COMMANDS ON )
34
45option (COVERAGE "Build with coverage generation" OFF )
56option (SILENT_BUILD "Build with some warnings turned off" ON )
@@ -85,6 +86,7 @@ set(TEST_SOURCES
8586 ${TEST} /util/unit/percent_encoding_test.cpp
8687 ${TEST} /util/unit/ringbuffer.cpp
8788 ${TEST} /util/unit/statman.cpp
89+ ${TEST} /util/unit/syslogd_test.cpp
8890 ${TEST} /util/unit/tar_test.cpp
8991 ${TEST} /util/unit/uri_test.cpp
9092)
Original file line number Diff line number Diff line change 1+ // This file is a part of the IncludeOS unikernel - www.includeos.org
2+ //
3+ // Copyright 2015-2017 Oslo and Akershus University College of Applied Sciences
4+ // and Alfred Bratterud
5+ //
6+ // Licensed under the Apache License, Version 2.0 (the "License");
7+ // you may not use this file except in compliance with the License.
8+ // You may obtain a copy of the License at
9+ //
10+ // http://www.apache.org/licenses/LICENSE-2.0
11+ //
12+ // Unless required by applicable law or agreed to in writing, software
13+ // distributed under the License is distributed on an "AS IS" BASIS,
14+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+ // See the License for the specific language governing permissions and
16+ // limitations under the License.
17+
18+ #include < common.cxx>
19+ #include < syslog.h>
20+ #include < util/syslogd.hpp>
21+
22+ CASE (" valid_priority() returns whether supplied priority is valid" )
23+ {
24+ EXPECT (Syslog::valid_priority (LOG_EMERG) == true );
25+ EXPECT (Syslog::valid_priority (LOG_DEBUG) == true );
26+ EXPECT_NOT (Syslog::valid_priority (8192007 ) == true );
27+ }
You can’t perform that action at this time.
0 commit comments