From c701420cf6233e7eaa21e5b6c711b50bbc85e00a Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 15 May 2015 20:54:01 +0300 Subject: [PATCH] fixed tests --- tests/Makefile | 6 +++--- tests/file_log.cpp | 4 ++-- tests/includes.h | 4 +++- tests/logs/placeholder.txt | 0 4 files changed, 8 insertions(+), 6 deletions(-) delete mode 100644 tests/logs/placeholder.txt diff --git a/tests/Makefile b/tests/Makefile index c1347d40..5d58c35c 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,6 +1,6 @@ CXX ?= g++ -CXXFLAGS = -D_WIN32_WINNT=0x600 -march=native -Wall -Wextra -Wshadow -pedantic -std=c++11 -pthread -Wl,--no-as-needed -I../include -LDPFALGS = -pthread +CXXFLAGS = -D_WIN32_WINNT=0x600 -march=native -Wall -pedantic -std=c++11 -pthread -Wl,--no-as-needed -O +LDPFALGS = -pthread -flto CPP_FILES := $(wildcard *.cpp) OBJ_FILES := $(addprefix ./,$(notdir $(CPP_FILES:.cpp=.o))) @@ -15,7 +15,7 @@ tests: $(OBJ_FILES) clean: rm -f tests *.o logs/* -rebuild: clean all +rebuild: clean tests diff --git a/tests/file_log.cpp b/tests/file_log.cpp index 5fc92664..41167f05 100644 --- a/tests/file_log.cpp +++ b/tests/file_log.cpp @@ -37,9 +37,9 @@ static void delete_logs() { spdlog::drop_all(); #ifdef _WIN32 - system("del /F /Q logs\\*"); + auto rv = system("del /F /Q logs\\*"); #else - system("rm -f logs/*"); + auto rv = system("rm -f logs/*"); #endif } diff --git a/tests/includes.h b/tests/includes.h index 3f74cd5f..7cda161d 100644 --- a/tests/includes.h +++ b/tests/includes.h @@ -5,6 +5,8 @@ #include #include #include +#include + #include "catch.hpp" #include "../include/spdlog/spdlog.h" -#include "../include/spdlog/sinks/null_sink.h" \ No newline at end of file +#include "../include/spdlog/sinks/null_sink.h" diff --git a/tests/logs/placeholder.txt b/tests/logs/placeholder.txt deleted file mode 100644 index e69de29b..00000000