Permalink
Browse files

Merge pull request #486 from In-line/patch-6

Fix compilation under linux with ICC 17 (GCC 6.2)
  • Loading branch information...
theAsmodai committed Jun 30, 2017
2 parents eac20ae + b630405 commit 534522fce929ead690ba1278dc43db9463fbea7e
Showing with 2 additions and 1 deletion.
  1. +2 −1 dep/cppunitlite/src/Assertions.cpp
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <string.h>
#include <sstream>
#include <cmath>

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);

0 comments on commit 534522f

Please sign in to comment.