From 825db3567f6efdfb62c3ad51696557c937d57d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20=C3=96ster?= Date: Sun, 31 Aug 2025 11:37:39 +0300 Subject: [PATCH] Fix unit test to work with logging --- test/emul/Logging.cpp | 3 +++ test/emul/Logging.h | 10 ++++------ 2 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 test/emul/Logging.cpp diff --git a/test/emul/Logging.cpp b/test/emul/Logging.cpp new file mode 100644 index 00000000..8c12eaab --- /dev/null +++ b/test/emul/Logging.cpp @@ -0,0 +1,3 @@ +#include "Logging.h" + +Logging logging; diff --git a/test/emul/Logging.h b/test/emul/Logging.h index 49388f3e..74088a4c 100644 --- a/test/emul/Logging.h +++ b/test/emul/Logging.h @@ -1,9 +1,9 @@ -#ifndef LOGGING_H -#define LOGGING_H +#pragma once #include #include +namespace test { class Logging { public: static void printf(const char* format, ...) { @@ -14,11 +14,9 @@ class Logging { } static void println(const char* message) { printf("%s\n", message); } - static void print(const char* message) { printf("%s", message); } }; +} // namespace test -// Global logging instance +using Logging = test::Logging; extern Logging logging; - -#endif