Skip to content

Commit

Permalink
Fix compilation under linux with ICC 17 (GCC 6.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
In-line committed Jun 30, 2017
1 parent eac20ae commit b630405
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dep/cppunitlite/src/Assertions.cpp
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 b630405

Please sign in to comment.