summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std
Commit message (Collapse)AuthorAgeFilesLines
...
* Reinstate libc++ patches now that the lldb formatter has been updated.Davide Italiano2019-03-053-25/+49
| | | | | | | | "[libc++] Fix <atomic> failures on GCC" "[libc++] Change memory_order to an enum class" "[libc++] decoupling Freestanding atomic<T> from libatomic.a" llvm-svn: 355427
* [libcxx] Revert set of atomic patches that broke lldb.Davide Italiano2019-03-053-49/+25
| | | | | | | | | | | Revert "[libc++] Fix <atomic> failures on GCC" Revert "[libc++] Change memory_order to an enum class" Revert "[libc++] decoupling Freestanding atomic<T> from libatomic.a" The lldb formatter nededs to be updated. Shafik and Louis will coordinate to do so. llvm-svn: 355417
* [libc++] Fix <atomic> failures on GCCLouis Dionne2019-03-051-17/+17
| | | | | | | | | | | | | | | | Summary: In https://reviews.llvm.org/D58201, we turned memory_order into an enum class in C++20 mode. However, we were not casting memory_order to its underlying type correctly for the GCC implementation, which broke the build bots. I also fixed a test that was failing in C++17 mode on GCC 5. Reviewers: EricWF, jfb, mclow.lists Subscribers: zoecarver Differential Revision: https://reviews.llvm.org/D58966 llvm-svn: 355409
* [libc++] Change memory_order to an enum classLouis Dionne2019-03-052-8/+32
| | | | | | | | | This implements P0439R0. Thanks to Zoe Carver for the patch. Differential Revision: https://reviews.llvm.org/D58201 llvm-svn: 355403
* [libc++] Fix forgotten fclose() in unit testLouis Dionne2019-03-011-0/+1
| | | | | | | Thanks to Andrey Maksimov for the patch. Differential Revision: https://reviews.llvm.org/D58732 llvm-svn: 355162
* [libc++] Increase portability of xalloc testLouis Dionne2019-03-011-5/+3
| | | | | | | | | | Do not assume that xalloc() starts at 0, which is not specified by the Standard. Thanks to Andrey Maksimov for the patch. Differential Revision: https://reviews.llvm.org/D58299 llvm-svn: 355160
* [libc++] Add is_nothrow_convertible from P0758R1Louis Dionne2019-02-271-0/+58
| | | | | | | Reviewed as https://reviews.llvm.org/D58019. Thanks to Zoe Carver for the patch. llvm-svn: 355010
* Implment the last part of P1024: tuple-like interface to span. Reviewed as ↵Marshall Clow2019-02-276-0/+248
| | | | | | https://reviews.llvm.org/D58706. llvm-svn: 354988
* Implement the second part of P1227R2 - Signed ssize() functions. Reviewed as ↵Marshall Clow2019-02-272-10/+128
| | | | | | https://reviews.llvm.org/D58642 llvm-svn: 354950
* Fix an ambiguity in the tests that gcc-tot complained about.Marshall Clow2019-02-2711-22/+22
| | | | llvm-svn: 354944
* [libc++] Add a test for PR14074Louis Dionne2019-02-271-0/+62
| | | | | | PR14074 was fixed in r165884, but no tests were added. llvm-svn: 354943
* [libc++] Mark several tests as XFAIL on macosx10.7Louis Dionne2019-02-2736-0/+179
| | | | | | | | | | | | | | | Those tests fail when linking against a new dylib but running against macosx10.7. I believe this is caused by a duplicate definition of the RTTI for exception classes in libc++.dylib and libc++abi.dylib, but this matter still needs some investigation. This issue was not caught previously because all the tests always linked against the same dylib used for running (because LIT made it impossible to do otherwise before r349171). rdar://problem/46809586 llvm-svn: 354940
* First part of P1227R2 - change span over to use 'size_t' instead of ↵Marshall Clow2019-02-275-18/+18
| | | | | | 'ptrdiff_t'. Reviewed as https://reviews.llvm.org/D58639. llvm-svn: 354936
* Implement P1357: Traits for [Un]bounded Arrays; adopted in KonaMarshall Clow2019-02-262-0/+142
| | | | llvm-svn: 354891
* LWG3101 - span's Container constructors need another constraint. Reviewed as ↵Marshall Clow2019-02-252-50/+10
| | | | | | https://reviews.llvm.org/D57058. llvm-svn: 354805
* Commit LWG3144 - span does not have a const_pointer typedef. Reviewed as D57039.Marshall Clow2019-02-251-0/+4
| | | | llvm-svn: 354802
* First part of P1024: Usability Enhancements for std::span. Remove operator() ↵Marshall Clow2019-02-253-8/+154
| | | | | | for indexing, and add 'front' and 'back' calls. llvm-svn: 354801
* [libcxx] Make sure all experimental tests are disabled when ↵Louis Dionne2019-02-2329-28/+3
| | | | | | | | | | | | | | | | enable_experimental=False Summary: Previously, we'd run some experimental tests even when enable_experimental=False was used with lit. Reviewers: EricWF Subscribers: christof, jkorous, dexonsmith, libcxx-commits, mclow.lists Differential Revision: https://reviews.llvm.org/D55834 llvm-svn: 354725
* [NFC] Fix incorrect comment in std::function testLouis Dionne2019-02-211-1/+1
| | | | llvm-svn: 354537
* [libcxx] Do not assume the number of elements in a moved-from associative ↵Louis Dionne2019-02-134-12/+24
| | | | | | | | | container Reviewed as https://reviews.llvm.org/D57903. Thanks to Andrey Maksimov for the patch. llvm-svn: 353955
* Add fenv.h headerEric Fiselier2019-02-111-11/+11
| | | | | | | | | | | | | | | | | Summary: Some implementations of fenv.h use macros to define the functions they provide. This can cause problems when `std::fegetround()` is spelled in source. This patch adds a `fenv.h` header to libc++ for the sole purpose of turning those macros into real functions. Reviewers: rsmith, mclow.lists, ldionne Reviewed By: rsmith Subscribers: mgorny, christof, libcxx-commits Differential Revision: https://reviews.llvm.org/D57729 llvm-svn: 353767
* Update some newly added files that mistakenly used the old file headerChandler Carruth2019-02-112-8/+6
| | | | | | to the new one. llvm-svn: 353668
* Mark another test as flakyKamil Rytarowski2019-02-091-0/+2
| | | | | | Reported on the NetBSD buildbot. llvm-svn: 353622
* [libc++] Fix XFAILs when exceptions are disabledLouis Dionne2019-02-053-3/+3
| | | | | | | | It turns out that I un-XFAILed too many tests in r353210: some tests actually fail whether exceptions are enabled or not because they use types that are marked as unavailable even when exceptions are disabled. llvm-svn: 353215
* [libc++] Fix XFAILs on macOS when exceptions are disabledLouis Dionne2019-02-0545-45/+45
| | | | | | | | Some tests are marked as failing on platforms where the dylib does not provide the required exception classes. However, when testing with exceptions disabled, those tests shouldn't be marked as failing. llvm-svn: 353210
* [libc++] Use UNSUPPORTED instead of TEST_STD_VER #ifdefLouis Dionne2019-02-055-37/+11
| | | | | | | | | | | When the whole test only works starting at some version of the Standard, use UNSUPPORTED lit markup instead of #ifdef TEST_STD_VER. This provides more visibility into the test suite. Reviewed as https://reviews.llvm.org/D57704. Thanks to Andrey Maksimov for the patch. llvm-svn: 353206
* [libcxx] Start defining lit features for tests depending on availabilityLouis Dionne2019-02-0545-321/+47
| | | | | | | | | | | | | | | | | This patch removes some vendor-specific availability XFAILs from the test suite. In the future, when a new feature is introduced in the dylib, an availability macro should be created and a matching lit feature should be created. That way, the test suite can XFAIL whenever the implementation lacks the necessary feature instead of being cluttered by vendor-specific annotations. Right now, those vendor-specific annotations are still somewhat cluttering the test suite by being in `config.py`, but at least they are localized. In the future, we could design a way to define those less intrusively or even automatically based on the availability macros that already exist in <__config>. llvm-svn: 353201
* Support tests in freestandingJF Bastien2019-02-045748-5823/+17112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Freestanding is *weird*. The standard allows it to differ in a bunch of odd manners from regular C++, and the committee would like to improve that situation. I'd like to make libc++ behave better with what freestanding should be, so that it can be a tool we use in improving the standard. To do that we need to try stuff out, both with "freestanding the language mode" and "freestanding the library subset". Let's start with the super basic: run the libc++ tests in freestanding, using clang as the compiler, and see what works. The easiest hack to do this: In utils/libcxx/test/config.py add: self.cxx.compile_flags += ['-ffreestanding'] Run the tests and they all fail. Why? Because in freestanding `main` isn't special. This "not special" property has two effects: main doesn't get mangled, and main isn't allowed to omit its `return` statement. The first means main gets mangled and the linker can't create a valid executable for us to test. The second means we spew out warnings (ew) and the compiler doesn't insert the `return` we omitted, and main just falls of the end and does whatever undefined behavior (if you're luck, ud2 leading to non-zero return code). Let's start my work with the basics. This patch changes all libc++ tests to declare `main` as `int main(int, char**` so it mangles consistently (enabling us to declare another `extern "C"` main for freestanding which calls the mangled one), and adds `return 0;` to all places where it was missing. This touches 6124 files, and I apologize. The former was done with The Magic Of Sed. The later was done with a (not quite correct but decent) clang tool: https://gist.github.com/jfbastien/793819ff360baa845483dde81170feed This works for most tests, though I did have to adjust a few places when e.g. the test runs with `-x c`, macros are used for main (such as for the filesystem tests), etc. Once this is in we can create a freestanding bot which will prevent further regressions. After that, we can start the real work of supporting C++ freestanding fairly well in libc++. <rdar://problem/47754795> Reviewers: ldionne, mclow.lists, EricWF Subscribers: christof, jkorous, dexonsmith, arphaman, miyuki, libcxx-commits Differential Revision: https://reviews.llvm.org/D57624 llvm-svn: 353086
* Move the feature test macros script to the utils directory.Eric Fiselier2019-02-021-975/+0
| | | | | | | It doesn't make a lot of sense to keep it with the tests, deep into the test suite directonies. llvm-svn: 352970
* add a test and a couple minor bug fixes for the ↵Marshall Clow2019-02-011-0/+5
| | | | | | implicit-signed-integer-truncation sanitizer. This is PR#40566 llvm-svn: 352926
* Fix a bit of libc++-specific behavior in the regex tests; add a missing ↵Marshall Clow2019-01-313-4/+46
| | | | | | test. Reviewed as https://reviews.llvm.org/D57391 Thanks to Andrey Maksimov for the patch llvm-svn: 352781
* Fix PR40495 - is_invokable_v<void> does not compileEric Fiselier2019-01-292-182/+356
| | | | | | | | | | | The meta-programming that attempted to form the invoke call expression was not in a SFINAE context. This made it a hard error to provide non-referencable types like 'void' or 'void (...) const'. This patch fixes the error by checking the validity of the call expression within a SFINAE context. llvm-svn: 352522
* Mark some of the behavior in the move w/allocator constructors of ↵Marshall Clow2019-01-295-36/+41
| | | | | | deque/unordered containers as 'libc++-specific'. Thanks to Andrey Maksimov for pointing this out. llvm-svn: 352512
* [libc++] Use runtime rather then compile-time glibc version checkPetr Hosek2019-01-281-10/+24
| | | | | | | | | | | | | | | glibc supports versioning, so it's possible to build against older version and run against newer version. This is sometimes relied on in practice, e.g. in Fuchsia build we build against older sysroot (equivalent to Ubuntu Trusty) to cover the broadest possible range of host systems, but that doesn't necessarily match the system that binary is going to run on which may have newer version, in which case the compile test used in curr_symbol is going to fail. Using runtime check is more reliable. Differential Revision: https://reviews.llvm.org/D56702 llvm-svn: 352425
* Mark awk.pass.cpp as XFAIL for NetBSDKamil Rytarowski2019-01-241-1/+2
| | | | | | Reported on the NetBSD 8 build bot. llvm-svn: 352097
* D14686: 'Protect against overloaded comma in random_shuffle and improve ↵Marshall Clow2019-01-242-2/+45
| | | | | | tests' I had to cut back on the tests with this, because they were not C++03 friendly. Thanks to gribozavr for the patch llvm-svn: 352087
* [libcxx] Portability fix: unordered_set and unordered_multiset iterators are ↵Louis Dionne2019-01-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | not required to be the same The unordered_set and unordered_multiset iterators are specified in the standard as follows: using iterator = implementation-defined; // see [container.requirements] using const_iterator = implementation-defined; // see [container.requirements] using local_iterator = implementation-defined; // see [container.requirements] using const_local_iterator = implementation-defined; // see [container.requirements] The pairs iterator/const_iterator and local_iterator/const_local_iterator are not required to be the same. The reasonable requirement would be that iterator can convert to const_iterator and local_iterator can convert to const_local_iterator. This patch weakens the check and makes the test more portable. Reviewed as https://reviews.llvm.org/D56493. Thanks to Andrey Maksimov for the patch. llvm-svn: 352083
* Mark another test as flakyKamil Rytarowski2019-01-241-0/+2
| | | | | | Reported on the NetBSD 8 buildbot. llvm-svn: 352064
* Uncomment the entire test, but mark as XFAIL on linux-gnu because it uses ↵Marshall Clow2019-01-241-2/+3
| | | | | | locales that aren't generally available there, similar to the other regex tests llvm-svn: 352006
* Mark another test as flakyKamil Rytarowski2019-01-231-0/+2
| | | | | | Reported on the NetBSD 8 buildbot. llvm-svn: 351995
* Apply D28248: 'Work around GCC PR37804'. Thanks to mdaniels for the patchMarshall Clow2019-01-232-0/+42
| | | | llvm-svn: 351993
* Mark another test as flakyKamil Rytarowski2019-01-231-0/+2
| | | | | | Reported on the NetBSD 8 buildbot. llvm-svn: 351988
* Correct mark for flaky testsKamil Rytarowski2019-01-237-7/+7
| | | | | | Add missing trailing dot. llvm-svn: 351983
* Mark more tests flakyKamil Rytarowski2019-01-232-0/+4
| | | | | | Reported on the NetBSD 8 buildbot llvm-svn: 351944
* Mark thread.condition.condvarany/wait_for.pass.cpp as flakyKamil Rytarowski2019-01-231-0/+2
| | | | | | Reported on the NetBSD 8 buildbot. llvm-svn: 351937
* While reviewing D57058, Louis had some questions about the existing span ↵Marshall Clow2019-01-222-36/+69
| | | | | | constructor tests. They were not testing the stuff that they said they were. Updated the tests to test what they should have been doing llvm-svn: 351887
* [libcxx] Include <cstring> in tests that use strcmpLouis Dionne2019-01-224-5/+8
| | | | | | | Reviewed as https://reviews.llvm.org/D56503. Thanks to Andrey Maksimov for the patch. llvm-svn: 351847
* Fix aligned allocation availability XFAILs after D56445.Eric Fiselier2019-01-208-24/+40
| | | | | | | | | | D56445 bumped the minimum Mac OS X version required for aligned allocation from 10.13 to 10.14. This caused libc++ tests depending on the old value to break. This patch updates the XFAILs for those tests to include 10.13. llvm-svn: 351670
* Revert "Fix aligned allocation availability XFAILs after D56445."Eric Fiselier2019-01-208-24/+16
| | | | | | | | | This reverts commit r351625. That fix was incomplete. I'm reverting so I can commit a complete fix in a single revision. llvm-svn: 351669
* Update generator script to use the new license file header.Chandler Carruth2019-01-191-4/+3
| | | | llvm-svn: 351650
OpenPOWER on IntegriCloud