summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/localization
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix C++03 buildEric Fiselier2016-06-261-0/+4
| | | | llvm-svn: 273832
* Fix PR28079 - std::wstring_convert move constructor broken.Eric Fiselier2016-06-261-0/+27
| | | | | | | | | | | | | The move constructor for wstring_convert accidentally copied the state member into the converted count member in the move constructor. This patch fixes the typo. While working on this I discovered that wstring_convert doesn't actually provide a move constructor according to the standard and therefore this constructor is a libc++ extension. I'll look further into whether libc++ should provide this constructor at all. Neither libstdc++ or MSVC's STL provide it. llvm-svn: 273831
* Use L"cat" L"dog" when concatenating string literals. Patch from ↵Eric Fiselier2016-06-261-8/+8
| | | | | | STL@microsoft.com llvm-svn: 273821
* Make locale constructors tests use count_new.hppEric Fiselier2016-06-228-129/+18
| | | | llvm-svn: 273375
* Move remaining _LIBCPP_VERSION tests into test/libcxxEric Fiselier2016-06-223-60/+0
| | | | llvm-svn: 273367
* Use static_assert instead of runtime assert in std::money_base tests.Eric Fiselier2016-06-221-7/+7
| | | | llvm-svn: 273360
* Remove locale tests that depend on LC_ALL. These are non-portable.Eric Fiselier2016-06-222-32/+0
| | | | llvm-svn: 273359
* Implement LWG issue 1169. num_get not fully compatible with strto*Eric Fiselier2016-06-193-0/+75
| | | | | | | | | | | Use strtof and strtod for floats and doubles respectively instead of always using strtold. The other parts of the change are already implemented in libc++. This patch also has a drive by fix to wbuffer_convert::underflow() which prevents it from calling memmove(buff, null, 0). llvm-svn: 273106
* Remove trailing whitespace in test suite. Approved by Marshall Clow.Eric Fiselier2016-06-014-9/+9
| | | | llvm-svn: 271435
* Void cast runtime-unused variables. Patch from STL@microsoft.comEric Fiselier2016-05-022-2/+2
| | | | llvm-svn: 268284
* Fix or move various non-standard tests.Eric Fiselier2016-04-295-221/+24
| | | | | | | | | | | | This patch does the following: * Remove <__config> includes from some container tests. * Guards uses of std::launch::any in async tests because it's an extension. * Move "test/std/extensions" to "test/libcxx/extensions" * Moves various non-standard tests including those in "sequences/vector", "std/localization" and "utilities/meta". llvm-svn: 267981
* [libcxx] Remove localization tests for Russian month namesJonas Hahnfeld2016-03-152-34/+0
| | | | | | | | | | | | | | Commit f49839299a085505eb673544744b61d2d9cdd1db in glibc-2.14 changed the locales to the currently required format. However, they were again changed in commit 55bdd2866f23b28422d969060b3518909a12b100 which has been released in 2.17. That leads to the current situation where Debian and e.g. CentOS 6 have the pre-2.14 locales, for example Ubuntu 14.04 has pre-2.17 and CentOS 7 on the other hand has the newest locales in glibc-2.17. Differential Revision: http://reviews.llvm.org/D18187 llvm-svn: 263554
* [libcxx] Additional 'REQUIRE' directives for tests that require en_US.UTF-8.Daniel Sanders2016-01-277-0/+14
| | | | | | | | | | | | | | Summary: These are the tests that didn't fail in the release candidate because they were covered by another 'REQUIRES' directive. Reviewers: mclow.lists, hans, bcraig, EricWF Subscribers: EricWF, dim, cfe-commits Differential Revision: http://reviews.llvm.org/D16408 llvm-svn: 258920
* [libcxx] Add appropriate 'REQUIRE' directives to tests that require en_US.UTF-8.Daniel Sanders2016-01-219-1/+18
| | | | | | | | | | Reviewers: mclow.lists, hans Subscribers: bcraig, cfe-commits Differential Revision: http://reviews.llvm.org/D16406 llvm-svn: 258403
* Mark slow ASAN/MSAN tests as XFAIL for now.Eric Fiselier2016-01-192-0/+6
| | | | llvm-svn: 258195
* Add a bunch of missing includes in the test suite to make it more portable. ↵Marshall Clow2016-01-121-0/+1
| | | | | | Fixes bugs #26120 and #26121. Thanks to Jonathan Wakely for the reports and the patches. llvm-svn: 257474
* [libcxx] Set LC_ALL rather than LC_COLLATE to override collation.Ahmed Bougacha2016-01-071-1/+1
| | | | | | | r251131 replaced LANG with LC_COLLATE. But LC_ALL has precedence over both, so the test still fails when LC_ALL=C. llvm-svn: 257018
* [libcxx] Fixup a few fumbles in the initial no-exceptions XFAILs list.Asiri Rathnayake2015-11-122-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The initial buildbot run found a few missing bits in the initial XFAIL list for the no-exceptions libc++ variant. These discrepancies are as follows: [1] Following two tests need XFAILs on the no-exceptions library variant. My local runs had these two disabled for other reasons (unsupported): - localization/locales/locale/locale.cons/char_pointer.pass.cpp - numerics/complex.number/complex.ops/complex_divide_complex.pass.cpp [2] These three does not need XFAILs, they were failing on my local runs for other reasons: - depr/depr.c.headers/uchar_h.pass.cpp - input.output/iostreams.base/ios/basic.ios.members/copyfmt.pass.cpp - .../category.collate/locale.collate.byname/transform.pass.cpp (these are failing on my box for the default build as well) The current patch fixes both the cases above. Additionally, I've run the following scan to make sure I've covered all the cases: > grep ' catch \| try \| throw ' -R . | perl -pe 's|(.*?):.*|\1|' | sort | \ uniq > 1.txt > grep 'libcpp-no-exceptions' -R . | perl -pe 's|(.*?):.*|\1|' | sort | \ uniq > 2.txt > diff 1.txt 2.txt This showed up a few extra interesting cases: [3] These two tests do not use try/catch/throw statements, but they fail at runtime. Need to be investigated, I've left the XFAILs in. - std/thread/futures/futures.shared_future/dtor.pass.cpp - std/thread/futures/futures.unique_future/dtor.pass.cpp [4] These tests use a macro named TEST_HAS_NO_EXCEPTIONS to conditionally exclude try/catch/throw statements when running without exceptions. I'm not entirely sure why this was needed (AFAIK, we didn't have a no-exceptions library build before). The macro's defintion is quite similar to that of _LIBCPP_NO_EXCEPTIONS. I will investigate if this can be reused for my test fixes or if it should be replaced with _LIBCPP_NO_EXCEPTIONS. - std/experimental/any/* Change-Id: I9ad1e0edd78f305406eaa0ab148b1ab693f7e26a llvm-svn: 252870
* Make it possible to build a no-exceptions variant of libcxx.Asiri Rathnayake2015-11-104-0/+4
| | | | | | | | | | | | Fixes a small omission in libcxx that prevents libcxx being built when -DLIBCXX_ENABLE_EXCEPTIONS=0 is specified. This patch adds XFAILS to all those tests that are currently failing on the new -fno-exceptions library variant. Follow-up patches will update the tests (progressively) to cope with the new library variant. Change-Id: I4b801bd8d8e4fe7193df9e55f39f1f393a8ba81a llvm-svn: 252598
* Set LC_COLLATE rather than LANG to override collation.Tim Northover2015-10-231-1/+1
| | | | | | | On a system with LC_COLLATE=C, this takes precedence over a non-C LANG the test tries to impose and the test fails. llvm-svn: 251131
* Change initialization of mbstate_t objects in tests from '= {0}' to '= {}', ↵Marshall Clow2015-09-1517-19/+19
| | | | | | which does the same thing, w/o having clang and gcc warn with -Wall. llvm-svn: 247695
* Remove XFAIL in test. The bug causing it has been fixed.Eric Fiselier2015-08-261-5/+0
| | | | llvm-svn: 246022
* Mark test as XFAIL with MSAN until D12311 gets committedEric Fiselier2015-08-251-0/+5
| | | | llvm-svn: 245922
* Fix a typo: abreviated -> abbreviated - Patch from Kai ZhaoEric Fiselier2015-08-202-2/+2
| | | | llvm-svn: 245538
* Make support for thread-unsafe C functions optional.Ed Schouten2015-06-241-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | One of the aspects of CloudABI is that it aims to help you write code that is thread-safe out of the box. This is very important if you want to write libraries that are easy to reuse. For CloudABI we decided to not provide the thread-unsafe functions. So far this is working out pretty well, as thread-unsafety issues are detected really early on. The following patch adds a knob to libc++, _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS, that can be set to disable thread-unsafe functions that can easily be avoided in practice. The following functions are not thread-safe: - <clocale>: locale handles should be preferred over setlocale(). - <cstdlib>: mbrlen(), mbrtowc() and wcrtomb() should be preferred over their non-restartable counterparts. - <ctime>: asctime(), ctime(), gmtime() and localtime() are not thread-safe. The first two are also deprecated by POSIX. Differential Revision: http://reviews.llvm.org/D8703 Reviewed by: marshall llvm-svn: 240527
* Don't let time_put test use implementation dependent constructs.Ed Schouten2015-03-261-49/+11
| | | | | | | | | | | | | | | | | | | | | | | | | The time_put test doesn't seem to work on Linux and CloudABI. For Linux we already have an XFAIL. Closer inspection seems to reveal that this test does not pass for a couple of reasons. First of all, the tm_yday field is set to an invalid value. The strftime() function doesn't behave consistently across platforms in case the values in the tm structure are incoherent. Fix up this field to have the value 121, which corresponds with tm_mday, tm_mon and tm_year. This of course affects the output of time_put for some modifiers, so update the tests accordingly. Second, some of the tests actually use modifiers that are only present on BSD derived systems. They are not part of the C standard/POSIX. Simply remove them. Finally, some of the tests actually use invalid modifiers, causing a malformed format string to be passed to strftime(). Remove these tests as well. Differential Revision: http://reviews.llvm.org/D8349 llvm-svn: 233262
* Add option to disable access to the global filesystem namespace.Ed Schouten2015-03-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Systems like FreeBSD's Capsicum and Nuxi CloudABI apply the concept of capability-based security on the way processes can interact with the filesystem API. It is no longer possible to interact with the VFS through calls like open(), unlink(), rename(), etc. Instead, processes are only allowed to interact with files and directories to which they have been granted access. The *at() functions can be used for this purpose. This change adds a new config switch called _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE. If set, all functionality that requires the global filesystem namespace will be disabled. More concretely: - fstream's open() function will be removed. - cstdio will no longer pull in fopen(), rename(), etc. - The test suite's get_temp_file_name() will be removed. This will cause all tests that use the global filesystem namespace to break, but will at least make all the other tests run (as get_temp_file_name will not build anyway). It is important to mention that this change will make fstream rather useless on those systems for now. Still, I'd rather not have fstream disabled entirely, as it is of course possible to come up with an extension for fstream that would allow access to local filesystem namespaces (e.g., by adding an openat() member function). Differential revision: http://reviews.llvm.org/D8194 Reviewed by: jroelofs (thanks!) llvm-svn: 232049
* Fix ctype_byname<wchar_t>::do_is() mask checking.... againJonathan Roelofs2015-03-111-0/+53
| | | | | | | | | This basically reverts the revert in r216508, and fixes a few more cases while I'm at it. Reading my commit message on that commit again, I think it's bupkis. http://reviews.llvm.org/D8237 llvm-svn: 231940
* Use generic feature name for sanitizers that replace new and deleteEric Fiselier2015-03-108-8/+8
| | | | llvm-svn: 231841
* Add better tests for ctype<char>::classic_tableMarshall Clow2015-03-031-0/+36
| | | | llvm-svn: 231077
* Rename system_lib -> system_cxx_lib. NFCJonathan Roelofs2015-01-148-16/+16
| | | | llvm-svn: 226061
* [libcxx] Consolidate new/delete replacement in tests and disable it when ↵Eric Fiselier2014-12-226-135/+38
| | | | | | | | | | | | | | | | | | | | using sanitizers. Summary: MSAN and ASAN also replace new/delete which leads to a link error in these tests. Currently they are unsupported but I think it would be useful if these tests could run with sanitizers. This patch creates a support header that consolidates the new/delete replacement functionality and checking. When we are using sanitizers new and delete are no longer replaced and the checks always return true. Reviewers: mclow.lists, danalbert, jroelofs, EricWF Reviewed By: EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6562 llvm-svn: 224741
* Move test into test/std subdirectory.Eric Fiselier2014-12-20311-0/+73434
llvm-svn: 224658
OpenPOWER on IntegriCloud