summaryrefslogtreecommitdiffstats
path: root/libcxx/test/numerics
Commit message (Collapse)AuthorAgeFilesLines
* Move test into test/std subdirectory.Eric Fiselier2014-12-20820-43889/+0
| | | | llvm-svn: 224658
* Mark a bunch of long running tests as 'REQUIRES: long_tests'Jonathan Roelofs2014-12-1136-0/+72
| | | | | | This lets us skip them as UNSUPPORTED on slow systems like QEMU llvm-svn: 224032
* Mark some more fenv tests as UNSUPPORTED by newlibJonathan Roelofs2014-12-112-0/+4
| | | | llvm-svn: 224024
* libc++: add NaCl and PNaCl support for std::random_deviceJF Bastien2014-12-011-30/+66
| | | | | | | | | | | | | | | | | Summary: The NaCl sandbox doesn't allow opening files under /dev, but it offers an API which provides the same capabilities. This is the same random device emulation that nacl_io performs for POSIX support, but nacl_io is an optional library so libc++ can't assume that device emulation will be performed. Note that NaCl only supports /dev/urandom, not /dev/random. This patch also cleans up some of the preprocessor #endif, and fixes the test for Win32 (it accepts any token, and would therefore never throw regardless of the token provided). Test Plan: ninja check-libcxx Reviewers: dschuff, mclow.lists, danalbert Subscribers: jfb, cfe-commits Differential Revision: http://reviews.llvm.org/D6442 llvm-svn: 223068
* [libcxx] Fix SFINAE in <cmath>. Patch from K-Ballo.Eric Fiselier2014-10-171-0/+143
| | | | | | | | Delay instantiation of `__numeric_type` within <cmath>, don't instantiate it when the `is_arithmetic` conditions do not hold as it causes errors with user-defined types with ambiguous conversions. Fixes PR21083. llvm-svn: 219998
* Fix PR#20843: binomial_distribution<unsigned> is broken. Add test to ensure ↵Marshall Clow2014-09-171-0/+11
| | | | | | that signed and unsigned verstions produce the same sequence. llvm-svn: 217976
* Fix buffer overflow issue in valarray testEric Fiselier2014-09-031-3/+2
| | | | llvm-svn: 217012
* Add return statement to slice_array and mask_array assignment. Closes PR20614.Eric Fiselier2014-08-122-0/+28
| | | | | | | | | | This patch just adds the required return statements to slice_array::operator= and mask_array::operator=. Tests were added to check that the return value is the same as the object assigned to. llvm-svn: 215414
* fix copy and pasted comment in testEric Fiselier2014-08-091-1/+1
| | | | llvm-svn: 215276
* Mark math.h and cmath tests as xfail on linux.Eric Fiselier2014-08-093-26/+63
| | | | | | | | | | | | | These tests were marked as failing because the libc implementation does not use the proper return type on certain math functions. There is other weirdness that prevents us from defining our own version of these functions. The failing tests in cmake were separated into their own files so that the rest failures in the rest of the cmath tests were not hidden. This was not done for the math.h test since we don't actually supply math.h llvm-svn: 215275
* [libc++] Don't return uninitialized data from random_device::operator()David Majnemer2014-06-031-2/+14
| | | | | | | | | | Make sure we appropriately retry calls to read if the return result is less than what we asked for. Additionally, check and handle IO errors: EINTR results in the read operation getting restarted; other errors turn into exceptions. llvm-svn: 210061
* [libc++] random_device fails if open returns zeroDavid Majnemer2014-06-031-0/+11
| | | | | | | | | | | | | random_device::random_device(const string&) wrongly assumes that open can only validly return a file descriptor greater than zero. This results in random_device believing that it didn't successfully open the device causing it to throw in it's constructor, this ends up leaking a file descriptor. The fix is simple, don't error on file descriptors which are zero. llvm-svn: 210060
* Remove XFAIL from a number of tests that aren't expected to failJustin Bogner2014-05-151-3/+0
| | | | | | | | These tests haven't been failing on darwin11 or 12 since r189610 when pr17027 was fixed, but they've been keeping the libc++ bot red by XPASSing since then. llvm-svn: 208831
* Fix a couple of -Wabsolute-value warnings in the libc++ testsMarshall Clow2014-03-061-1/+1
| | | | llvm-svn: 203126
* Remove definition of std::fmaf from libc++. Fixes bug #18910. This function ↵Marshall Clow2014-03-051-2/+2
| | | | | | should come from the C standard library. As a drive-by fix, update the tests to remove a warning from -Wabsolute-value llvm-svn: 202990
* Back out the <type_traits> changes from r198431; they were breaking when ↵Marshall Clow2014-01-061-7/+7
| | | | | | building with glibc. Need to find a better solution for PR18218. llvm-svn: 198623
* Patch by Howard. First part of fix for PR18218; add type traits needed to do ↵Marshall Clow2014-01-031-0/+14
| | | | | | the right thing. Fix the problems in PR18218 for isnan and pow - they also need to be applied to the other functions in <cmath>. Also, a drive-by fix for the test - now actually calls test_abs() llvm-svn: 198431
* Implement literal suffixes for compledMarshall Clow2013-10-054-0/+157
| | | | llvm-svn: 192048
* XFAIL a few tests on darwin12Howard Hinnant2013-08-221-0/+1
| | | | llvm-svn: 189043
* Zhihao Yuan noted that a move assignment operation was missing from ↵Howard Hinnant2013-08-222-0/+87
| | | | | | std::adjacent_difference. Fixed. llvm-svn: 189036
* War on tabsHoward Hinnant2013-08-073-10/+10
| | | | llvm-svn: 187906
* Implement constexpr (n3302) and fix operator *= and /=Marshall Clow2013-07-3113-55/+280
| | | | llvm-svn: 187529
* Fix a couple of bugs in linear_congruential_engine::seed. Regression test ↵Howard Hinnant2013-05-211-0/+8
| | | | | | added. llvm-svn: 182421
* Marshall Clow found some divide-by-zero warnings with UBSan in rand's ↵Howard Hinnant2013-03-231-25/+65
| | | | | | binomial_distribution test. This eliminates the divide-by-zeros and describes in comments the numerical difficulties the test is having. Each of the problematic tests are exploring edge cases of the distribution. llvm-svn: 177826
* Fix bug in test; found by AddressSanitizerMarshall Clow2013-03-201-1/+1
| | | | llvm-svn: 177464
* Fix bug in test; found by AddressSanitizerMarshall Clow2013-03-181-1/+1
| | | | llvm-svn: 177355
* [tests] Mark another stream input expected failure (with system libc++).Daniel Dunbar2013-02-051-0/+2
| | | | llvm-svn: 174452
* Make <cmath> classification macros work with integral types.Howard Hinnant2013-01-141-0/+12
| | | | llvm-svn: 172461
* Move common header files into a 'support' directory; make 'testit' include ↵Marshall Clow2013-01-0510-10/+10
| | | | | | -I to that directory; rename 'iterators.h' to 'iterator_test.h'; remove hard-coded paths to include files from more than 350 source files llvm-svn: 171594
* ...and then there was one. Only one copy of 'iterators.h' in the test tree ↵Marshall Clow2013-01-0410-323/+9
| | | | | | for libc++ llvm-svn: 171479
* Zhang Xiongpang: Add definitions for const data members. Fixes ↵Howard Hinnant2012-12-125-0/+60
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=14585. llvm-svn: 170026
* Add overflow check to tanh(complex) and reduce to finite answer. Fixes ↵Howard Hinnant2012-09-191-0/+1
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=13874 llvm-svn: 164266
* constexpr applied to <complex>.Howard Hinnant2012-07-2010-1/+113
| | | | llvm-svn: 160585
* Update <random> with constexpr support. Patch contributed by Jonathan Sauer.Howard Hinnant2012-04-024-12/+20
| | | | llvm-svn: 153896
* Fix test for default constructor of discrete_distribution. This partially ↵Howard Hinnant2012-04-021-6/+3
| | | | | | addresses http://llvm.org/bugs/show_bug.cgi?id=12436. llvm-svn: 153873
* Reimplemented much of <istream> such that single character extractions do ↵Howard Hinnant2011-09-011-2/+2
| | | | | | not check to see if this is the last character in the stream and thus never set eofbit. This fixes http://llvm.org/bugs/show_bug.cgi?id=10817 . This fix requires a recompiled libc++.dylib to be fully implemented. The recompiled libc++.dylib is ABI compatible with that shipped on Lion. llvm-svn: 138961
* Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574Howard Hinnant2011-08-1213-21/+30
| | | | llvm-svn: 137522
* Warning suppression in test.Howard Hinnant2011-05-141-2/+0
| | | | llvm-svn: 131344
* Warning suppression in test.Howard Hinnant2011-05-141-2/+0
| | | | llvm-svn: 131343
* http://llvm.org/bugs/show_bug.cgi?id=9854. Also created an emulated ↵Howard Hinnant2011-05-131-2/+4
| | | | | | hexfloat literal for use in some of the tests. <sigh> And cleaned up some harmless but irritating warnings in the tests. llvm-svn: 131318
* Fix bug in Sseq constraints found by Seth CantrellHoward Hinnant2011-04-112-2/+2
| | | | llvm-svn: 129285
* LWG 1522Howard Hinnant2010-11-182-14/+14
| | | | llvm-svn: 119710
* license changeHoward Hinnant2010-11-16814-1628/+1628
| | | | llvm-svn: 119395
* Changed __config to react to all of clang's currently documented has_feature ↵Howard Hinnant2010-09-0411-22/+22
| | | | | | flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature. llvm-svn: 113086
* Fixing whitespace problemsHoward Hinnant2010-08-2280-146/+130
| | | | llvm-svn: 111762
* Implemented some adaptor constructors which I had missed.Howard Hinnant2010-05-286-0/+181
| | | | llvm-svn: 104946
* [numeric.iota]Howard Hinnant2010-05-261-0/+38
| | | | llvm-svn: 104719
* [rand.dist.samp.plinear]. This means we've got a fully tested and ↵Howard Hinnant2010-05-2524-0/+1505
| | | | | | functional <random>! 489 tests over 48 sections are passing. :-) The only thing still on my plate in this area is to back-port some of this technology to random_shuffle/shuffle in <algorithm>. That will involve shuffling header bits around (<random> depepends on <algorithm>), but it won't entail that much development (compared to what has been required for <random>). llvm-svn: 104575
* [rand.dist.samp.pconst] plus some bug fixes in the tests of the other ↵Howard Hinnant2010-05-2055-388/+2221
| | | | | | distributions llvm-svn: 104224
* [rand.dist.samp.discrete]Howard Hinnant2010-05-1924-0/+1326
| | | | llvm-svn: 104103
OpenPOWER on IntegriCloud