summaryrefslogtreecommitdiffstats
path: root/fastos/src/tests
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2016-06-27 13:06:20 +0200
committerArne Juul <arnej@yahoo-inc.com>2016-06-27 13:07:11 +0200
commite54f27e524e18ea2bf0290699814c5fe40b1e8d4 (patch)
tree57360b0751c67f20d0986267769fe5b8da137412 /fastos/src/tests
parent4c7621236ba903006bd0919941f975545815cf01 (diff)
use cmath
* avoid using #include <math.h> * add std:: namespace prefix when calling <cmath> functions
Diffstat (limited to 'fastos/src/tests')
-rw-r--r--fastos/src/tests/prefetchtest.cpp2
-rw-r--r--fastos/src/tests/timetest.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/fastos/src/tests/prefetchtest.cpp b/fastos/src/tests/prefetchtest.cpp
index efb68be0362..bd86f091f09 100644
--- a/fastos/src/tests/prefetchtest.cpp
+++ b/fastos/src/tests/prefetchtest.cpp
@@ -15,8 +15,6 @@
#include <stdlib.h>
-#include <math.h>
-
#include <vespa/fastos/fastos.h>
#include "tests.h"
diff --git a/fastos/src/tests/timetest.cpp b/fastos/src/tests/timetest.cpp
index b787914ad89..a8db91ed0c8 100644
--- a/fastos/src/tests/timetest.cpp
+++ b/fastos/src/tests/timetest.cpp
@@ -1,6 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <stdlib.h>
-#include <math.h>
+#include <cmath>
#include <vespa/fastos/fastos.h>
#include "tests.h"
@@ -236,7 +236,7 @@ public:
double millis = timing.MilliSecs();
double correct = i;
- Progress((fabs(millis - correct)/correct) < 0.15,
+ Progress((std::fabs(millis - correct)/correct) < 0.15,
"Elapsed time measurement: %d",
static_cast<int>(millis));
}