MCPcopy Create free account
hub / github.com/WallBreaker2/op / ExpectHelloWorldDigits

Function ExpectHelloWorldDigits

tests/ocr_test.cpp:17–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17void 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
24std::string WideToUtf8(const std::wstring &text) {
25 if (text.empty())

Callers 1

TEST_FFunction · 0.85

Calls 4

NormalizeOcrLettersFunction · 0.85
ExtractDigitsFunction · 0.85
EditDistanceFunction · 0.85
findMethod · 0.80

Tested by

no test coverage detected