Skip to content
Snippets Groups Projects
Commit 78add3b2 authored by Benjamin Wenger's avatar Benjamin Wenger
Browse files

added tests for messageTypes.go

parent 791dd6bf
No related branches found
No related tags found
5 merge requests!510Release,!419rewrote the health tracker to both consider if there are waiting rounds and...,!371[Channel RSAtoPrivate] Implement Reverse Asymmetric in Client/Broadcast,!354Channels impl,!340Project/channels
package channels
import "testing"
func TestMessageType_String(t *testing.T) {
expected := []string{"Text", "AdminText", "Reaction", "Unknown messageType 4",
"Unknown messageType 5", "Unknown messageType 6", "Unknown messageType 7",
"Unknown messageType 8", "Unknown messageType 9",
"Unknown messageType 10"}
for i := 1; i <= 10; i++ {
mt := MessageType(i)
if mt.String() != expected[i-1] {
t.Errorf("Stringer failed on test %d, %s vs %s", i,
mt.String(), expected[i-1])
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment