[libcxx] r299680 - Recommit awk tests with warnings removed. Initial commit r299652, reverted r299656.
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 6 11:34:36 PDT 2017
Author: marshall
Date: Thu Apr 6 13:34:36 2017
New Revision: 299680
URL: http://llvm.org/viewvc/llvm-project?rev=299680&view=rev
Log:
Recommit awk tests with warnings removed. Initial commit r299652, reverted r299656.
Modified:
libcxx/trunk/test/std/re/re.alg/re.alg.match/awk.pass.cpp
Modified: libcxx/trunk/test/std/re/re.alg/re.alg.match/awk.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/re/re.alg/re.alg.match/awk.pass.cpp?rev=299680&r1=299679&r2=299680&view=diff
==============================================================================
--- libcxx/trunk/test/std/re/re.alg/re.alg.match/awk.pass.cpp (original)
+++ libcxx/trunk/test/std/re/re.alg/re.alg.match/awk.pass.cpp Thu Apr 6 13:34:36 2017
@@ -26,7 +26,7 @@
int main()
{
-/* {
+ {
std::cmatch m;
const char s[] = "a";
assert(std::regex_match(s, m, std::regex("a", std::regex_constants::awk)));
@@ -263,7 +263,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -278,7 +278,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -293,7 +293,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -326,7 +326,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -341,7 +341,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -356,7 +356,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -378,7 +378,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -394,7 +394,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -410,7 +410,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
assert(m.length(1) == 4);
@@ -434,7 +434,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -519,7 +519,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -542,7 +542,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -572,7 +572,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -588,7 +588,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -604,7 +604,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -616,24 +616,23 @@ int main()
assert(m.size() == 0);
}
std::locale::global(std::locale(LOCALE_cs_CZ_ISO8859_2));
-*/ {
- /*
+ {
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(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(m.length(0) == std::char_traits<char>::length(s));
+ assert((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[] = "Ch";
assert(std::regex_match(s, m, std::regex("[a[.ch.]z]",
@@ -645,7 +644,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -688,7 +687,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == 4);
+ assert((size_t)m.length(0) == 4);
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -704,7 +703,7 @@ int main()
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) == std::char_traits<char>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<char>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -720,7 +719,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == s+1);
- assert(m.length(0) == 1);
+ assert((size_t)m.length(0) == 1);
assert(m.position(0) == 0);
assert(m.str(0) == L"a");
}
@@ -735,7 +734,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == s+2);
- assert(m.length(0) == 2);
+ assert((size_t)m.length(0) == 2);
assert(m.position(0) == 0);
assert(m.str(0) == L"ab");
}
@@ -945,7 +944,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -960,7 +959,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -975,7 +974,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1008,7 +1007,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1023,7 +1022,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1038,7 +1037,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1060,7 +1059,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1076,7 +1075,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1092,7 +1091,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
assert(m.length(1) == 4);
@@ -1116,7 +1115,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1201,7 +1200,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1224,7 +1223,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1254,7 +1253,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1270,7 +1269,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1286,7 +1285,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1310,7 +1309,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1326,7 +1325,7 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == m[0].second);
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
@@ -1385,8 +1384,8 @@ int main()
assert(!m.suffix().matched);
assert(m.suffix().first == m[0].second);
assert(m.suffix().second == s + std::char_traits<wchar_t>::length(s));
- assert(m.length(0) == std::char_traits<wchar_t>::length(s));
+ assert((size_t)m.length(0) == std::char_traits<wchar_t>::length(s));
assert(m.position(0) == 0);
assert(m.str(0) == s);
}
-*/}
+}
More information about the cfe-commits
mailing list