summaryrefslogtreecommitdiffstats
path: root/libcxx/test
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
commit66b2226eb829517aa2c825df0f8ae4135bd14b1c (patch)
tree098381c8adbd5d3ab90b44657adb8829c9b232e0 /libcxx/test
parent86a8f720419705baeaa878672c341631a84f5ba6 (diff)
downloadbcm5719-llvm-66b2226eb829517aa2c825df0f8ae4135bd14b1c.tar.gz
bcm5719-llvm-66b2226eb829517aa2c825df0f8ae4135bd14b1c.zip
Fix a couple of -Wabsolute-value warnings in the libc++ tests
llvm-svn: 203126
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/depr/depr.c.headers/math_h.pass.cpp6
-rw-r--r--libcxx/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/libcxx/test/depr/depr.c.headers/math_h.pass.cpp b/libcxx/test/depr/depr.c.headers/math_h.pass.cpp
index 9e93966f41e..858e19066eb 100644
--- a/libcxx/test/depr/depr.c.headers/math_h.pass.cpp
+++ b/libcxx/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/libcxx/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp b/libcxx/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp
index 451fc160ec7..b821109b751 100644
--- a/libcxx/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp
+++ b/libcxx/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()));
OpenPOWER on IntegriCloud