| 74 | // x identifies the start of the second string |
| 75 | // start identifies the original start of the lhs string |
| 76 | template<class IterT> bool Compare(IterT first, IterT last, IterT x, IterT start) |
| 77 | { |
| 78 | std::pair<IterT, IterT> p = std::mismatch(first, last, x); |
| 79 | |
| 80 | if (p.first != last) |
| 81 | { |
| 82 | // success !! |
| 83 | std::cout << "*** mismatched value at: " << (int)(p.first - start) |
| 84 | << ". Values are: " << (size_t)tss::util::char_to_size(*p.first) << " and " |
| 85 | << (size_t)tss::util::char_to_size(*p.second) << std::endl; |
| 86 | |
| 87 | return Compare(p.first + 1, last, p.second + 1, start); |
| 88 | } |
| 89 | |
| 90 | return true; |
| 91 | } |
| 92 | |
| 93 | void CompareStrings(const std::string& s1, const std::string& s2) |
| 94 | { |
no test coverage detected