summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/numerics
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename some test data (and make it const) to rid us of some shadowing ↵Marshall Clow2016-06-0627-315/+315
| | | | | | warnings in the test suite. No functional change. Thanks to STL@microsoft for the report and patch. llvm-svn: 271919
* Remove trailing whitespace in test suite. Approved by Marshall Clow.Eric Fiselier2016-06-019-14/+14
| | | | llvm-svn: 271435
* [libcxx] Improve tests to use the UNSUPPORTED lit directiveAsiri Rathnayake2016-05-284-13/+5
| | | | | | | | | | | | | | | | | | | Quite a few libcxx tests seem to follow the format: #if _LIBCPP_STD_VER > X // Do test. #else // Empty test. #endif We should instead use the UNSUPPORTED lit directive to exclude the test on earlier C++ standards. This gives us a more accurate number of test passes for those standards and avoids unnecessary conflicts with other lit directives on the same tests. Reviewers: bcraig, ericwf, mclow.lists Differential revision: http://reviews.llvm.org/D20730 llvm-svn: 271108
* Tolerate incorrect return type for 'isinf' and 'isnan' in tests.Eric Fiselier2016-05-273-63/+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
* Guard use of <unistd.h> in test.Eric Fiselier2016-05-031-17/+22
| | | | llvm-svn: 268346
* Initialize local doubles to NaN. Patch from STL@microsoft.comEric Fiselier2016-05-022-28/+30
| | | | llvm-svn: 268285
* Void cast runtime-unused variables. Patch from STL@microsoft.comEric Fiselier2016-05-022-1/+3
| | | | llvm-svn: 268284
* Fix some non-standard parts of our test suite. Reported by STLEric Fiselier2016-04-222-0/+2
| | | | llvm-svn: 267131
* Add missing include of <algorithm>Marshall Clow2016-04-222-0/+2
| | | | llvm-svn: 267119
* Add a bunch of missing includes in the test suite to make it more portable. ↵Marshall Clow2016-01-121-0/+1
| | | | | | Fixes bugs #26120 and #26121. Thanks to Jonathan Wakely for the reports and the patches. llvm-svn: 257474
* [libcxx] Fixup a few fumbles in the initial no-exceptions XFAILs list.Asiri Rathnayake2015-11-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The initial buildbot run found a few missing bits in the initial XFAIL list for the no-exceptions libc++ variant. These discrepancies are as follows: [1] Following two tests need XFAILs on the no-exceptions library variant. My local runs had these two disabled for other reasons (unsupported): - localization/locales/locale/locale.cons/char_pointer.pass.cpp - numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp [2] These three does not need XFAILs, they were failing on my local runs for other reasons: - depr/depr.c.headers/uchar_h.pass.cpp - input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp - .../category.collate/locale.collate.byname/transform.pass.cpp (these are failing on my box for the default build as well) The current patch fixes both the cases above. Additionally, I've run the following scan to make sure I've covered all the cases: > grep ' catch \| try \| throw ' -R . | perl -pe 's|(.*?):.*|\1|' | sort | \ uniq > 1.txt > grep 'libcpp-no-exceptions' -R . | perl -pe 's|(.*?):.*|\1|' | sort | \ uniq > 2.txt > diff 1.txt 2.txt This showed up a few extra interesting cases: [3] These two tests do not use try/catch/throw statements, but they fail at runtime. Need to be investigated, I've left the XFAILs in. - std/thread/futures/futures.shared_future/dtor.pass.cpp - std/thread/futures/futures.unique_future/dtor.pass.cpp [4] These tests use a macro named TEST_HAS_NO_EXCEPTIONS to conditionally exclude try/catch/throw statements when running without exceptions. I'm not entirely sure why this was needed (AFAIK, we didn't have a no-exceptions library build before). The macro's defintion is quite similar to that of _LIBCPP_NO_EXCEPTIONS. I will investigate if this can be reused for my test fixes or if it should be replaced with _LIBCPP_NO_EXCEPTIONS. - std/experimental/any/* Change-Id: I9ad1e0edd78f305406eaa0ab148b1ab693f7e26a llvm-svn: 252870
* Make it possible to build a no-exceptions variant of libcxx.Asiri Rathnayake2015-11-103-0/+3
| | | | | | | | | | | | Fixes a small omission in libcxx that prevents libcxx being built when -DLIBCXX_ENABLE_EXCEPTIONS=0 is specified. This patch adds XFAILS to all those tests that are currently failing on the new -fno-exceptions library variant. Follow-up patches will update the tests (progressively) to cope with the new library variant. Change-Id: I4b801bd8d8e4fe7193df9e55f39f1f393a8ba81a llvm-svn: 252598
* Remove unneeded initialisation of fenv_t and fexcept_t.Ed Schouten2015-03-151-2/+2
| | | | | | | | Though common, there is no requirement that fenv_t and fexcept_t are structure and integer types, respectively. fexcept_t is a structure on CloudABI. llvm-svn: 232329
* Add support for arc4random() to random_device.Ed Schouten2015-03-101-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Nuxi CloudABI (https://github.com/NuxiNL/cloudlibc) does not allow processes to access the global filesystem namespace. This breaks random_device, as it attempts to use /dev/{u,}random. This change adds support for arc4random(), which is present on CloudABI. In my opinion it would also make sense to use arc4random() on other operating systems, such as *BSD and Mac OS X, but I'd rather leave that to the maintainers of the respective platforms. Switching to arc4random() does change the ABI. This change also attempts to make some cleanups to the code. It adds a single #define for every random interface, instead of testing against operating systems explicitly. As discussed, also validate the token argument to be equal to "/dev/urandom" on all systems that only provide pseudo-random numbers. This should cause little to no breakage, as "/dev/urandom" is also the default argument value. Reviewed by: jfb Differential Revision: http://reviews.llvm.org/D8134 llvm-svn: 231764
* Move test into test/std subdirectory.Eric Fiselier2014-12-20820-0/+43889
llvm-svn: 224658
OpenPOWER on IntegriCloud