From b6304050282a9c57234d262bd7e0ff56164dd416 Mon Sep 17 00:00:00 2001 From: In-line Date: Fri, 30 Jun 2017 18:16:07 +0400 Subject: [PATCH] Fix compilation under linux with ICC 17 (GCC 6.2) --- dep/cppunitlite/src/Assertions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dep/cppunitlite/src/Assertions.cpp b/dep/cppunitlite/src/Assertions.cpp index 3c277f4..6887cca 100644 --- a/dep/cppunitlite/src/Assertions.cpp +++ b/dep/cppunitlite/src/Assertions.cpp @@ -4,6 +4,7 @@ #include #include #include +#include void Assertions::StringEquals(std::string message, std::string expected, std::string actual, const char* fileName, long lineNumber) { if (expected != actual) { @@ -57,7 +58,7 @@ void Assertions::CharEquals(std::string message, char expected, char actual, con } void Assertions::DoubleEquals(std::string message, double expected, double actual, double epsilon, const char* fileName, long lineNumber) { - if (abs(expected - actual) > epsilon) { + if (std::fabs(expected - actual) > epsilon) { std::stringstream ss; ss << message << " (expected '" << expected << "', got '" << actual << "')"; throw TestFailException(ss.str(), std::string(fileName), lineNumber);