summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [CUDA] Mark __libcpp_{isnan,isinf,isfinite} as constexpr.Justin Lebar2016-11-151-0/+29
| | | | | | | | | | | | | | Summary: This makes these functions available on host and device, which is necessary to compile <complex> for the device. Reviewers: hfinkel, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25403 llvm-svn: 287012
* Revert "P0503R0, adopted in Issaquah, rewords some requirements on nullptr_t ↵Vedant Kumar2016-11-153-43/+3
| | | | | | | | | | | | | and istream_iterator. No code changes were needed, but I updated a few tests. Also resolved P0509 and P0521, which required no changes to the library or tests." This reverts commit r286884, because it breaks the Xcode 7 builders: http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA-expensive/1583 Here is a PR that tracks the issue: https://llvm.org/bugs/show_bug.cgi?id=31016 llvm-svn: 287004
* [libcxx] [test] D26627: Fix ordering assumptions in unordered container tests.Stephan T. Lavavej2016-11-153-32/+17
| | | | llvm-svn: 286984
* [libcxx] [test] D26625: future_error::what() is implementation-defined.Stephan T. Lavavej2016-11-151-4/+6
| | | | llvm-svn: 286983
* [libcxx] [test] D26624: Fix bucket_count() assumptions.Stephan T. Lavavej2016-11-158-96/+96
| | | | | | | | | With a max_load_factor of 1.0, the only guarantee is that bucket_count() >= size(). (Note: setting max_load_factor without rehashing isn't supposed to affect this, because setting max_load_factor is currently specified to be constant time.) llvm-svn: 286982
* Missed one of the try blocks the first time :-(. Thanks to Renato for the ↵Marshall Clow2016-11-151-3/+13
| | | | | | heads up. llvm-svn: 286932
* P0503R0, adopted in Issaquah, rewords some requirements on nullptr_t and ↵Marshall Clow2016-11-143-3/+43
| | | | | | istream_iterator. No code changes were needed, but I updated a few tests. Also resolved P0509 and P0521, which required no changes to the library or tests. llvm-svn: 286884
* Missed a test with exceptions disabled earlier. Oops.Marshall Clow2016-11-141-4/+14
| | | | llvm-svn: 286883
* Implement P0516: 'Clarify That shared_future’s Copy Operations have Wide ↵Marshall Clow2016-11-142-0/+12
| | | | | | Contracts' which was adopted last week in Issaquah llvm-svn: 286877
* Make one of the new tests fail correctly on pre-C++17 systemsMarshall Clow2016-11-141-0/+6
| | | | llvm-svn: 286872
* Implement P0510 'Make future_error Constructible' adopted in IssaquahMarshall Clow2016-11-141-0/+14
| | | | llvm-svn: 286864
* Fixes for LWG 2598, 2686, 2739, 2742, 2747, and 2759, which were adopted ↵Marshall Clow2016-11-1416-4/+451
| | | | | | last week in Issaquah llvm-svn: 286858
* [libcxx] [test] D26314: Fix MSVC warning C4189 "local variable is ↵Stephan T. Lavavej2016-11-1431-270/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialized but not referenced". test/std/depr/depr.c.headers/inttypes_h.pass.cpp test/std/input.output/file.streams/c.files/cinttypes.pass.cpp test/std/input.output/iostream.forward/iosfwd.pass.cpp Add test() to avoid a bunch of void-casts, although we still need a few. test/std/input.output/iostream.format/quoted.manip/quoted.pass.cpp skippingws was unused (it's unclear to me whether this was mistakenly copy-pasted from round_trip() below). test/std/localization/locale.categories/category.collate/locale.collate/types.pass.cpp test/std/localization/locale.categories/category.ctype/facet.ctype.special/types.pass.cpp test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char.pass.cpp test/std/localization/locale.categories/category.ctype/locale.codecvt/types_wchar_t.pass.cpp test/std/localization/locale.categories/category.ctype/locale.ctype/types.pass.cpp test/std/localization/locale.categories/facet.numpunct/locale.numpunct/types.pass.cpp test/std/localization/locales/locale.global.templates/use_facet.pass.cpp When retrieving facets, the references are unused. test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_long.pass.cpp test/std/localization/locale.categories/category.numeric/locale.nm.put/facet.num.put.members/put_unsigned_long.pass.cpp "std::ios_base::iostate err = ios.goodbit;" was completely unused here. test/std/localization/locale.categories/category.time/locale.time.get/time_base.pass.cpp test/std/numerics/c.math/ctgmath.pass.cpp test/std/numerics/rand/rand.device/entropy.pass.cpp test/std/numerics/rand/rand.device/eval.pass.cpp test/std/strings/basic.string/string.modifiers/string_copy/copy.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eof.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eof.pass.cpp test/std/thread/futures/futures.promise/dtor.pass.cpp test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp These variables are verifying types but are otherwise unused. test/std/strings/basic.string/string.capacity/reserve.pass.cpp old_cap was unused (it's unclear to me whether it was intended to be used). test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char16_t/lt.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.char32_t/lt.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/eq.pass.cpp test/std/strings/char.traits/char.traits.specializations/char.traits.specializations.wchar.t/lt.pass.cpp These tests contained unused characters. llvm-svn: 286847
* Protect std::ios tests under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-145-5/+27
| | | | | | | | | Skip tests that expect an exception be thrown. Also add some missing asserts in the original test. Differential Revision: https://reviews.llvm.org/D26512 llvm-svn: 286823
* Protect nested-exceptions tests under no-exceptionsRoger Ferrer Ibanez2016-11-143-3/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D26458 llvm-svn: 286813
* Update tests for strings conversions under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-148-8/+84
| | | | | | Differential Revision: https://reviews.llvm.org/D26139 llvm-svn: 286812
* Protect smart-pointer tests under no exceptionsRoger Ferrer Ibanez2016-11-142-2/+8
| | | | | | | | Skip tests that expect an exception be thrown under no-exceptions. Differential Revision: https://reviews.llvm.org/D26457 llvm-svn: 286809
* Fix GCC libc++abi buildEric Fiselier2016-11-133-4/+26
| | | | llvm-svn: 286783
* Implement LWG 2770 - Make tuple_size<T> defined for all TEric Fiselier2016-11-133-4/+30
| | | | llvm-svn: 286779
* Fix PR30979 - tuple<move_only> is constructible from move_only const&Eric Fiselier2016-11-131-0/+50
| | | | llvm-svn: 286774
* Protect bitset tests under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-104-44/+84
| | | | | | | | | | | | | Bitset tests feature a sequence of tests of increasing bitset sizes, but these tests rely on exceptions when the bitset size is less than 50 elements. This change adds a flag to tell whether a test should throw. If it must throw it will be skipped under no-exceptions. Differential Revision: https://reviews.llvm.org/D26140 llvm-svn: 286474
* Protect std::experimental::optional tests under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-0713-27/+77
| | | | | | | | | | In these tests there are some paths that explicitly throw, so use the TEST_THROW macro that was proposed for this and then skip the tests that may enter the throwing path. Differential Revision: https://reviews.llvm.org/D26142 llvm-svn: 286099
* [libcxx] [test] Replace _LIBCPP_STD_VER with TEST_STD_VER.Stephan T. Lavavej2016-11-04252-314/+606
| | | | | | | | | | | This replaces every occurrence of _LIBCPP_STD_VER in the tests with TEST_STD_VER. Additionally, for every affected file, #include "test_macros.h" is being added explicitly if it wasn't already there. https://reviews.llvm.org/D26294 llvm-svn: 286007
* Implement another part of P0031; adding constexpr to move_iteratorMarshall Clow2016-11-0224-0/+349
| | | | llvm-svn: 285818
* Remove spurious token from #endifRoger Ferrer Ibanez2016-11-021-1/+1
| | | | llvm-svn: 285792
* Protect tests for new/delete under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-024-5/+20
| | | | | | | | Skip the tests that expect an exception be thrown and protect unreachable catch blocks. Differential Revision: https://reviews.llvm.org/D26197 llvm-svn: 285791
* Fix __libcpp_is_constructible for source types with explicit conversion ↵Eric Fiselier2016-11-021-2/+118
| | | | | | | | | | | | | | | | | | | | | | operators. Previously __libcpp_is_constructible checked the validity of reference construction using 'eat<To>(declval<From>())' but this doesn't consider From's explicit conversion operators. This patch teaches __libcpp_is_constructible how to handle these cases. To do this we need to check the validity using 'static_cast<To>(declval<From>())'. Unfortunately static_cast allows additional base-to-derived and lvalue-to-rvalue conversions, which have to be checked for and manually rejected. While implementing these changes I discovered that Clang incorrectly rejects `static_cast<int&&>(declval<float&>())` even though `int &&X(declval<float&>())` is well formed. In order to tolerate this bug the `__eat<T>(...)` needs to be left in-place. Otherwise it could be replaced entirely with the new static_cast implementation. Thanks to Walter Brown for providing the test cases. llvm-svn: 285786
* Protect exceptional paths under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-0128-248/+598
| | | | | | | | | | | | | | | | | | | | | | These tests are of the form try { action-that-may-throw assert(!exceptional-condition) assert(some-other-facts) } catch (relevant-exception) { assert(exceptional-condition) } Under libcpp-no-exceptions there is still value in verifying some-other-facts while avoiding the exceptional case. So for these tests just conditionally check some-other-facts if exceptional-condition is false. When exception are supported make sure that a true exceptional-condition throws an exception Differential Revision: https://reviews.llvm.org/D26136 llvm-svn: 285697
* Protect lock tests under libcpp-no-exceptionsRoger Ferrer Ibanez2016-11-0113-18/+86
| | | | | | | | Skip tests that expect an exception to be thrown. Differential Revision: https://reviews.llvm.org/D26184 llvm-svn: 285695
* Protect tests that expect an exception for an unknown std::random_deviceRoger Ferrer Ibanez2016-11-012-2/+4
| | | | | | | | Skip these tests under libcpp-no-exceptions. Differential Revision: https://reviews.llvm.org/D26141 llvm-svn: 285677
* Fix archetypes.hpp under libcpp-no-extensions and std level < 14Roger Ferrer Ibanez2016-10-311-2/+2
| | | | | | | | | | | | Under -fno-exceptions TEST_THROW becomes abort / __builtin_abort which returns void. This causes a type mismatch in the conditional operator when testing the library in C++98,03,11 modes. Use a comma operator to workaround this problem. Differential Revision: https://reviews.llvm.org/D26147 llvm-svn: 285572
* Change from "XFAIL: libcpp-no-exceptions" to "UNSUPPORTED: ↵Roger Ferrer Ibanez2016-10-3125-25/+25
| | | | | | | | | | | | | libcpp-no-exceptions" tests that only check exceptions and nothing else This is a follow up of D24562. These tests do not check anything but exceptions, so it makes sense to mark them as UNSUPPORTED under a library built without exceptions. Differential Revision: https://reviews.llvm.org/D26075 llvm-svn: 285550
* Fix _LIBCPP_EXTERN_TEMPLATE_INLINE_VISIBILITY to always have default visibility.Eric Fiselier2016-10-311-0/+5
| | | | | | | | | | | This prevent the symbols from being both externally available and hidden, which causes them to be linked incorrectly. This is only a problem when the address of the function is explicitly taken since it will always be inlined otherwise. This patch fixes the issues that caused r285456 to be reverted, and can now be reapplied. llvm-svn: 285531
* Rewrite std::filesystem::path iterators and parserEric Fiselier2016-10-301-0/+74
| | | | | | | | | | | | | | | | | | | | | | This patch entirely rewrites the parsing logic for paths. Unlike the previous implementation this one stores information about the current state; For example if we are in a trailing separator or a root separator. This avoids the need for extra lookahead (and extra work) when incrementing or decrementing an iterator. Roughly this gives us a 15% speedup over the previous implementation. Unfortunately this implementation is still a lot slower than libstdc++'s. Because libstdc++ pre-parses and splits the path upon construction their iterators are trivial to increment/decrement. This makes libc++ lazy parsing 100x slower than libstdc++. However the pre-parsing libstdc++ causes a ton of extra and unneeded allocations when constructing the string. For example `path("/foo/bar/")` would require at least 5 allocations with libstdc++ whereas libc++ uses only one. The non-allocating behavior is much preferable when you consider filesystem usages like 'exists("/foo/bar/")'. Even then libc++'s path seems to be twice as slow to simply construct compared to libstdc++. More investigation is needed about this. llvm-svn: 285526
* Remove files missed in r285466Eric Fiselier2016-10-281-31/+0
| | | | llvm-svn: 285469
* Fix test when using an installed libc++Eric Fiselier2016-10-282-0/+3
| | | | llvm-svn: 285392
* Add more tests for optional<const T>Eric Fiselier2016-10-286-0/+29
| | | | llvm-svn: 285384
* Add __libcpp_version file and __libcpp_library_version function.Eric Fiselier2016-10-281-0/+29
| | | | | | | | | | | | | | | This patch does two seperate things. First it adds a file called "__libcpp_version" which only contains the current libc++ version (currently 4000). This file is not intended for use as a header. This file is used by Clang in order to easily determine the installed libc++ version. This allows Clang to enable/disable certain language features only when the library supports them. The second change is the addition of _LIBCPP_LIBRARY_VERSION macro, which returns the version of the installed dylib since it may be different than the headers. llvm-svn: 285382
* [libcxx] Make regex_match backtrack when search failsTim Shen2016-10-271-10/+52
| | | | | | | | | | | | | | | | Summary: Fixes PR19851. alg.re.match/ecma.pass.cpp still XFAILS on linux, but after commenting out locale-related tests, it passes. I don't have a freebsd machine to produce a full pass. Reviewers: mclow.lists Subscribers: cfe-commits, emaste Differential Revision: https://reviews.llvm.org/D26026 llvm-svn: 285352
* [PATCH] D25483: [libcxx] [test] Fix non-Standard assumptions about how many ↵Stephan T. Lavavej2016-10-2712-16/+31
| | | | | | elements are allocated llvm-svn: 285346
* Cleanup nonportable behavior in tests for std::anyCasey Carter2016-10-263-8/+4
| | | | | | | | | | | | | | | | | Fixes MS issues 63, 64, and 65. test/std/utilities/any/any.class/any.cons/move.pass.cpp: * "Moves are always destructive" is not a portable assumption; check with LIBCPP_ASSERT. test/std/utilities/any/any.class/any.cons/value.pass.cpp: * The standard does not forbid initializing std::any from any pointer-to-function type. Remove the non-conforming "DecayTag" test. test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp: * Self-swap is not specified to perform no moves; check with LIBCPP_ASSERT. Differential Revision: https://reviews.llvm.org/D26007 llvm-svn: 285234
* Silence unused parameter warnings in archetypes.hppCasey Carter2016-10-261-6/+6
| | | | | | Reviewed at: https://reviews.llvm.org/D25958 llvm-svn: 285213
* Fix nullptr testsEric Fiselier2016-10-251-8/+17
| | | | llvm-svn: 285117
* Fix non-portable tests for temp_directory_path(...)Eric Fiselier2016-10-241-8/+11
| | | | llvm-svn: 285020
* Add missing include in string_view tests. Patch from Billy ONeil @ microsoftEric Fiselier2016-10-241-0/+1
| | | | llvm-svn: 285012
* Fix shadow warnings in string_view tests. Patch from STL@microsoft.comEric Fiselier2016-10-242-22/+20
| | | | llvm-svn: 285011
* Backout enabling -Wshadow until I have time to fix the breakageEric Fiselier2016-10-231-1/+2
| | | | llvm-svn: 284952
* Fix libc++ specific assertion in permissions(...) testsEric Fiselier2016-10-231-1/+2
| | | | llvm-svn: 284945
* Turn on -Wshadow so I find occurances before STL doesEric Fiselier2016-10-231-0/+1
| | | | llvm-svn: 284944
* Make make_from_tuple tests more portable. Patch from STL@microsoft.comEric Fiselier2016-10-231-4/+4
| | | | llvm-svn: 284943
OpenPOWER on IntegriCloud