mirror of
https://github.com/fumiama/NanoBot.git
synced 2026-06-10 13:10:26 +08:00
add helper.UnderlineToCamel
This commit is contained in:
22
helper_test.go
Normal file
22
helper_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package nano
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestUnderlineToCamel(t *testing.T) {
|
||||
x := UnderlineToCamel("GUILD_CREATE")
|
||||
if x != "GuildCreate" {
|
||||
t.Fatal("expected GuildCreate but got", x)
|
||||
}
|
||||
x = UnderlineToCamel("GUILD_MEMBER_UPDATE")
|
||||
if x != "GuildMemberUpdate" {
|
||||
t.Fatal("expected GuildMemberUpdate but got", x)
|
||||
}
|
||||
x = UnderlineToCamel("OPEN_FORUM_THREAD_CREATE")
|
||||
if x != "OpenForumThreadCreate" {
|
||||
t.Fatal("expected OpenForumThreadCreate but got", x)
|
||||
}
|
||||
x = UnderlineToCamel("AUDIO_OR_LIVE_CHANNEL_MEMBER_ENTER")
|
||||
if x != "AudioOrLiveChannelMemberEnter" {
|
||||
t.Fatal("expected AudioOrLiveChannelMemberEnter but got", x)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user