18using namespace rapidjson::internal;
29TEST(Regex, Concatenation) {
42 Regex re(
"abab|abbb");
91 Regex re(
"(a|b)(c|d)");
263 Regex re(
"a(bc){3}d");
274 Regex re(
"a(b|c){3}d");
299 Regex re(
"a(bc){3,}d");
310 Regex re(
"a(b|c){3,}d");
322TEST(Regex, QuantifierMinMax1) {
323 Regex re(
"ab{3,5}c");
335TEST(Regex, QuantifierMinMax2) {
336 Regex re(
"a(bc){3,5}d");
348TEST(Regex, QuantifierMinMax3) {
349 Regex re(
"a(b|c){3,5}d");
366TEST(Regex, QuantifierMinMax4) {
367 Regex re(
"a(b|c){0,3}d");
385TEST(Regex, QuantifierMinMax5) {
386 Regex re(
"a(b|c){0,}d");
404#define EURO "\xE2\x82\xAC"
407 Regex re(
"a" EURO "+b");
511 Regex re(
"[a-zA-Z0-9]*");
537TEST(Regex, Search_BeginAnchor) {
567TEST(Regex, Search_BothAnchor) {
580 const char*
s =
"\\^\\$\\|\\(\\)\\?\\*\\+\\.\\[\\]\\{\\}\\\\\\f\\n\\r\\t\\v[\\b][\\[][\\]]";
584 EXPECT_TRUE(rs.Match(
"^$|()?*+.[]{}\\\x0C\n\r\t\x0B\b[]"));
589#define TEST_INVALID(s) \
592 EXPECT_FALSE(re.IsValid());\
630 Regex re(
"^[0-9]+(\\\\.[0-9]+){0,2}");
635 Regex re(
"[0-9]{99999}");
#define EXPECT_TRUE(condition)
#define TEST(test_case_name, test_name)
#define ASSERT_TRUE(condition)
#define EXPECT_FALSE(condition)