unit tests for logging levels

This commit is contained in:
Jeff Becker 2020-01-21 13:21:11 -05:00
parent 2f02073cac
commit 8d11519eb2
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
2 changed files with 13 additions and 0 deletions

View File

@ -42,6 +42,7 @@ list(APPEND TEST_SRC
util/test_llarp_util_encode.cpp
util/test_llarp_util_printer.cpp
util/test_llarp_utils_str.cpp
util/test_llarp_util_log_level.cpp
util/thread/test_llarp_util_queue_manager.cpp
util/thread/test_llarp_util_queue.cpp
util/thread/test_llarp_util_thread_pool.cpp

View File

@ -0,0 +1,12 @@
#include <gtest/gtest.h>
#include <util/logging/loglevel.hpp>
struct LogLevelTest : public ::testing::Test
{
};
TEST_F(LogLevelTest, TestLogLevelNameBadName)
{
const auto maybe = llarp::LogLevelFromString("bogus");
ASSERT_FALSE(maybe.has_value());
}