mirror of
https://github.com/fumiama/emozi.git
synced 2026-06-24 05:17:49 +08:00
init
This commit is contained in:
22
define_test.go
Normal file
22
define_test.go
Normal 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])
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user