Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 0 additions & 136 deletions libcxx/test/std/re/re.alg/re.alg.match/awk.locale.pass.cpp

This file was deleted.

46 changes: 46 additions & 0 deletions libcxx/test/std/re/re.alg/re.alg.match/awk.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,29 @@ int main(int, char**)
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
{
std::cmatch m;
const char s[] = "m";
assert(std::regex_match(s, m,
std::regex("[a[=m=]z]", std::regex_constants::awk)));
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 == m[0].second);
assert((std::size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
{
std::cmatch m;
const char s[] = "m";
assert(!std::regex_match(s, m,
std::regex("[a[=M=]z]", std::regex_constants::awk)));
assert(m.size() == 0);
}
{
std::cmatch m;
const char s[] = "-";
Expand Down Expand Up @@ -1215,6 +1238,29 @@ int main(int, char**)
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
{
std::wcmatch m;
const wchar_t s[] = L"m";
assert(std::regex_match(s, m, std::wregex(L"[a[=m=]z]",
std::regex_constants::awk)));
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 == m[0].second);
assert((std::size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
{
std::wcmatch m;
const wchar_t s[] = L"m";
assert(!std::regex_match(s, m, std::wregex(L"[a[=M=]z]",
std::regex_constants::awk)));
assert(m.size() == 0);
}
{
std::wcmatch m;
const wchar_t s[] = L"-";
Expand Down
125 changes: 0 additions & 125 deletions libcxx/test/std/re/re.alg/re.alg.match/basic.locale.pass.cpp

This file was deleted.

46 changes: 46 additions & 0 deletions libcxx/test/std/re/re.alg/re.alg.match/basic.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,29 @@ int main(int, char**)
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
{
std::cmatch m;
const char s[] = "m";
assert(std::regex_match(s, m, std::regex("[a[=m=]z]",
std::regex_constants::basic)));
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 == m[0].second);
assert(m.length(0) >= 0 && static_cast<std::size_t>(m.length(0)) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
{
std::cmatch m;
const char s[] = "m";
assert(!std::regex_match(s, m, std::regex("[a[=M=]z]",
std::regex_constants::basic)));
assert(m.size() == 0);
}
{
std::cmatch m;
const char s[] = "-";
Expand Down Expand Up @@ -1203,6 +1226,29 @@ int main(int, char**)
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
{
std::wcmatch m;
const wchar_t s[] = L"m";
assert(std::regex_match(s, m, std::wregex(L"[a[=m=]z]",
std::regex_constants::basic)));
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 == m[0].second);
assert(m.length(0) >= 0 && static_cast<std::size_t>(m.length(0)) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
{
std::wcmatch m;
const wchar_t s[] = L"m";
assert(!std::regex_match(s, m, std::wregex(L"[a[=M=]z]",
std::regex_constants::basic)));
assert(m.size() == 0);
}
{
std::wcmatch m;
const wchar_t s[] = L"-";
Expand Down
Loading
Loading