From 8b86676331701656c7feebe0bc6471075d5efb50 Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Mon, 27 Jun 2016 13:15:06 +0200 Subject: use cmath * avoid using #include * add std:: namespace prefix when calling functions * use for std::abs() with integral types --- searchlib/src/tests/aggregator/perdocexpr.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'searchlib/src/tests/aggregator') 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 #include #include +#include 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); -- cgit v1.2.3