Lines Matching defs:cc
86 static void Broke(const char *desc, const CCTest* t, CharClass* cc) {
104 for (typename CharClass::iterator it = cc->begin(); it != cc->end(); ++it)
118 CharClass* Negate(CharClass *cc) {
119 return cc->Negate();
122 void Delete(CharClass* cc) {
123 cc->Delete();
126 CharClassBuilder* Negate(CharClassBuilder* cc) {
127 CharClassBuilder* ncc = cc->Copy();
132 void Delete(CharClassBuilder* cc) {
133 delete cc;
137 bool CorrectCC(CharClass *cc, CCTest *t, const char *desc) {
138 typename CharClass::iterator it = cc->begin();
141 if (it == cc->end() ||
144 Broke(desc, t, cc);
149 if (it != cc->end()) {
150 Broke(desc, t, cc);
153 if (cc->size() != size) {
154 Broke(desc, t, cc);
155 printf("wrong size: want %d have %d\n", size, cc->size());
162 if (ShouldContain(t, j) != cc->Contains(j)) {
163 Broke(desc, t, cc);
165 j, ShouldContain(t, j), cc->Contains(j));
170 CharClass* ncc = Negate(cc);
175 Broke(desc, t, cc);
182 if (ncc->size() != Runemax+1 - cc->size()) {
183 Broke(desc, t, cc);
186 Runemax+1 - cc->size(), ncc->size());
206 CharClass* cc = ccb.GetCharClass();
207 if (!CorrectCC(cc, t, "before copy (CharClass)"))
209 cc->Delete();
214 cc = ccb.GetCharClass();
215 if (!CorrectCC(cc, t, "after copy (CharClass)"))
217 cc->Delete();