12 #include "util/test.h"
14 #include "re2/testing/exhaustive_tester.h"
19 TEST(CharacterClasses, Exhaustive) {
20 std::vector<std::string> atoms =
Split(
" ",
21 "[a] [b] [ab] [^bc] [b-d] [^b-d] []a] [-a] [a-] [^-a] [a-b-c] a b .");
27 TEST(CharacterClasses, ExhaustiveAB) {
28 std::vector<std::string> atoms =
Split(
" ",
29 "[a] [b] [ab] [^bc] [b-d] [^b-d] []a] [-a] [a-] [^-a] [a-b-c] a b .");
46 static std::vector<std::string>
v;
53 for (
int i = 1;
i < 256;
i++)
58 for (
int j = 0; j < 8; j++)
59 v.push_back(
UTF8(256 + j));
61 for (
int j = -8; j < 8; j++)
65 for (
int j = -8; j <= 0; j++)
73 std::vector<std::string> atoms =
Split(
" ",
74 ". ^ $ \\a \\f \\n \\r \\t \\v \\d \\D \\s \\S \\w \\W \\b \\B "
75 "[[:alnum:]] [[:alpha:]] [[:blank:]] [[:cntrl:]] [[:digit:]] "
76 "[[:graph:]] [[:lower:]] [[:print:]] [[:punct:]] [[:space:]] "
77 "[[:upper:]] [[:xdigit:]] [\\s\\S] [\\d\\D] [^\\w\\W] [^\\d\\D]");
78 std::vector<std::string>
ops;
86 std::vector<std::string> atoms =
Split(
" ",
87 ". ^ $ \\a \\f \\n \\r \\t \\v \\d \\D \\s \\S \\w \\W \\b \\B "
88 "[[:alnum:]] [[:alpha:]] [[:blank:]] [[:cntrl:]] [[:digit:]] "
89 "[[:graph:]] [[:lower:]] [[:print:]] [[:punct:]] [[:space:]] "
90 "[[:upper:]] [[:xdigit:]] [\\s\\S] [\\d\\D] [^\\w\\W] [^\\d\\D]");
91 std::vector<std::string>
ops;
93 for (
size_t i = 0;
i < alpha.size();
i++)
94 alpha[i] =
"a" + alpha[i] +
"b";
96 1, alpha,
"a%sb",
"");