| 32 | } |
| 33 | |
| 34 | LexiconPtr LoadLexicon(const std::string& path) { |
| 35 | FILE* fp = OpenFile(path); |
| 36 | EXPECT_NE(fp, nullptr) << path; |
| 37 | if (fp == nullptr) { |
| 38 | return LexiconPtr(); |
| 39 | } |
| 40 | return Lexicon::ParseLexiconFromFile(fp); |
| 41 | } |
| 42 | |
| 43 | bool HasAtLeastTwoCharacters(const std::string& text) { |
| 44 | return UTF8Util::Length(text.c_str()) >= 2; |
no test coverage detected