summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/numerics/c.math/cmath.pass.cpp
Commit message (Collapse)AuthorAgeFilesLines
* cmath: Skip Libc for integral types in isinf, etc.Duncan P. N. Exon Smith2017-04-211-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | For std::isinf, the standard requires effectively calling isinf as double from Libc for integral types. But integral types are never infinite; we don't need to call Libc to return false. Also short-circuit other functions where Libc won't have interesting answers: signbit, fpclassify, isfinite, isnan, and isnormal. I added correctness tests for integral types since we're no longer deferring to Libc. In review it was pointed out that in future revisions of the C++ standard we may add more types to std::is_arithmetic (e.g., std::is_fixed_point). I'll leave it to a future commit to hack this to allow using math functions on those. We'll need to change things like __libcpp_fpclassify anyway, so I'm not sure anything here would really be future-proof. https://reviews.llvm.org/D31561 rdar://problem/31361223 llvm-svn: 301060
* Replace __cplusplus comparisons and dialect __has_feature checks with ↵Eric Fiselier2016-06-141-0/+1
| | | | | | | | | TEST_STD_VER. This is a huge cleanup that helps make the libc++ test suite more portable. Patch from STL@microsoft.com. Thanks STL! llvm-svn: 272716
* Remove trailing whitespace in test suite. Approved by Marshall Clow.Eric Fiselier2016-06-011-1/+1
| | | | llvm-svn: 271435
* Tolerate incorrect return type for 'isinf' and 'isnan' in tests.Eric Fiselier2016-05-271-3/+48
| | | | | | | | | | | | | | | | | | Summary: GLIBC recently removed the incorrect `int isinf(double)` and `int isnan(double)` overloads in C++11 and greater. This causes previously `XFAIL: linux` tests to start passing. Since there is no longer a way to 'XFAIL' the tests I choose to simply tolerate this bug. See https://sourceware.org/bugzilla/show_bug.cgi?id=19439 Reviewers: rsmith, mclow.lists, EricWF Subscribers: jroelofs, cfe-commits Differential Revision: http://reviews.llvm.org/D19835 llvm-svn: 271060
* Implement P0030R1: Introduce a 3-Argument Overload to std::hypotMarshall Clow2016-05-171-0/+23
| | | | llvm-svn: 269772
* Move test into test/std subdirectory.Eric Fiselier2014-12-201-0/+1485
llvm-svn: 224658
OpenPOWER on IntegriCloud