summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/allocator.adaptor
Commit message (Collapse)AuthorAgeFilesLines
* libcxx: Rename .hpp files in libcxx/test/support to .hNico Weber2019-08-216-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | LLVM uses .h as its extension for header files. Files renamed using: for f in libcxx/test/support/*.hpp; do git mv $f ${f%.hpp}.h; done References to the files updated using: for f in $(git diff master | grep 'rename from' | cut -f 3 -d ' '); do a=$(basename $f); echo $a; rg -l $a libcxx | xargs sed -i '' "s/$a/${a%.hpp}.h/"; done HPP include guards updated manually using: for f in $(git diff master | grep 'rename from' | cut -f 3 -d ' '); do echo ${f%.hpp}.h ; done | xargs mvim Differential Revision: https://reviews.llvm.org/D66104 llvm-svn: 369481
* Add include for 'test_macros.h' to all the tests that were missing them. ↵Marshall Clow2019-05-3130-0/+37
| | | | | | Thanks to Zoe for the (big, but simple) patch. NFC intended. llvm-svn: 362252
* [libc++] Use UNSUPPORTED instead of TEST_STD_VER #ifdefLouis Dionne2019-02-051-6/+2
| | | | | | | | | | | 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
* Support tests in freestandingJF Bastien2019-02-0432-33/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Update more file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-1932-128/+96
| | | | | | | | | | | | | | | | | | to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351648
* [libcxx] [test] Fix line endings, avoid unnecessary non-ASCII.Stephan T. Lavavej2017-12-131-1/+1
| | | | | | | | | | | | | | | benchmarks/util_smartptr.bench.cpp Change CRLF to LF. test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_fr_FR.pass.cpp Consistently comment "\u20ac" as EURO SIGN, its Unicode name, instead of the actual Unicode character. test/std/utilities/allocator.adaptor/allocator.adaptor.members/construct_type.pass.cpp Avoid non-ASCII dash. Fixes D40991. llvm-svn: 320536
* More of P0600; marking allocation routines as [[nodiscard]]Marshall Clow2017-11-262-0/+58
| | | | llvm-svn: 318992
* [libcxx] [test] Untabify, NFC.Stephan T. Lavavej2017-07-291-4/+4
| | | | llvm-svn: 309464
* [libcxx] [test] Strip trailing whitespace. NFC.Stephan T. Lavavej2017-06-201-1/+1
| | | | llvm-svn: 305848
* [test] Workaround C1XX bug in uses_allocator_types.hppCasey Carter2017-05-251-1/+4
| | | | | | | | VSO#109062 "Explicit template argument specification with empty template parameter pack expansion does not imply further empty pack expansion" Differential Revision: https://reviews.llvm.org/D33214 llvm-svn: 303888
* Mark LWG#2782 as complete. No functionality change; we already do this. Just ↵Marshall Clow2017-05-111-1/+7
| | | | | | added a few more tests. llvm-svn: 302802
* [libcxx] [test] Fix Clang -Wunused-local-typedef, part 2/3.Stephan T. Lavavej2017-02-055-10/+0
| | | | | | | | These typedefs were completely unused. Fixes D29136. llvm-svn: 294155
* [libcxx] [test] Fix recently introduced warnings emitted by MSVC.Stephan T. Lavavej2017-01-044-0/+16
| | | | | | | | | | These tests were using malloc()'s return value without checking for null, which MSVC's /analyze rightly warns about. Asserting that the pointer is non-null both expresses the test's intention and silences the warning. Fixes D27785. llvm-svn: 290921
* [libcxx] Fix PR24075, PR23841 - Add ↵Eric Fiselier2016-12-146-0/+891
| | | | | | | | | | | | | | | | | | | | scoped_allocator_adaptor::construct(pair<T, U>*, ...) overloads. Summary: For more information see: * https://llvm.org/bugs/show_bug.cgi?id=23841 * https://llvm.org/bugs/show_bug.cgi?id=24075 I hope you have as much fun reviewing as I did writing these insane tests! Reviewers: mclow.lists, AlisdairM, EricWF Subscribers: AlisdairM, Potatoswatter, cfe-commits Differential Revision: https://reviews.llvm.org/D27612 llvm-svn: 289710
* Remove all instances of _LIBCPP_HAS_NO_RVALUE_REFERENCES from test/std/utilitiesEric Fiselier2016-10-0123-78/+46
| | | | llvm-svn: 283032
* Replace __cplusplus comparisons and dialect __has_feature checks with ↵Eric Fiselier2016-06-141-1/+3
| | | | | | | | | TEST_STD_VER. This is a huge cleanup that helps make the libc++ test suite more portable. Patch from STL@microsoft.com. Thanks STL! llvm-svn: 272716
* Remove trailing whitespace in test suite. Approved by Marshall Clow.Eric Fiselier2016-06-013-8/+8
| | | | llvm-svn: 271435
* Void cast runtime-unused variables. Patch from STL@microsoft.comEric Fiselier2016-05-021-2/+8
| | | | llvm-svn: 268284
* Add the tests for the last commitMarshall Clow2015-10-252-0/+144
| | | | llvm-svn: 251254
* Add 'is_always_equal' tests for scoped_allocator. Found that I had typed ↵Marshall Clow2015-06-031-0/+75
| | | | | | '||' where I meant '&&' in the code; fixed that, too llvm-svn: 238931
* Walter Brown sent a list of tests which needed 'additional includes' to ↵Marshall Clow2015-01-091-0/+1
| | | | | | match what was in the standard. Added these includes to the tests. No changes to the library or test results. llvm-svn: 225541
* Move test into test/std subdirectory.Eric Fiselier2014-12-2021-0/+1437
llvm-svn: 224658
OpenPOWER on IntegriCloud