mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 01:39:30 +02:00
Fix unit test to work with logging
This commit is contained in:
parent
8af86d9f29
commit
825db3567f
2 changed files with 7 additions and 6 deletions
3
test/emul/Logging.cpp
Normal file
3
test/emul/Logging.cpp
Normal file
|
@ -0,0 +1,3 @@
|
|||
#include "Logging.h"
|
||||
|
||||
Logging logging;
|
|
@ -1,9 +1,9 @@
|
|||
#ifndef LOGGING_H
|
||||
#define LOGGING_H
|
||||
#pragma once
|
||||
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue