tests: added utils.cpp to avoid gcc warnings

This commit is contained in:
gabime
2015-12-13 14:36:32 +02:00
parent 9551c8178c
commit 6feaa29c62
4 changed files with 18 additions and 11 deletions

View File

@@ -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
View 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
View File

@@ -0,0 +1,4 @@
#pragma once
void prepare_logdir();