fixed tests

This commit is contained in:
gabime 2015-05-15 20:54:01 +03:00
parent b5eaef81d4
commit c701420cf6
4 changed files with 8 additions and 6 deletions

View File

@ -1,6 +1,6 @@
CXX ?= g++ CXX ?= g++
CXXFLAGS = -D_WIN32_WINNT=0x600 -march=native -Wall -Wextra -Wshadow -pedantic -std=c++11 -pthread -Wl,--no-as-needed -I../include CXXFLAGS = -D_WIN32_WINNT=0x600 -march=native -Wall -pedantic -std=c++11 -pthread -Wl,--no-as-needed -O
LDPFALGS = -pthread LDPFALGS = -pthread -flto
CPP_FILES := $(wildcard *.cpp) CPP_FILES := $(wildcard *.cpp)
OBJ_FILES := $(addprefix ./,$(notdir $(CPP_FILES:.cpp=.o))) OBJ_FILES := $(addprefix ./,$(notdir $(CPP_FILES:.cpp=.o)))
@ -15,7 +15,7 @@ tests: $(OBJ_FILES)
clean: clean:
rm -f tests *.o logs/* rm -f tests *.o logs/*
rebuild: clean all rebuild: clean tests

View File

@ -37,9 +37,9 @@ static void delete_logs()
{ {
spdlog::drop_all(); spdlog::drop_all();
#ifdef _WIN32 #ifdef _WIN32
system("del /F /Q logs\\*"); auto rv = system("del /F /Q logs\\*");
#else #else
system("rm -f logs/*"); auto rv = system("rm -f logs/*");
#endif #endif
} }

View File

@ -5,6 +5,8 @@
#include <string> #include <string>
#include <ostream> #include <ostream>
#include <chrono> #include <chrono>
#include <exception>
#include "catch.hpp" #include "catch.hpp"
#include "../include/spdlog/spdlog.h" #include "../include/spdlog/spdlog.h"
#include "../include/spdlog/sinks/null_sink.h" #include "../include/spdlog/sinks/null_sink.h"