[libcxx-commits] [libcxx] [regex]test_CI (PR #130406)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Mar 8 01:26:47 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Austin (Zhenhang1213)
<details>
<summary>Changes</summary>
test_CI
---
Full diff: https://github.com/llvm/llvm-project/pull/130406.diff
1 Files Affected:
- (modified) libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp (+17)
``````````diff
diff --git a/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp
index 4face8ba02bbe..559a2db20ae1a 100644
--- a/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp
+++ b/libcxx/test/std/re/re.alg/re.alg.match/ecma.pass.cpp
@@ -7,6 +7,8 @@
//===----------------------------------------------------------------------===//
//
+// XFAIL: FROZEN-CXX03-HEADERS-FIXME
+
// <regex>
// template <class BidirectionalIterator, class Allocator, class charT, class traits>
@@ -669,6 +671,21 @@ int main(int, char**)
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
+ {
+ std::cmatch m;
+ const char s[] = "$_se";
+ assert(std::regex_match(s, m, std::regex("\\$\\_se")));
+ assert(m.size() == 1);
+ assert(!m.prefix().matched);
+ assert(m.prefix().first == s);
+ assert(m.prefix().second == m[0].first);
+ assert(!m.suffix().matched);
+ assert(m.suffix().first == m[0].second);
+ assert(m.suffix().second == s + std::char_traits<char>::length(s));
+ assert(m.length(0) >= 0 && static_cast<size_t>(m.length(0)) == std::char_traits<char>::length(s));
+ assert(m.position(0) == 0);
+ assert(m.str(0) == s);
+ }
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
{
``````````
</details>
https://github.com/llvm/llvm-project/pull/130406
More information about the libcxx-commits
mailing list