The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
woop/p2p/group_test.go

22 lines
447 B

package p2p
import "testing"
func TestGroupID_String(t *testing.T) {
tests := []struct {
name string
id GroupID
want string
}{
{"empty", GroupID(""), ""},
{"ABC", GroupID("ABC"), "414243"},
{"binary", GroupID([]byte{1, 2, 3}), "010203"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := tt.id.String(); got != tt.want {
t.Errorf("GroupID.String() = %v, want %v", got, tt.want)
}
})
}
}