| 53 | std::unique_ptr<Runfiles> DictionaryTest::runfiles_; |
| 54 | |
| 55 | TEST_F(DictionaryTest, UniqueSortedTest) { |
| 56 | const std::string dictionary = OPENCC_DICTIONARY_TEST_FILE; |
| 57 | const std::string dictionaryFileName = |
| 58 | runfiles_->Rlocation("_main/data/dictionary/" + dictionary); |
| 59 | FILE* fp = OpenFile(dictionaryFileName); |
| 60 | ASSERT_NE(fp, nullptr); |
| 61 | LexiconPtr lexicon = Lexicon::ParseLexiconFromFile(fp); |
| 62 | EXPECT_TRUE(lexicon->IsUnique()) << dictionary << " has duplicated keys."; |
| 63 | EXPECT_TRUE(lexicon->IsSorted()) << dictionary << " is not sorted."; |
| 64 | } |
| 65 | |
| 66 | TEST_F(DictionaryTest, BinaryTest) { |
| 67 | std::string dictionary = OPENCC_DICTIONARY_TEST_FILE; |
nothing calls this directly
no test coverage detected