From 84406ed1d44d0d1668e19686d0cb19e91fda572a Mon Sep 17 00:00:00 2001 From: bab2min Date: Sun, 19 May 2024 18:12:58 +0900 Subject: [PATCH] Update test case for `emoji` --- test/test_cpp.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/test_cpp.cpp b/test/test_cpp.cpp index 86977fe1..c3d85940 100644 --- a/test/test_cpp.cpp +++ b/test/test_cpp.cpp @@ -163,10 +163,17 @@ TEST(KiwiCpp, OldHangul) TEST(KiwiCpp, ChineseVsEmoji) { Kiwi& kiwi = reuseKiwiInstance(); - auto res = kiwi.analyze(u"韓𠀀𠀁𠀂𠀃🔥🤔🐶", Match::allWithNormalizing).first; + auto res = kiwi.analyze(u"韓𠀀𠀁𠀂𠀃🔥🤔🐶", Match::allWithNormalizing & ~Match::emoji).first; EXPECT_EQ(res.size(), 2); EXPECT_EQ(res[0].tag, POSTag::sh); EXPECT_EQ(res[1].tag, POSTag::sw); + + res = kiwi.analyze(u"韓𠀀𠀁𠀂𠀃🔥🤔🐶", Match::allWithNormalizing).first; + EXPECT_EQ(res.size(), 4); + EXPECT_EQ(res[0].tag, POSTag::sh); + EXPECT_EQ(res[1].tag, POSTag::w_emoji); + EXPECT_EQ(res[2].tag, POSTag::w_emoji); + EXPECT_EQ(res[3].tag, POSTag::w_emoji); } TEST(KiwiCpp, Script)