summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Clow <mclow.lists@gmail.com>2014-03-06 16:27:17 +0000
committerMarshall Clow <mclow.lists@gmail.com>2014-03-06 16:27:17 +0000
commit471f3c67db32e9d0592bdd80bfb93765749508a8 (patch)
tree497c45b71dc389a27fa9d65b1cc96f3a30a8d71d
parent9d3d032c7d9686fbd31c776f65155367d3e19dcd (diff)
downloadlibcxx_35a-471f3c67db32e9d0592bdd80bfb93765749508a8.tar.gz
Fix a couple of -Wabsolute-value warnings in the libc++ tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@203126 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/depr/depr.c.headers/math_h.pass.cpp6
-rw-r--r--test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/test/depr/depr.c.headers/math_h.pass.cpp b/test/depr/depr.c.headers/math_h.pass.cpp
index 9e93966f..858e1906 100644
--- a/test/depr/depr.c.headers/math_h.pass.cpp
+++ b/test/depr/depr.c.headers/math_h.pass.cpp
@@ -82,9 +82,9 @@ void test_exp()
void test_fabs()
{
static_assert((std::is_same<decltype(fabs((double)0)), double>::value), "");
- static_assert((std::is_same<decltype(fabsf(0)), float>::value), "");
- static_assert((std::is_same<decltype(fabsl(0)), long double>::value), "");
- assert(fabs(-1) == 1);
+ static_assert((std::is_same<decltype(fabsf(0.f)), float>::value), "");
+ static_assert((std::is_same<decltype(fabsl(0.L)), long double>::value), "");
+ assert(fabs(-1.f) == 1);
}
void test_floor()
diff --git a/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp b/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp
index 451fc160..b821109b 100644
--- a/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp
+++ b/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp
@@ -51,7 +51,7 @@ void test_edges()
assert(std::signbit(x[i].real()) == std::signbit(r.real()));
assert(std::isnan(r.imag()));
}
- else if (abs(x[i].real()) == 1 && x[i].imag() == 0)
+ else if (std::abs(x[i].real()) == 1 && x[i].imag() == 0)
{
assert(std::isinf(r.real()));
assert(std::signbit(x[i].real()) == std::signbit(r.real()));