summaryrefslogtreecommitdiffstats
path: root/libcxx/test/re
Commit message (Collapse)AuthorAgeFilesLines
* Move test into test/std subdirectory.Eric Fiselier2014-12-20157-19053/+0
| | | | llvm-svn: 224658
* Re-commit the test for regex that I busted last night - now passes under ASANMarshall Clow2014-12-161-2/+2
| | | | llvm-svn: 224342
* Comment out the breaking tests until I figure out what's going on here.Marshall Clow2014-12-161-2/+2
| | | | llvm-svn: 224301
* Fix the literal string that I said would be six elements long to actually be ↵Marshall Clow2014-12-161-2/+2
| | | | | | six elements long. Octal. Sheesh. llvm-svn: 224297
* Implement LWG 2217 - operator==(sub_match, string) slices on embedded '\0'sMarshall Clow2014-12-151-13/+17
| | | | llvm-svn: 224292
* Add more REQUIRES: LOCALE.* to tests.Dan Albert2014-11-211-0/+2
| | | | llvm-svn: 222492
* [libcxx] Remove use of uniform initialization from regex tests so that they ↵Eric Fiselier2014-10-275-38/+38
| | | | | | | | | | | | | | compile in C++03. Reviewers: danalbert, jroelofs, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5957 llvm-svn: 220707
* [libcxx] XFAIL all currently failing libc++ tests for linux.Eric Fiselier2014-10-239-0/+27
| | | | | | | | | | | | | | | | | | Summary: Pretty please? We now have a significant number of builders that test libc++. I really want those builders to be green. Most of these failures are due to differences in locale data, including those in regex. I will continue working on fixing the locale and regex tests but there is no consensus on what the correct direction to go. Since the builders display a list of XFAIL tests they are by no means hidden. It just means they are expected failures. Now unexpected failures won't get mixed in with well known and expected failures. Reviewers: mclow.lists, jroelofs, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5941 llvm-svn: 220512
* Add locales to available_features for tests.Dan Albert2014-08-0410-0/+20
| | | | | | | | | | | | | | | | | | Linux has a lot of failures caused by not having support for certain locales. Since these come out as a lot of noise in the test results, have lit.cfg detect the presence of the various locales used in the tests and add them to config.available_features as locale.LOCALE_NAME. This patch also adds REQUIRES: locale.REQUIRED_LOCALE to every test that I saw failing in this manner. We probably need to add more for all the tests requiring en_US.UTF-8, but we can do that on an as-needed basis. One thing that concerns me is how many tests get skipped because of missing locales (especially in regex/). We should make a point of splitting up any tests that test default behavior _and_ behavior under a given locale so that we aren't losing coverage for default behavior. llvm-svn: 214753
* Base regex code on char_class_type.Dan Albert2014-07-291-1/+3
| | | | | | | | | | | | __get_classname() and __bracket_expression were assuming that char_class_type was ctype_base::mask rather than using regex_traits<_CharT>::char_class_type. This change allows char_class_type to be defined to something other than ctype_base::mask so that the implementation will still work for platforms with an 8-bit ctype mask (such as Android and OpenBSD). llvm-svn: 214201
* Fix Bug 19678 - libc++ does not correctly handle the regex: '[^\0]*'Marshall Clow2014-05-211-0/+12
| | | | llvm-svn: 209307
* LWG Issue #2271: regex_traits::lookup_classname specification unclear. ↵Marshall Clow2014-03-041-6/+6
| | | | | | libc++ already does the right thing; just update the tests. llvm-svn: 202904
* Implement LWG issue 2306: match_results::reference should be value_type&, ↵Marshall Clow2014-02-261-1/+1
| | | | | | not const value_type&. This is a general move by the LWG to have the reference type of read-only containers be a non-const reference; however, there are no methods that return a non-const reference to a match_result entry, so there's no worries about getting a non-const reference to a constant object. llvm-svn: 202214
* Implement LWG Issues #2329 and #2332 - disallow iterators into temporary ↵Marshall Clow2014-02-197-0/+272
| | | | | | regexes and regexes into temporary strings llvm-svn: 201717
* Fix PR18404 - 'Bug in regex_token_iterator::operator++(int) implementation'. ↵Marshall Clow2014-01-092-9/+127
| | | | | | Enhance the tests for regex_token_iterator and regex_iterator. llvm-svn: 198878
* Found six (nmostly) identical files named 'test_allocator.h' in the libcxx ↵Marshall Clow2013-12-035-121/+4
| | | | | | test suite. Moved one to /support, made it a superset, and removed all but one of the others, and iupdated all the includes. Left the odd one (thread/futures/test_allocator.h) for later. llvm-svn: 196174
* Ok, 3 major changes for debug mode in one commit:Howard Hinnant2013-08-021-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. I had been detecting and trapping iterator == and \!= among iterators in different containers as an error. But the trapping itself is actually an error. Consider: #include <iostream> #include <vector> #include <algorithm> template <class C> void display(const C& c) { std::cout << "{"; bool first = true; for (const auto& x : c) { if (\!first) std::cout << ", "; first = false; std::cout << x; } std::cout << "}\n"; } int main() { typedef std::vector<int> V; V v1 = {1, 3, 5}; V v2 = {2, 4, 6}; display(v1); display(v2); V::iterator i = std::find(v1.begin(), v1.end(), 1); V::iterator j = std::find(v2.begin(), v2.end(), 2); if (*i == *j) i = j; // perfectly legal // ... if (i \!= j) // the only way to check v2.push_back(*i); display(v1); display(v2); } It is legal to assign an iterator from one container to another of the same type. This is required to work. One might want to test whether or not such an assignment had been made. The way one performs such a check is using the iterator's ==, \!= operator. This is a logical and necessary function and does not constitute an error. 2. I had a header circular dependence bug when _LIBCPP_DEBUG2 is defined. This caused a problem in several of the libc++ tests. Fixed. 3. There is a serious problem when _LIBCPP_DEBUG2=1 at the moment in that std::basic_string is inoperable. std::basic_string uses __wrap_iterator to implement its iterators. __wrap_iterator has been rigged up in debug mode to support vector. But string hasn't been rigged up yet. This means that one gets false positives when using std::string in debug mode. I've upped std::string's priority in www/debug_mode.html. llvm-svn: 187636
* Bill Fisher: This patch fixes a bug where std::regex in ECMAScript mode was ↵Howard Hinnant2013-07-231-0/+98
| | | | | | | | ignoring capture groups inside lookahead assertions. For example, matching /(?=(a))(a)/ to "a" should yield two captures: \1 = "a", \2 = "a" llvm-svn: 186954
* Bill Fisher: This patch fixes an ill-formed comparison when parsing control ↵Howard Hinnant2013-07-151-12/+20
| | | | | | | | escapes, e.g. "\cA\ca". The code will now throw an error_escape exception for invalid control sequences like "\c:" or "\c". I've added the test cases to bad_escape.pass.cpp. llvm-svn: 186335
* Bill Fisher: This patch fixes a less likely case where '\b' can back up into ↵Howard Hinnant2013-07-111-0/+63
| | | | | | | | invalid memory, when driven by a regex_iterator (for case 1, see r185273 or http://llvm.org/bugs/show_bug.cgi?id=16240) The attached test program also supplies a test for the case 1 fix in r185273. llvm-svn: 186089
* Bill Fisher: This patch fixes a bug where regex_iterator doesn't indicate ↵Howard Hinnant2013-07-091-0/+38
| | | | | | | | when it's restarting in the middle of a string. This bug causes /^a/ to match in the middle of the string "aaaaaaa", during iteration. My patch uses to communicate when is false. llvm-svn: 185950
* Bill Fisher: This patch fixes a bug where the regex parser doesn't advance ↵Howard Hinnant2013-07-021-0/+28
| | | | | | | | the pointer after reading the third character of an octal escape (in awk mode). That is, regex{"\141", awk} results in the regular expression /a1/ instead of just /a/. llvm-svn: 185449
* Provide missing '{' in parsing extended quoted characters. This fixes ↵Howard Hinnant2013-06-281-0/+72
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=16135 llvm-svn: 185211
* William Fisher: A bug in __lookahead::exec causes /(?=^)b/ to match ab. ↵Howard Hinnant2013-06-281-0/+28
| | | | | | When makes a recursive call to , it passes true for the value of . This causes a beginning-of-line anchor (^) inside a lookahead assertion to match anywhere in the text. This fixes http://llvm.org/bugs/show_bug.cgi?id=11118 llvm-svn: 185196
* Bill Fisher: Fix for failing to throw an exception in regex when parsing an ↵Howard Hinnant2013-06-281-0/+37
| | | | | | invalid escape sequence. This fixes http://llvm.org/bugs/show_bug.cgi?id=16023 llvm-svn: 185192
* Mark some tests with XFAIL for Lion and Mountain Lion.Howard Hinnant2013-05-071-0/+3
| | | | llvm-svn: 181336
* Add explicit casts to unsigned char before calling ctype functions.Joerg Sonnenberger2013-05-021-1/+1
| | | | | | Fixes the value range on platforms with signed char. llvm-svn: 180940
* This is a start at making the libc++ test suite friendlier to the ↵Howard Hinnant2013-03-231-1/+6
| | | | | | -fnoexceptions flag. Although this is not a complete solution, it does reduce the number of test failures on OS X from 467 to 128 on OS X when -fno-exceptions is enabled, and does not impact the number of failures at all when -fno-exceptions is not enabled. The bulk of this code was donated anonymously. llvm-svn: 177824
* Move common header files into a 'support' directory; make 'testit' include ↵Marshall Clow2013-01-0528-28/+28
| | | | | | -I to that directory; rename 'iterators.h' to 'iterator_test.h'; remove hard-coded paths to include files from more than 350 source files llvm-svn: 171594
* Removed several more different 'iterators.h' files in libcxx/testMarshall Clow2013-01-0325-551/+23
| | | | llvm-svn: 171452
* Zhang Xiongpang: Add definitions for const data members. Fixes ↵Howard Hinnant2012-12-121-0/+13
| | | | | | http://llvm.org/bugs/show_bug.cgi?id=14585. llvm-svn: 170026
* Fix <rdar://problem/10255403> match_results::begin() is off by oneHoward Hinnant2011-10-082-4/+4
| | | | llvm-svn: 141494
* Windows porting work by Ruben Van BoxemHoward Hinnant2011-10-035-13/+23
| | | | llvm-svn: 141003
* Fix test bugs found by David ChisnallHoward Hinnant2011-09-217-15/+15
| | | | llvm-svn: 140271
* Fix locales used in re tests.David Chisnall2011-09-215-13/+13
| | | | llvm-svn: 140265
* Fix failure found by David ChisnallHoward Hinnant2011-09-211-129/+129
| | | | llvm-svn: 140255
* Fixed PR10574: http://llvm.org/bugs/show_bug.cgi?id=10574Howard Hinnant2011-08-124-10/+10
| | | | llvm-svn: 137522
* N3158 Missing preconditions for default-constructed match_result objectsHoward Hinnant2010-12-082-0/+76
| | | | llvm-svn: 121282
* license changeHoward Hinnant2010-11-16141-282/+282
| | | | llvm-svn: 119395
* fixing whitespaceHoward Hinnant2010-09-2822-22/+22
| | | | llvm-svn: 114967
* Changed __config to react to all of clang's currently documented has_feature ↵Howard Hinnant2010-09-045-12/+12
| | | | | | flags, and renamed _LIBCPP_MOVE to _LIBCPP_HAS_NO_RVALUE_REFERENCES to be more consistent with the rest of the libc++'s flags, and with clang's nomenclature. llvm-svn: 113086
* Fixing whitespace problemsHoward Hinnant2010-08-2221-67/+65
| | | | llvm-svn: 111763
* [re.alg.replace]. This finishes all of <regex>. That being said, <regex> ↵Howard Hinnant2010-08-1815-9/+514
| | | | | | is exceptionally difficult to thoroughly test. If anyone has the ability to test this, combined with the interest to do so, now would be a good time. :-) llvm-svn: 111333
* [re.tokiter]Howard Hinnant2010-08-179-0/+588
| | | | llvm-svn: 111278
* [re.regiter]Howard Hinnant2010-08-166-0/+224
| | | | llvm-svn: 111178
* [re.alg.match]Howard Hinnant2010-08-148-0/+5593
| | | | llvm-svn: 111075
* Everything under [re.results]Howard Hinnant2010-08-1422-0/+1106
| | | | llvm-svn: 111074
* Everything under [re.regex]Howard Hinnant2010-08-1325-18/+429
| | | | llvm-svn: 111024
* Filling out regex tests...Howard Hinnant2010-08-1226-1/+761
| | | | llvm-svn: 110955
* Fixed some bugs in the ecma bracket epression regarding escaped characters, ↵Howard Hinnant2010-07-282-0/+1598
| | | | | | and got the awk grammar going. llvm-svn: 109599
OpenPOWER on IntegriCloud