From fc1340ac7f564c443d03858ed4dda21296f66075 Mon Sep 17 00:00:00 2001 From: whaffman Date: Thu, 9 Oct 2025 22:28:08 +0200 Subject: [PATCH] fix: tests update StdoutChannel and logging methods to remove unnecessary parameters --- tests/handler/test_handlers.cpp | 2 +- tests/log/test_log.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/handler/test_handlers.cpp b/tests/handler/test_handlers.cpp index 4c25b35..99e6688 100644 --- a/tests/handler/test_handlers.cpp +++ b/tests/handler/test_handlers.cpp @@ -1,7 +1,7 @@ #include #include #include -#include +#include #include diff --git a/tests/log/test_log.cpp b/tests/log/test_log.cpp index 445a2fe..9f4f233 100644 --- a/tests/log/test_log.cpp +++ b/tests/log/test_log.cpp @@ -78,7 +78,7 @@ TEST_F(LogTest, LogLevelToColoredString) TEST_F(LogTest, StdoutChannelConstruction) { - StdoutChannel channel(Log::Level::Info); + StdoutChannel channel(); // If we reach here without exception, construction was successful SUCCEED(); } @@ -115,16 +115,16 @@ TEST_F(LogTest, StaticLoggingMethodsWithContext) TEST_F(LogTest, SetStdoutChannel) { - EXPECT_NO_THROW(Log::setStdoutChannel(Log::Level::Debug)); + EXPECT_NO_THROW(Log::setStdoutChannel()); // Setting again to see if it handles multiple calls - EXPECT_NO_THROW(Log::setStdoutChannel(Log::Level::Info)); + EXPECT_NO_THROW(Log::setStdoutChannel()); } TEST_F(LogTest, SetFileChannel) { - EXPECT_NO_THROW(Log::setFileChannel("test_log.log", std::ios_base::trunc, Log::Level::Info)); + EXPECT_NO_THROW(Log::setFileChannel("test_log.log", std::ios_base::trunc)); // Setting again to see if it handles multiple calls - EXPECT_NO_THROW(Log::setFileChannel("test_log.log", std::ios_base::app, Log::Level::Debug)); + EXPECT_NO_THROW(Log::setFileChannel("test_log.log", std::ios_base::app)); } // Note: More comprehensive tests would involve checking actual log outputs,