From 49989e067882b2b444283c615e1ea369ad39f947 Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 1 Dec 2017 04:35:23 +0200 Subject: [PATCH] fixed test for gcc 4.8 (no regex) --- tests/file_log.cpp | 9 ++++++++- tests/includes.h | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/file_log.cpp b/tests/file_log.cpp index faa5599d..23dd955d 100644 --- a/tests/file_log.cpp +++ b/tests/file_log.cpp @@ -212,6 +212,13 @@ TEST_CASE("rotating_file_sink::calc_filename3", "[rotating_file_sink]]") } + + + + + +// regex supported only from gcc 4.9 and above +#if !(__GNUC__ <= 4 && __GNUC_MINOR__ < 9) TEST_CASE("daily_file_sink::default_daily_file_name_calculator1", "[daily_file_sink]]") { // daily_YYYY-MM-DD_hh-mm.txt @@ -239,4 +246,4 @@ TEST_CASE("daily_file_sink::dateonly_daily_file_name_calculator", "[daily_file_s std::smatch match; REQUIRE(std::regex_match(filename, match, re)); } - +#endif diff --git a/tests/includes.h b/tests/includes.h index 6ca780e7..bf22414c 100644 --- a/tests/includes.h +++ b/tests/includes.h @@ -6,7 +6,10 @@ #include #include #include +// regex supported only from gcc 4.9 and above +#if !(__GNUC__ <= 4 && __GNUC_MINOR__ < 9) #include +#endif #include "catch.hpp" #include "utils.h"