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

Function TEST_F

src/LexiconAnnotationTest.cpp:34–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32};
33
34TEST_F(LexiconAnnotationTest, ParseCommentLines) {
35 FILE* fp = fopen(testFileName.c_str(), "w");
36 fprintf(fp, "# This is a header comment\n");
37 fprintf(fp, "# Line 2 of header\n");
38 fprintf(fp, "\n");
39 fprintf(fp, "A\tB\n");
40 fprintf(fp, "C\tD\n");
41 fclose(fp);
42
43 FILE* readFp = fopen(testFileName.c_str(), "r");
44 const TextDictPtr& dict = TextDict::NewFromFile(readFp);
45 fclose(readFp);
46 EXPECT_EQ(dict->GetLexicon()->Length(), 2);
47}
48
49TEST_F(LexiconAnnotationTest, ParseAttachedComment) {
50 FILE* fp = fopen(testFileName.c_str(), "w");

Callers

nothing calls this directly

Calls 9

NewFromFileFunction · 0.85
removeFunction · 0.85
LengthMethod · 0.45
GetLexiconMethod · 0.45
SerializeToFileMethod · 0.45
emptyMethod · 0.45
pop_backMethod · 0.45
push_backMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected