| 87 | |
| 88 | template <typename CharClass> |
| 89 | static void Broke(const char *desc, const CCTest* t, CharClass* cc) { |
| 90 | if (t == NULL) { |
| 91 | printf("\t%s:", desc); |
| 92 | } else { |
| 93 | printf("\n"); |
| 94 | printf("CharClass added: [%s]", desc); |
| 95 | for (int k = 0; t->add[k].lo >= 0; k++) |
| 96 | printf(" %d-%d", t->add[k].lo, t->add[k].hi); |
| 97 | printf("\n"); |
| 98 | if (t->remove >= 0) |
| 99 | printf("Removed > %d\n", t->remove); |
| 100 | printf("\twant:"); |
| 101 | for (int k = 0; t->final[k].lo >= 0; k++) |
| 102 | printf(" %d-%d", t->final[k].lo, t->final[k].hi); |
| 103 | printf("\n"); |
| 104 | printf("\thave:"); |
| 105 | } |
| 106 | |
| 107 | for (typename CharClass::iterator it = cc->begin(); it != cc->end(); ++it) |
| 108 | printf(" %d-%d", it->lo, it->hi); |
| 109 | printf("\n"); |
| 110 | } |
| 111 | |
| 112 | bool ShouldContain(CCTest *t, int x) { |
| 113 | for (int j = 0; t->final[j].lo >= 0; j++) |