TEST_F(DictGroupTest, SimpleGroupTest) { const DictGroupPtr& dictGroup = CreateDictGroupForConversion(); const auto& entry = dictGroup->Dict::MatchPrefix(utf8("Unknown")); EXPECT_TRUE(entry.IsNull()); const auto& matches = dictGroup->Dict::MatchAllPrefixes(utf8("干燥")); EXPECT_EQ(2, matches.size()); EXPECT_EQ(utf8("乾燥"), matches.at(0)->GetDefault()); EXPECT_EQ(utf8("幹"), matches.at(1)->GetDefault()); }
virtual void SetUp() { dict = CreateDictGroupForConversion(); conversion = ConversionPtr(new Conversion(dict)); }