commit | 549cc3d6e1b3e8321d61c39783e334c62b08c636 | [log] [tgz] |
---|---|---|
author | Michal Gorny <mgorny@gentoo.org> | Tue May 14 13:56:20 2019 +0000 |
committer | Michal Gorny <mgorny@gentoo.org> | Tue May 14 13:56:20 2019 +0000 |
tree | 984cdeb4e5cc5c2aff651e87377b95e29c9ec053 | |
parent | 9a1483e2ec35db36b89005288ef86bbe2705c2e4 [diff] |
[libc++] [test] Use std::nextafter() instead of std::nexttoward() Use std::nextafter() instead of std::nexttoward() in midpoint tests. In the context of this test, this should not cause any difference. Since nexttowardl() is not implemented on NetBSD 8, the latter function combined with 'long double' type caused test failure. nextafterl() does not have this problem. Differential Revision: https://reviews.llvm.org/D61748 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@360673 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp b/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp index 4abb232..1a967f7 100644 --- a/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp +++ b/test/std/numerics/numeric.ops/numeric.ops.midpoint/midpoint.float.pass.cpp
@@ -76,8 +76,8 @@ // Check two values "close to each other" T d1 = 3.14; - T d0 = std::nexttoward(d1, T(2)); - T d2 = std::nexttoward(d1, T(5)); + T d0 = std::nextafter(d1, T(2)); + T d2 = std::nextafter(d1, T(5)); assert(d0 < d1); // sanity checking assert(d1 < d2); // sanity checking