Skip to content

Commit

Permalink
Merge pull request #486 from In-line/patch-6
Browse files Browse the repository at this point in the history
Fix compilation under linux with ICC 17 (GCC 6.2)
  • Loading branch information
theAsmodai committed Jun 30, 2017
2 parents eac20ae + b630405 commit 534522f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dep/cppunitlite/src/Assertions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 534522f

Please sign in to comment.