mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 09:09:35 +08:00
tests: added utils.cpp to avoid gcc warnings
This commit is contained in:
@@ -8,16 +8,8 @@
|
||||
#include <exception>
|
||||
|
||||
#include "catch.hpp"
|
||||
#include "utils.h"
|
||||
|
||||
#include "../include/spdlog/spdlog.h"
|
||||
#include "../include/spdlog/sinks/null_sink.h"
|
||||
|
||||
|
||||
static void prepare_logdir()
|
||||
{
|
||||
spdlog::drop_all();
|
||||
#ifdef _WIN32
|
||||
auto rv = system("del /F /Q logs\\*");
|
||||
#else
|
||||
auto rv = system("rm -f logs/*");
|
||||
#endif
|
||||
}
|
11
tests/utils.cpp
Normal file
11
tests/utils.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "includes.h"
|
||||
|
||||
void prepare_logdir()
|
||||
{
|
||||
spdlog::drop_all();
|
||||
#ifdef _WIN32
|
||||
auto rv = system("del /F /Q logs\\*");
|
||||
#else
|
||||
auto rv = system("rm -f logs/*");
|
||||
#endif
|
||||
}
|
4
tests/utils.h
Normal file
4
tests/utils.h
Normal file
@@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
void prepare_logdir();
|
||||
|
Reference in New Issue
Block a user