summaryrefslogtreecommitdiffstats
path: root/libcxx/test/utilities
Commit message (Collapse)AuthorAgeFilesLines
* [tests] One last batch of XFAILs, for tests using new symbols added to libc++.Daniel Dunbar2013-02-0613-0/+65
| | | | | | | - As of this commit, the test suite should now fully pass on both darwin11 and darwin12 when testing against either a locally built libc++ or the system libc++. llvm-svn: 174478
* Zhang Xiongpang: Add definitions for const data members. Fixes ↵Howard Hinnant2012-12-123-0/+12
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=14585. llvm-svn: 170026
* Andrew Morrow: There are two tests under test/utilities/memory that heap ↵Howard Hinnant2012-08-022-4/+0
| | | | | | | | | | | | | allocate two integers which remain unused and are subsequently leaked, so the test fail when run under valgrind. Unless I'm overlooking a subtle reason why they are needed I think they can be removed, allowing these tests to pass under valgrind. The attached patch removes the variables. If there is a reason for them to exist, I can change this to just delete them at the end of the test. llvm-svn: 161195
* Implement [util.smartptr.shared.atomic]. This is the last unimplementedHoward Hinnant2012-07-3011-0/+409
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | section in libc++. This requires a recompiled dylib. Failure to rebuild the dylib will result in a link-time error if and only if the functions from [util.smartptr.shared.atomic] are used. The implementation is not lock free. After considerable thought, I know of no way to make the implementation lock free. Ideas welcome along that front. But changing the ABI of shared_ptr is not on the table at this point. The mutex used to lock these function is encapsulated by std::__sp_mut. The only thing the client knows about std::__sp_mut is that it has a void* data member, can't be constructed, and has lock and unlock members. Within the binary __sp_mut is currently implemented as a pointer to a std::mutex. That can change in the future without disturbing the ABI (as long as sizeof(__sp_mut) remains constant. I specifically did not make __sp_mut a spin lock as I have a pathological distrust of spin locks. Testing on OS X reveals that the use of std::mutex in this role is not a large performance penalty as long as the contention for the mutex is low (more likely to get the lock than to have to wait). In the future we can still make __sp_mut a spin lock if that is what is desired (without ABI damage). The dylib contains 16 __sp_mut's to be chosen based on the hash of the address of the shared_ptr. The constant 16 is a ball-park reasonable space/time tradeoff. std::hash<T*> was changed to call __murmur2_or_cityhash, instead of the identity function. I had thought we had already done this, but I was mistaken. All of this is under #if __has_feature(cxx_atomic) even though the implementation is not lock free, because the signatures require access to std::memory_order, which is currently available only under __has_feature(cxx_atomic). llvm-svn: 160940
* Relax the complete-type checks that are happening under __invokable<Fp, ↵Howard Hinnant2012-07-161-0/+29
| | | | | | Args...> to only check Fp, and not Args... . This should be sufficient to give the desired high quality diagnostics under both bind and function. And this allows a test reported by Rich E on cfe-dev to pass. Tracked by <rdar://problem/11880602>. llvm-svn: 160285
* Applied constexpr to <chrono>.Howard Hinnant2012-07-1325-6/+357
| | | | llvm-svn: 160184
* Apply constexpr to <bitset>.Howard Hinnant2012-07-073-2/+5
| | | | llvm-svn: 159899
* Give tuple a constexpr default constructor.Howard Hinnant2012-07-061-0/+14
| | | | llvm-svn: 159857
* I believe tuple is still under development in the standard. Daniel Krugler ↵Howard Hinnant2012-04-012-4/+25
| | | | | | is/will be making convincing arguments that a modified form of LWG 2051 (currently NAD Future) is easily acheivable and desirable. He has demonstrated that a tuple<T...> where all of the T are implicitly convertible from U... should have a tuple constructor that is also implicit, instead of explicit. This would support the use cases in LWG 2051 while not undermining T... with explicit conversions from U.... This check-in is an experimental implementation of Daniel's work. I believe this work to be mature enough to warrant inclusion into libc++. If anyone sees real-world problems that this check in causes, please let me know and I will revert it, and provide the feedback to the LWG. llvm-svn: 153855
* Hook up to the new clang __is_trivially_constructible and ↵Howard Hinnant2012-02-242-11/+19
| | | | | | __is_trivially_assignable traits. Fixes r10925427 and http://llvm.org/bugs/show_bug.cgi?id=12038. llvm-svn: 151406
* Modernize relational operators for shared_ptr and unique_ptr. This includes ↵Howard Hinnant2012-02-212-0/+142
| | | | | | adding support for nullptr, and using less<T*>. Fixes http://llvm.org/bugs/show_bug.cgi?id=12056. llvm-svn: 151084
* Exercise rvalue arguements to make_shared for C++11 mode.Howard Hinnant2012-02-181-0/+11
| | | | llvm-svn: 150887
* tuple was accidentally lacking a valid copy assignment operator. It went ↵Howard Hinnant2012-02-152-2/+2
| | | | | | undetected because I had failed to test assigning from a const lvalue. This fixes http://llvm.org/bugs/show_bug.cgi?id=11921 llvm-svn: 150613
* Starting using murmur2 when combining multiple size_t's into a single hash, ↵Howard Hinnant2011-12-051-1/+2
| | | | | | and also for basic_string. Also made hash<thread::id> ever so slighly more portable. I had to tweak one test which is questionable (definitely not portable) anyway. llvm-svn: 145795
* Fix ratio arithmetic with zeroHoward Hinnant2011-11-012-0/+36
| | | | llvm-svn: 143519
* Adjust two tests to account for a nasty change in copying behaviorAlexis Hunt2011-07-184-0/+18
| | | | | | | between C++03 and C++0x and its effect on exceptions, and another two to not test move construction when rvalue references are not available. llvm-svn: 135445
* Given that __underlying_type is now available in clang, implementAlexis Hunt2011-07-181-1/+15
| | | | | | std::underlying_type. llvm-svn: 135410
* Fixing up some ABI issuesHoward Hinnant2011-07-071-4/+14
| | | | llvm-svn: 134639
* Correct for new rules regarding implicitly deleted special members. ↵Howard Hinnant2011-07-012-2/+2
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=10191 llvm-svn: 134248
* test for pair piecewise constructionHoward Hinnant2011-06-221-1/+34
| | | | llvm-svn: 133667
* noexcept for <memory>. I've added a few extension noexcept to: ↵Howard Hinnant2011-05-281-1/+1
| | | | | | allocator_traits<A>::deallocate, allocaate<T>::deallocate, return_temporary_buffer, and default_delete<T>::operator()(T*) const. My rationale was: If a std-dicated noexcept function needs to call another std-defined function, that called function must be noexcept. We're all a little new to noexcept, so things like this are to be expected. Also included fix for broken __is_swappable trait pointed out by Marc Glisse, thanks Marc|. And fixed a test case for is_nothrow_destructible. Destructors are now noexcept by default| llvm-svn: 132261
* Simplied bind using __invoke. In the process, found and fixed a couple of ↵Howard Hinnant2011-05-192-0/+19
| | | | | | bugs. C++11 only. llvm-svn: 131667
* Fix and beef up test bug for move_if_noexceptHoward Hinnant2011-05-171-3/+11
| | | | llvm-svn: 131483
* Clean up a bunch of warnings in the tests, 3 of which actually turned out to ↵Howard Hinnant2011-05-1726-1/+51
| | | | | | be test bugs. llvm-svn: 131479
* Redesign of result_of to handle reference-qualified member functionsHoward Hinnant2011-05-161-0/+4
| | | | llvm-svn: 131407
* A much improved type_traits for C++0x. Not yet done: ↵Howard Hinnant2011-05-1317-48/+79
| | | | | | is_trivially_constructible, is_trivially_assignable and underlying_type. llvm-svn: 131291
* Corrected some bugs in both memory and the tests. Preparing for being able ↵Howard Hinnant2011-05-112-5/+5
| | | | | | to turn on support for alias templates. llvm-svn: 131199
* minor corrections to test, and hook is_base_of up to clang intrinsicHoward Hinnant2011-01-282-5/+2
| | | | llvm-svn: 124502
* placeholder testHoward Hinnant2011-01-251-0/+19
| | | | llvm-svn: 124193
* Eliminate the C++0x-only is_convertible testing function that acceptsDouglas Gregor2011-01-251-0/+15
| | | | | | | | | | | | | | | | | | | | | | | a cv-qualifier rvalue reference to the type, e.g., template <class _Tp> char __test(const volatile typename remove_reference<_Tp>::type&&); The use of this function signature rather than the more straightforward one used in C++98/03 mode, e.g., template <class _Tp> char __test(_Tp); is broken in two ways: 1) An rvalue reference cannot bind to lvalues, so is_convertible<X&, X&>::value would be false. This breaks two of the unique_ptr tests on Clang and GCC >= 4.5. Prior GCC's seem to have allowed rvalue references to bind to lvalues, allowing this bug to slip in. 2) By adding cv-qualifiers to the type we're converting to, we get some incorrect "true" results for, e.g., is_convertible<const X&, X&>::value. llvm-svn: 124166
* LWG 1385 [FCD] tuple_cat should be a single variadic signature ↵Howard Hinnant2010-12-111-15/+90
| | | | | | (http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#1385). This issue is only in Ready status, meaning it is not official, but probably will be this March in Madrid. It was tentatively accepted in Batavia with the previso that Bill and I didn't have any problems implementing it. This is my part of that agreement. llvm-svn: 121619
* Test adjustment for recent changes in allocator_traitsHoward Hinnant2010-12-101-1/+1
| | | | llvm-svn: 121503
* This got accidentally removedHoward Hinnant2010-12-101-0/+20
| | | | llvm-svn: 121502
* cleaning up...Howard Hinnant2010-12-0821-634/+0
| | | | llvm-svn: 121275
* Update testsuite strucuture to latest draftHoward Hinnant2010-11-233-0/+64
| | | | llvm-svn: 120036
* Update testsuite strucuture to latest draftHoward Hinnant2010-11-234-12/+0
| | | | llvm-svn: 120029
* N3191: C++ Timeout SpecificationHoward Hinnant2010-11-205-8/+8
| | | | llvm-svn: 119909
* N3123Howard Hinnant2010-11-201-3/+3
| | | | llvm-svn: 119906
* N3142. Many of these traits are just placeholders with medium quality ↵Howard Hinnant2010-11-1938-723/+1235
| | | | | | emulation; waiting on compiler intrinsics to do it right. llvm-svn: 119854
* LWG 1339Howard Hinnant2010-11-181-2/+3
| | | | llvm-svn: 119699
* LWG 1404Howard Hinnant2010-11-182-2/+48
| | | | llvm-svn: 119609
* LWG 1325Howard Hinnant2010-11-171-1/+4
| | | | llvm-svn: 119571
* LWG 1191Howard Hinnant2010-11-172-0/+62
| | | | llvm-svn: 119545
* LWG 1118Howard Hinnant2010-11-172-41/+31
| | | | llvm-svn: 119541
* license changeHoward Hinnant2010-11-16768-1536/+1536
| | | | llvm-svn: 119395
* Hooked the following up to clang: is_class, is_enum, ↵Howard Hinnant2010-09-081-1/+32
| | | | | | has_nothrow_copy_assign, has_trivial_destructor, has_virtual_destructor, is_pod. Implemented has_copy_assign. llvm-svn: 113373
* has_nothrow_copy_assign hooked up to clangHoward Hinnant2010-09-081-30/+18
| | | | llvm-svn: 113364
* has_trivial_copy_assign hooked up to clang (without workarounds). Filed ↵Howard Hinnant2010-09-071-28/+17
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=8109 to take care of several types which don't work yet. If there is some reason we don't want to handle these types in the compiler, I can handle most of them in the library. llvm-svn: 113312
* Made a stab at has_copy_constructor. Got it mostly working for g++-4.0, but ↵Howard Hinnant2010-09-072-5/+53
| | | | | | only works for scalar types on clang. Ultimately this needs a compiler-supported is_constructible which clang is missing, and won't be able to use until it gets variadic templates. llvm-svn: 113304
* has_nothrow_copy_constructor hooked up to clang. Filed ↵Howard Hinnant2010-09-071-6/+8
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=8107 to take care of several types which don't work yet. If there is some reason we don't want to handle these types in the compiler, I can handle most of them in the library. llvm-svn: 113294
OpenPOWER on IntegriCloud