summaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/aggregator
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2016-06-27 13:15:06 +0200
committerArne Juul <arnej@yahoo-inc.com>2016-06-27 13:15:09 +0200
commit8b86676331701656c7feebe0bc6471075d5efb50 (patch)
tree1ac371c3d6baa03e7eaa7e9be76434914744c5b7 /searchlib/src/tests/aggregator
parent1dd3ec061ad1dc61fc20f606111ab16ef569e93c (diff)
use cmath
* avoid using #include <math.h> * add std:: namespace prefix when calling <cmath> functions * use <cstdlib> for std::abs() with integral types
Diffstat (limited to 'searchlib/src/tests/aggregator')
-rw-r--r--searchlib/src/tests/aggregator/perdocexpr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/searchlib/src/tests/aggregator/perdocexpr.cpp b/searchlib/src/tests/aggregator/perdocexpr.cpp
index 8f073187cce..f49eea0afa7 100644
--- a/searchlib/src/tests/aggregator/perdocexpr.cpp
+++ b/searchlib/src/tests/aggregator/perdocexpr.cpp
@@ -11,6 +11,7 @@
#include <vespa/vespalib/util/md5.h>
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/searchlib/expression/getdocidnamespacespecificfunctionnode.h>
+#include <cmath>
using namespace search;
using namespace search::expression;
@@ -431,7 +432,7 @@ TEST("testResultNodes") {
}
{
- FloatResultNode i1(-1), i2(0), i3(1), notanumber(nan("")),
+ FloatResultNode i1(-1), i2(0), i3(1), notanumber(std::nan("")),
minusInf(-INFINITY), plussInf(INFINITY);
EXPECT_EQUAL(i1.cmp(i1), 0);
EXPECT_EQUAL(i2.cmp(i2), 0);
@@ -450,7 +451,7 @@ TEST("testResultNodes") {
{
FloatBucketResultNode
i1(-1, 3), i2(188000, 188500), i3(1630000, 1630500),
- notanumber(-nan(""), nan("")), inf(-INFINITY, INFINITY);
+ notanumber(-std::nan(""), std::nan("")), inf(-INFINITY, INFINITY);
EXPECT_EQUAL(i1.cmp(i1), 0);
EXPECT_EQUAL(i2.cmp(i2), 0);
EXPECT_EQUAL(notanumber.cmp(notanumber), 0);