MCPcopy Create free account
hub / github.com/BYVoid/OpenCC / TEST_F

Function TEST_F

data/dictionary/DictionaryTest.cpp:55–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53std::unique_ptr<Runfiles> DictionaryTest::runfiles_;
54
55TEST_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
66TEST_F(DictionaryTest, BinaryTest) {
67 std::string dictionary = OPENCC_DICTIONARY_TEST_FILE;

Callers

nothing calls this directly

Calls 8

NewFromFileFunction · 0.85
IsUniqueMethod · 0.80
IsSortedMethod · 0.80
OpenFileFunction · 0.70
sizeMethod · 0.45
substrMethod · 0.45
LengthMethod · 0.45
GetLexiconMethod · 0.45

Tested by

no test coverage detected