Add td::remove_emoji_selectors test.

This commit is contained in:
levlam 2022-05-12 19:18:14 +03:00
parent 805e4d4a25
commit e4bff687cf

View File

@ -92,3 +92,34 @@ TEST(Emoji, remove_emoji_modifiers) {
test_remove_emoji_modifiers("πŸŽ„", "πŸŽ„"); test_remove_emoji_modifiers("πŸŽ„", "πŸŽ„");
test_remove_emoji_modifiers("πŸ§‘β€πŸŽ„", "πŸ§‘β€πŸŽ„"); test_remove_emoji_modifiers("πŸ§‘β€πŸŽ„", "πŸ§‘β€πŸŽ„");
} }
static void test_remove_emoji_selectors(td::string emoji, const td::string &result) {
ASSERT_STREQ(result, td::remove_emoji_selectors(result));
ASSERT_STREQ(result, td::remove_emoji_selectors(emoji));
}
TEST(Emoji, remove_emoji_selectors) {
test_remove_emoji_selectors("", "");
test_remove_emoji_selectors("πŸ‘©πŸΌβ€β€β€πŸ’‹β€πŸ‘©πŸ»", "πŸ‘©πŸΌβ€β€β€πŸ’‹β€πŸ‘©πŸ»");
test_remove_emoji_selectors("πŸ‘©πŸΌβ€β€οΈβ€πŸ’‹β€πŸ‘©πŸ»", "πŸ‘©πŸΌβ€β€β€πŸ’‹β€πŸ‘©πŸ»");
test_remove_emoji_selectors("πŸ‘‹πŸ»", "πŸ‘‹πŸ»");
test_remove_emoji_selectors("πŸ‘‹πŸΌ", "πŸ‘‹πŸΌ");
test_remove_emoji_selectors("πŸ‘‹πŸ½", "πŸ‘‹πŸ½");
test_remove_emoji_selectors("πŸ‘‹πŸΎ", "πŸ‘‹πŸΎ");
test_remove_emoji_selectors("πŸ‘‹πŸΏ", "πŸ‘‹πŸΏ");
test_remove_emoji_selectors("🏻", "🏻");
test_remove_emoji_selectors("🏼", "🏼");
test_remove_emoji_selectors("🏽", "🏽");
test_remove_emoji_selectors("🏾", "🏾");
test_remove_emoji_selectors("🏿", "🏿");
test_remove_emoji_selectors("⌚", "⌚");
test_remove_emoji_selectors("↔", "↔");
test_remove_emoji_selectors("πŸͺ—", "πŸͺ—");
test_remove_emoji_selectors("2️⃣", "2⃣");
test_remove_emoji_selectors("2⃣", "2⃣");
test_remove_emoji_selectors("❀️", "❀");
test_remove_emoji_selectors("❀", "❀");
test_remove_emoji_selectors("⌚", "⌚");
test_remove_emoji_selectors("πŸŽ„", "πŸŽ„");
test_remove_emoji_selectors("πŸ§‘β€πŸŽ„", "πŸ§‘β€πŸŽ„");
}