Fix unit test to work with logging

This commit is contained in:
Daniel Öster 2025-08-31 11:37:39 +03:00
parent 8af86d9f29
commit 825db3567f
2 changed files with 7 additions and 6 deletions

3
test/emul/Logging.cpp Normal file
View file

@ -0,0 +1,3 @@
#include "Logging.h"
Logging logging;

View file

@ -1,9 +1,9 @@
#ifndef LOGGING_H #pragma once
#define LOGGING_H
#include <cstdarg> #include <cstdarg>
#include <cstdio> #include <cstdio>
namespace test {
class Logging { class Logging {
public: public:
static void printf(const char* format, ...) { static void printf(const char* format, ...) {
@ -14,11 +14,9 @@ class Logging {
} }
static void println(const char* message) { printf("%s\n", message); } static void println(const char* message) { printf("%s\n", message); }
static void print(const char* message) { printf("%s", message); } static void print(const char* message) { printf("%s", message); }
}; };
} // namespace test
// Global logging instance using Logging = test::Logging;
extern Logging logging; extern Logging logging;
#endif