1
0
mirror of https://github.com/fumiama/emozi.git synced 2026-06-24 05:17:49 +08:00
This commit is contained in:
源文雨
2024-02-14 18:39:07 +09:00
parent 9463d5e7b6
commit ceb7686da6
18 changed files with 1776 additions and 0 deletions

22
define_test.go Normal file
View File

@@ -0,0 +1,22 @@
package emozi
import "testing"
func TestFirstEmojiSingle(t *testing.T) {
for i, lst := range 声母 {
if len([]rune(lst[0])) != 1 {
t.Fatal("声母", i, "长度", len([]rune(lst[0])), "字", lst[0])
}
}
t.Log(string([]rune("🌫️")[0]), string([]rune("❤️")[0]), string([]rune("✌️")[0]), string([]rune("⭕️")[0]), string([]rune("☁️")[0]), string([]rune("🕸️")[0]))
for i, lst := range 韵母 {
if len([]rune(lst[0])) != 1 {
t.Fatal("韵母", i, "长度", len([]rune(lst[0])), "字", lst[0])
}
}
for i, lst := range 声调 {
if len([]rune(lst[0])) != 1 {
t.Fatal("声调", i, "长度", len([]rune(lst[0])), "字", lst[0])
}
}
}