summaryrefslogtreecommitdiffstats
path: root/libcxx/test
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace maintenance. Remove a bunch of tabs that snuck in. No ↵Marshall Clow2014-10-1815-111/+111
| | | | | | functionality change llvm-svn: 220142
* [libcxx] Add support for building and testing with an ABI library not along ↵Eric Fiselier2014-10-182-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | linker paths Summary: This patch adds support for building/testing libc++ with an ABI library that the linker would not normally find. - `CMAKE_LIBRARY_PATH` is used to specify the list of search directories. - The ABI library is now found using `find_library` instead of assuming its along the linker's search path. - `CMAKE_LIBRARY_PATH` is passed to our LIT config as `library_paths`. - For each path in `library_paths` the following flags are added `-L<path> -Wl,-rpath -Wl,<path>` Some changes in existing behavior were also added: - `target_link_libraries` is now passed the ABI library file instead of the library name. Ex `target_link_libraries(cxx "/usr/lib/libc++abi.so")` vs `target_link_libraries(cxx "c++abi")`. - `-Wl,-rpath -Wl,<path>` is now used on OSX to link to libc++ instead of env['DYLD_LIBRARY_PATH'] if `use_system_lib=False`. Reviewers: mclow.lists, danalbert, EricWF Reviewed By: EricWF Subscribers: emaste, cfe-commits Differential Revision: http://reviews.llvm.org/D5038 llvm-svn: 220118
* [libcxx] Fix SFINAE in <cmath>. Patch from K-Ballo.Eric Fiselier2014-10-171-0/+143
| | | | | | | | Delay instantiation of `__numeric_type` within <cmath>, don't instantiate it when the `is_arithmetic` conditions do not hold as it causes errors with user-defined types with ambiguous conversions. Fixes PR21083. llvm-svn: 219998
* [libcxx] Add support for LLVM_USE_SANITIZER=UndefinedEric Fiselier2014-10-161-0/+5
| | | | | | | LLVM_USE_SANITIZER=Undefined support was added to the LLVM CMake configuration. Update libc++'s handling of LLVM_USE_SANITIZER to support this as well. llvm-svn: 219987
* Fixes PR21157 'tuple: non-default constructible tuple hard failure' Thanks ↵Marshall Clow2014-10-153-0/+56
| | | | | | to Louis Dionne for the bug report and the patch. llvm-svn: 219785
* Fix for PR 19616: 'tuple_cat of nested tuples fails in noexcept ↵Marshall Clow2014-10-072-1/+28
| | | | | | specification'. Thanks to Louis Dionne for the fix. llvm-svn: 219243
* Fix some type-traits (is_assignable, etc) dealing with classes that take ↵Marshall Clow2014-09-225-0/+32
| | | | | | non-const references as 'right hand side'. Add tests. Fixes PR# 20836 llvm-svn: 218286
* Fix PR#20843: binomial_distribution<unsigned> is broken. Add test to ensure ↵Marshall Clow2014-09-171-0/+11
| | | | | | that signed and unsigned verstions produce the same sequence. llvm-svn: 217976
* Add include of <cassert> for the operator commaMarshall Clow2014-09-171-0/+1
| | | | llvm-svn: 217938
* Create a 'comma_iterator' class that overloads operator, and asserts when ↵Marshall Clow2014-09-163-0/+121
| | | | | | it's called. Add tests to mismatch to make sure it can't be blindsided by such an evil iterator. More tests for other algorithms forthcoming. Thanks to STL for pointing this out at CppCon and Yakov Galka for opening LWG issue #2133 llvm-svn: 217902
* Fix a bug in the move-assigment operator for basic_stringbuf. Thanks to ↵Marshall Clow2014-09-161-0/+36
| | | | | | Johnathan Wakeley for the bug report llvm-svn: 217894
* PR20546: Fix tests for compare_exchange_weak.Dan Albert2014-09-066-18/+79
| | | | | | | | | | | | | | | | | | | | | | | | These calls are allowed to fail spuriously. 29.6.5.25: Remark: A weak compare-and-exchange operation may fail spuriously. That is, even when the contents of memory referred to by expected and object are equal, it may return false and store back to expected the same memory contents that were originally there. [ Note: This spurious failure enables implementation of compare and-exchange on a broader class of machines, e.g., load-locked store-conditional machines. A consequence of spurious failure is that nearly all uses of weak compare-and-exchange will be in a loop. To fix this, we replace any assert() that expects std::atomic::compare_exchange_weak() to return true with a loop. If the call does not return true within N runs (with N currently equal to 10), then the test fails. http://llvm.org/bugs/show_bug.cgi?id=20546 llvm-svn: 217319
* Allow libc++ to be built on systems without POSIX threadsJonathan Roelofs2014-09-05250-0/+542
| | | | | | | | | | If you're crazy enough to want this sort of thing, then add -D_LIBCPP_HAS_NO_THREADS to your CXXFLAGS and --param=additiona_features=libcpp-has-no-threads to your lit commnad line. http://reviews.llvm.org/D3969 llvm-svn: 217271
* Bugfix: allow additional_features to be emptyJonathan Roelofs2014-09-051-3/+4
| | | | llvm-svn: 217268
* Set -D_LIBCPP_HAS_NO_THREADS and -D_LIBCPP_HAS_NO_MONOTONIC_CLOCK based on ↵Jonathan Roelofs2014-09-053-2/+12
| | | | | | | | available_features http://reviews.llvm.org/D5214 llvm-svn: 217261
* test: Make it possible to opt in to use_clang_verify per testJustin Bogner2014-09-032-3/+8
| | | | | | | | | | | This modifies the use_clang_verify parameter I added in r217009 to only apply to tests that specifically ask for it via // USE_VERIFY. This allows us to incrementally convert tests, but start enjoying the benefits right away. Suggested by Eric Fiselier in code review. llvm-svn: 217017
* Fix buffer overflow issue in valarray testEric Fiselier2014-09-031-3/+2
| | | | llvm-svn: 217012
* test: Allow using clang -verify for failures rather than exit 1Justin Bogner2014-09-032-16/+38
| | | | | | | | | | | | | | | | | Currently, failure tests work by checking that compilation exits 1. This can lead to tests that fail for the wrong reason, so it'd be preferable to convert them to check for specific errors. This adds use_clang_verify parameter that runs failure tests using clang's -verify flag. I'll convert some tests in subsequent commits, and once all of the tests are converted we should key this on whether cxx_under_test is clang. I've also converted one of the unique.ptr tests, since it's the one that motivated the idea of using clang -verify when possible in the review of r216317. llvm-svn: 217009
* [asan] Make vector asan annotations exception-friendlyKostya Serebryany2014-09-022-2/+200
| | | | | | | | | Fix vector asan annotations with RAII. Add a test. Also, remove one dead function. Review: http://reviews.llvm.org/D4170 llvm-svn: 216995
* Partially address a FIXME in steady_clock::now()Jonathan Roelofs2014-09-022-0/+3
| | | | | | http://reviews.llvm.org/D4045 llvm-svn: 216949
* Fix PR#20834 - 'is_trivially_destructible yeilds wrong answer for arrays of ↵Marshall Clow2014-09-0213-21/+20
| | | | | | unknown bound' Thanks to K-ballo for the bug report. Update a few of the other tests while we're here, and fix a typo in a test name. llvm-svn: 216909
* Mark test types for <atomic> nothrow default constructible. Patch from Steve ↵Eric Fiselier2014-08-2715-15/+15
| | | | | | | | | | | | | MacKenzie. The way the standard currently specifies the default constructor for atomic<T> requires T to be nothrow default constructible. This patch makes our test types meet this requirement. Note: The nothrow default constructible requirment is subject to the outcome of LWG issue 1265. llvm-svn: 216561
* Fix bug 20740 - std::set/std::map don't support heterogeneous lookup for ↵Marshall Clow2014-08-244-0/+281
| | | | | | count(). Thanks to Jim Porter for the bug report llvm-svn: 216353
* Fix assignments that should be comparisons x3Eric Fiselier2014-08-233-4/+4
| | | | llvm-svn: 216318
* Add return statement to a test class's assignment operator. Defect found by ↵Eric Fiselier2014-08-231-1/+1
| | | | | | Coverity Scan. llvm-svn: 216317
* [libcxx] Add --show-unsupported and --show-xfail to check-libcxx's default ↵Eric Fiselier2014-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | LIT args. Summary: In order to gather more information about testsuite results these flags should be added to LIT's default args. These new switches were recently added to LIT. It been more than two weeks since both switches were added. I think its time we add these to our LIT flags. Reviewers: mclow.lists, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5037 llvm-svn: 216315
* Fix handling of format strings to work with python 2.6Eric Fiselier2014-08-231-4/+4
| | | | llvm-svn: 216314
* Refactor lit.cfg.Dan Albert2014-08-211-195/+247
| | | | | | | | | | | | | | | | | | The purely imperative format of the configuration performed in lit.cfg was making merge conflicts with changes I have for Android an unbelievable pain in the ass. I've moved all of the configuration into a Configuration class, with each piece of configuration happening in a different method. This way I can avoid merge conflicts, and any new features that get added (as have been done with the sanitizers, the -std flag, etc.) can be easily applied to Android as well. Reviewers: mclow.lists, EricWF Reviewed By: EricWF Differential Revision: http://reviews.llvm.org/D4952 llvm-svn: 216196
* Mark some localization time tests as XFAIL on linux.Eric Fiselier2014-08-212-0/+9
| | | | | | | | This marks some of the localization test XFAIL on linux. There has been some discussion on D4861 about doing this. Please let me know if any of these tests for you on linux. llvm-svn: 216151
* Mark some localization monetary tests as XFAIL on linux.Eric Fiselier2014-08-213-2/+17
| | | | | | | | This marks some of the localization test XFAIL on linux. There has been some discussion on D4861 about doing this. Please let me know if any of these tests for you on linux. llvm-svn: 216150
* Mark localization ctype tests as XFAIL on linux.Eric Fiselier2014-08-216-0/+8
| | | | | | | | This marks some of the localization test XFAIL on linux. There has been some discussion on D4861 about doing this. Please let me know if any of these tests for you on linux. llvm-svn: 216148
* fix missing include for ::close in platform_support.hEric Fiselier2014-08-191-0/+2
| | | | llvm-svn: 215998
* Add extra test case for PR20345. Should have been commited with r215984Eric Fiselier2014-08-191-0/+76
| | | | llvm-svn: 215985
* Fix is_member_function_pointer does not account for ellipsis. PR20345. Patch ↵Eric Fiselier2014-08-191-0/+24
| | | | | | | | from Agustin Berge. I reviewed the patch and added the test cases. llvm-svn: 215984
* Give libcxx tests temporary filenames that are actually unique.Jonathan Roelofs2014-08-191-4/+14
| | | | | | | | This fixes a race condition on temp file name creation. http://reviews.llvm.org/D4962 llvm-svn: 215977
* Add standard version to lit.cfg's available featuresEric Fiselier2014-08-181-0/+1
| | | | llvm-svn: 215885
* [libcxx] Add UNSUPPORTED tag to lit. It mirrors REQUIRES.Eric Fiselier2014-08-181-0/+11
| | | | | | | | | | | | | | | | | | Summary: This patch adds support for // UNSUPPORTED: feature. If an excluded feature is found in the list of available features then the test is marked unsupported. I hope to use this to mark test unsupported if the fail with msan on asan. As well as tests that fail in particular standard modes. Reviewers: mclow.lists, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4950 llvm-svn: 215883
* Mark cuchar tests as always xfail since we don't provide the header'Eric Fiselier2014-08-182-2/+2
| | | | llvm-svn: 215873
* [libcxx] Add support for LLVM_USE_SANITIZER to libcxx when being built ↵Eric Fiselier2014-08-182-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | standalone and in-tree Summary: This patch adds support for LLVM_USE_SANITIZER when being built in-tree and standalone. This patch does the following things: 1. define the LLVM_USE_SANITIZER option to "" when being built standalone. This also helps show we support it. 2. Translate LLVM_USE_SANITIZER when standalone in a very similar way done in llvm/cmake/HandleLLVMOptions.cmake. 3. Add config.llvm_use_sanitizer to lit.site.cfg.in 4. Add code to translate config.llvm_use_sanitizer's value into the needed compile flags in lit.cfg. Currently lit.cfg assumes that that the compiler supports '-fno-omit-frame-pointer' while CMakeLists.txt actually checks to see if its supported. We could pass this information to lit but I'm not sure its needed. Reviewers: mclow.lists, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4949 llvm-svn: 215872
* [libcxx] Update the way the -std= flag is chosen by CMake and LibcxxTestFormatEric Fiselier2014-08-163-16/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch does two things: CMake Update: - Add compiler flag checks for -std=c++11 and -std=c++1y and remove check for -std=c++0x. - Add configuration option LIBCXX_ENABLE_CXX1Y to prevent/allow -std=c++1y from being chosen as the std version. LIBCXX_ENABLE_CXX1Y is set to OFF by default. - if LIBCXX_ENABLE_CXX1Y is enabled then set LIBCXX_STD_VERSION to c++1y and fail if the compiler does not support -std=c++1y - If c++1y is not enabled then use c++11 and fail if the compiler does not support c++11. Lit Update: - Update lit.site.cfg.in to capture LIBCXX_STD_VERSION information as config.std. - Remove mentions of has_cxx0X configuration option. - Check for `--param std=X' passed to lit on the command line. - Choose the std for the tests either from command line parameter or (if it doesn't exist) the lit.site.cfg. Reviewers: mclow.lists, danalbert Reviewed By: danalbert Subscribers: emaste, rnk, ajwong, danalbert, cfe-commits Differential Revision: http://reviews.llvm.org/D4329 llvm-svn: 215802
* Readding FreeBSD support to lit.cfg. Patch from Pawel Worach.Eric Fiselier2014-08-151-0/+15
| | | | | | | Pawel has been using this patch on his buildbots for a while. This should allow the testsuite to run on FreeBSD with libcxxrt. llvm-svn: 215787
* Tame a few enum size tests when using -fshort-enums on ARM.Jonathan Roelofs2014-08-152-2/+2
| | | | llvm-svn: 215769
* Revert get testsuite running on FreeBSD.Eric Fiselier2014-08-151-14/+0
| | | | | | There is a similar patch up for review. I'll submit my changes via that. llvm-svn: 215750
* Get testsuite running on FreeBSD.Eric Fiselier2014-08-151-0/+14
| | | | | | | | Add initial support for using LIT to run the tests on FreeBSD. More work may need to be done to add support for FreeBSD but this is a good initial step. llvm-svn: 215742
* Fix incorrect locale requirements in testsEric Fiselier2014-08-152-2/+2
| | | | llvm-svn: 215694
* Add bare_allocator archetype that implements the minimal possible allocator ↵Eric Fiselier2014-08-151-1/+29
| | | | | | interface. llvm-svn: 215691
* Change two tests to be less dependant on locales.Eric Fiselier2014-08-122-4/+5
| | | | | | | | | | | | This patch removes the use of the "%c" specifier for getting/setting times. The semantics of this specifier differ between linux and Mac. I don't believe the use of this specifier was important to the test. The following tests now pass on linux. test/input.output/iostream.format/ext.manip/get_time.pass.cpp test/input.output/iostream.format/ext.manip/put_time.pass.cpp llvm-svn: 215417
* Add return statement to slice_array and mask_array assignment. Closes PR20614.Eric Fiselier2014-08-122-0/+28
| | | | | | | | | | This patch just adds the required return statements to slice_array::operator= and mask_array::operator=. Tests were added to check that the return value is the same as the object assigned to. llvm-svn: 215414
* fix stdio.h test to reflect removal of ::gets in c++14Eric Fiselier2014-08-101-0/+2
| | | | llvm-svn: 215329
* Revert "Add some extra checks to the MoveOnly test class to ensure it is not ↵David Blaikie2014-08-091-11/+5
| | | | | | | | | | constructed or assigned from in a moved-from state." Premature commit due to misreading CR feedback. This reverts commit r215301. llvm-svn: 215302
OpenPOWER on IntegriCloud