| 15 | } |
| 16 | |
| 17 | void ExpectHelloWorldDigits(const std::wstring &text) { |
| 18 | const std::wstring normalized_letters = test_support::NormalizeOcrLetters(text); |
| 19 | const std::wstring digits = test_support::ExtractDigits(text); |
| 20 | EXPECT_LE(test_support::EditDistance(normalized_letters, L"helloworld"), 3u) << "normalized letters differ too much"; |
| 21 | EXPECT_NE(digits.find(L"12345"), wstring::npos) << "missing digit anchor 12345"; |
| 22 | } |
| 23 | |
| 24 | std::string WideToUtf8(const std::wstring &text) { |
| 25 | if (text.empty()) |
no test coverage detected