summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement n3607: 'equal', 'mismatch', and 'is_permutation'Marshall Clow2013-05-096-0/+775
| | | | llvm-svn: 181548
* Constrain __invoke functions more accurately. This fixes ↵Howard Hinnant2013-05-071-0/+7
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=15861 . llvm-svn: 181377
* Mark some tests with XFAIL for Lion and Mountain Lion.Howard Hinnant2013-05-075-0/+15
| | | | llvm-svn: 181336
* Expose accidentally removed __compressed_pair constructor taking ↵Howard Hinnant2013-05-061-0/+10
| | | | | | piecewise_construct_t. This fixes http://llvm.org/bugs/show_bug.cgi?id=15918 . llvm-svn: 181217
* Stephan Tolksdorf: fixes the issue in the <atomic> header and adds ↵Howard Hinnant2013-05-025-4/+37
| | | | | | | | corresponding tests. I've used macros to fall back to a user-provided default constructor if _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS (though I suspect that there won't be many users defining that macro). The tests use placement new to check that atomic values get properly zero-initialized. I had to modify the atomic_is_lock_free test, because default initialization of an object of const type 'const A' (aka 'const atomic<int>') requires a user-provided default constructor. llvm-svn: 180945
* Make it possible to provide special (linker) flags for the thread tests.Joerg Sonnenberger2013-05-021-5/+15
| | | | | | | Use it to build & link against libpthread on NetBSD for tests iff they are testing the thread interface. llvm-svn: 180942
* Add explicit casts to unsigned char before calling ctype functions.Joerg Sonnenberger2013-05-025-5/+5
| | | | | | Fixes the value range on platforms with signed char. llvm-svn: 180940
* İsmail Dönmez: Change to mktemp template to make it compatible with Linux.Howard Hinnant2013-04-251-1/+1
| | | | llvm-svn: 180267
* default_delete needs a static_assert against void types. I had previously ↵Howard Hinnant2013-04-241-0/+24
| | | | | | thought that sizeof(void) would take care of this. I was wrong. llvm-svn: 180213
* Avoid bash specific functionality to work with any POSIX shellJoerg Sonnenberger2013-04-231-16/+15
| | | | | | implementing $(( )). llvm-svn: 180139
* Zero-initialize all mbstate_t in the codecvt tests.Howard Hinnant2013-04-2313-15/+15
| | | | llvm-svn: 180108
* Somehow aligned_union got dropped through the cracks. This adds it. Did a ↵Howard Hinnant2013-04-223-8/+73
| | | | | | drive-by fix of alignment_of while I was in the neighborhood. llvm-svn: 180036
* After years of telling people: 'If you ever find any of my code that ↵Howard Hinnant2013-04-181-0/+7
| | | | | | self-move-assigns, send me a bug report.' Somebody finally took me up on it. vector::erase(begin(), begin()) does a self-move-assign of every element in the vector, leaving all of those elements in an unspecified state. I checked the other containers for this same bug and did not find it. Added test case. llvm-svn: 179760
* I believe this finishes up debug mode for list. The testing is a little ↵Howard Hinnant2013-04-163-0/+36
| | | | | | weak, but I believe all of the functionality is there. Certainly enough for people to checkout and start beating up on. llvm-svn: 179632
* addressof misbehaving for type with an implicit conversion operator to ↵Howard Hinnant2013-04-161-0/+18
| | | | | | char&. This fixes http://llvm.org/bugs/show_bug.cgi?id=15754 llvm-svn: 179608
* Numeric parsing was getting the wrong answer when faced with very long ↵Howard Hinnant2013-04-151-0/+12
| | | | | | inputs. This fixes both http://llvm.org/bugs/show_bug.cgi?id=15751 and http://llvm.org/bugs/show_bug.cgi?id=15740 llvm-svn: 179556
* Accidentally disallowed explicit tuple conversions when all elements of the ↵Howard Hinnant2013-04-141-0/+9
| | | | | | tuple can be explicitly converted. llvm-svn: 179467
* Set failbit when strtold sets errno to ERANGE when parsing floating point ↵Howard Hinnant2013-04-131-0/+48
| | | | | | values. llvm-svn: 179461
* Fix bug in __libcpp_db::__iterator_copy. Add debug test for swaping lists.Howard Hinnant2013-04-051-0/+42
| | | | llvm-svn: 178892
* More list debug mode tests.Howard Hinnant2013-04-056-0/+228
| | | | llvm-svn: 178873
* More work on debug mode for list.Howard Hinnant2013-04-056-0/+76
| | | | llvm-svn: 178819
* Somehow search_n never got tested, so of course it had a bug in it. This ↵Howard Hinnant2013-04-042-0/+221
| | | | | | fixes http://llvm.org/bugs/show_bug.cgi?id=15667. llvm-svn: 178764
* The move / swap members were not correctly taking all of the possible states ↵Howard Hinnant2013-04-031-0/+37
| | | | | | of the basic_stringbuf into account. Just rewrote these members. Test included. This fixes http://llvm.org/bugs/show_bug.cgi?id=15659. llvm-svn: 178690
* Richard Smith: It was pointed out to me off-list that libc++'s ↵Howard Hinnant2013-04-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | non-compiler-builtin implementation of std::is_polymorphic does this: template <class _Tp> struct __is_polymorphic1 : public _Tp {}; ... and that g++ rejects this if _Tp has an inaccessible virtual destructor (because __is_polymorphic1<_Tp> would have a deleted virtual destructor overriding _Tp's non-deleted destructor). Clang was failing to reject this; I've fixed that in r178563, but that causes libc++'s corresponding test case to fail with both clang and gcc when using the fallback implementation. The fallback code also incorrectly rejects final types. The attached patch fixes the fallback implementation of is_polymorphic; we now use dynamic_cast's detection of polymorphic class types rather than trying to determine if adding a virtual function makes the type larger: enable_if<sizeof((_Tp*)dynamic_cast<const volatile void*>(declval<_Tp*>())) != 0, ...> Two things of note here: * the (_Tp*) cast is necessary to work around bugs in Clang and g++ where we otherwise don't instantiate the dynamic_cast (filed as PR15656) * the 'const volatile' is here to treat is_polymorphic<cv T> as true for a polymorphic class type T -- my reading of the standard suggests this is incorrect, but it matches our builtin __is_polymorphic and gcc llvm-svn: 178576
* Some debug test cases for list.Howard Hinnant2013-04-028-0/+324
| | | | llvm-svn: 178565
* Test case was forming the wrong limits when size_t != unsigned long.Howard Hinnant2013-03-291-1/+2
| | | | llvm-svn: 178370
* The 3rd test in shrink_to_fit.pass.cpp can't possibly pass if exceptions are ↵Howard Hinnant2013-03-291-0/+2
| | | | | | disabled, so #ifdef'ing out the test. llvm-svn: 178350
* Revert r178075, "Tighten up the iterator requirements ...", it breaks LLVMDaniel Dunbar2013-03-271-7/+0
| | | | | | bootstrap with libc++. llvm-svn: 178116
* Tighten up the iterator requirements for the vector member templates. This ↵Howard Hinnant2013-03-261-0/+7
| | | | | | is especially important for the constructors so that is_constructible<vector<T>, I, I> gives the right answer when T can not be constructed from *I. Test case included for this latter point. llvm-svn: 178075
* Another vector debug mode test, and a static test on Allocator::value_type. ↵Howard Hinnant2013-03-261-0/+8
| | | | | | This partially addresses http://llvm.org/bugs/show_bug.cgi?id=15576. llvm-svn: 178064
* More vector debug tests.Howard Hinnant2013-03-266-0/+103
| | | | llvm-svn: 178033
* Fixed race conditions in thread tests; exposed by UBSanMarshall Clow2013-03-2613-15/+19
| | | | llvm-svn: 178029
* Simply debug mode tests per Dmitri Gribenko's suggestion.Howard Hinnant2013-03-2621-148/+21
| | | | llvm-svn: 178026
* Need one more swap overload for swapping two lvalue vector<bool>::reference's.Howard Hinnant2013-03-261-0/+10
| | | | llvm-svn: 178016
* Added debug tests for indexing, pop_back and both forms of erase. Added an ↵Howard Hinnant2013-03-259-0/+405
| | | | | | improved error message for erasing a single element with end(). llvm-svn: 177929
* Remove some erroneous code I was using to debug debug mode.Howard Hinnant2013-03-2512-24/+0
| | | | llvm-svn: 177908
* Debug mode tests for vector::front and back.Howard Hinnant2013-03-254-0/+192
| | | | llvm-svn: 177904
* More vector::iterator debug mode tests. Run by adding to OPTIONS ↵Howard Hinnant2013-03-258-7/+346
| | | | | | -D_LIBCPP_DEBUG2=1. llvm-svn: 177897
* Debug mode: learning to crawl. I need to set up some tests that actually ↵Howard Hinnant2013-03-251-0/+53
| | | | | | test that the debug mode is working, but that won't cause problems when debug mode isn't on. This is my first prototype of such a test. It should call std::terminate() because it's comparing iterators from different containers. And std::terminate() is rigged up to exit normally. If debug mode fails, and doesn't call terminate, then the program asserts. The test is a no-op if _LIBCPP_DEBUG2 is not defined or is defined to be 0. llvm-svn: 177892
* 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
* This is a start at making the libc++ test suite friendlier to the ↵Howard Hinnant2013-03-237-7/+42
| | | | | | -fnoexceptions flag. Although this is not a complete solution, it does reduce the number of test failures on OS X from 467 to 128 on OS X when -fno-exceptions is enabled, and does not impact the number of failures at all when -fno-exceptions is not enabled. The bulk of this code was donated anonymously. llvm-svn: 177824
* Test cleanup with respect to use of deprecated tmpnam function. Also ↵Howard Hinnant2013-03-2225-184/+205
| | | | | | Windows port for these tests to use _tempnam. The bulk of this patch was donated anonymously. I've tested it on OS X and accept responsibility for it. If I've broken anyone's platform by switching from tmpnam to mktemp for the generation of temporary file names, just let me know. Should be easy to fix in test/support/platform_support.h llvm-svn: 177755
* 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
* Removed raw references to __APPLE__; now just check to see if it is defined.Marshall Clow2013-03-182-3/+3
| | | | llvm-svn: 177297
* Removed raw references to _WIN32; now just check to see if it is defined.Marshall Clow2013-03-181-1/+1
| | | | llvm-svn: 177291
* Parsing floating point numbers with very long precision was broken, and this ↵Howard Hinnant2013-03-081-0/+12
| | | | | | patch fixes it. This fixes http://llvm.org/bugs/show_bug.cgi?id=15445. llvm-svn: 176711
* Fix a bug in mutex_try_to_lock. This was previously trying to unlock a ↵David Chisnall2013-02-191-1/+0
| | | | | | | | | | mutex that it didn't own, causing an assertion failure in mutex.cpp. The issue was that the unique_lock went out of scope, releasing the lock on m, then m.unlock() was called on an already-unlocked mutex. This change removes the spurious m.unlock() call. If this test was previously passing for anyone with assertions enabled, then they should investigate bugs in their pthread implementation, as pthread_unlock() should not return 0 if the mutex is currently unlocked. llvm-svn: 175506
* [tests] Add support for a link_flags lit parameter.Daniel Dunbar2013-02-121-15/+31
| | | | | | | - This is useful for testing with custom ABI libraries. - Patch by Michael van der Westhuizen. llvm-svn: 174997
* [tests] Another batch of timeout increases.Daniel Dunbar2013-02-118-12/+12
| | | | llvm-svn: 174902
OpenPOWER on IntegriCloud