chore: trivial test fix

This commit is contained in:
Toby 2023-07-24 20:43:40 -07:00
parent 27460960ab
commit e48bb98024

View File

@ -9,7 +9,7 @@ import (
func TestFragUDPMessage(t *testing.T) { func TestFragUDPMessage(t *testing.T) {
type args struct { type args struct {
m protocol.UDPMessage m *protocol.UDPMessage
maxSize int maxSize int
} }
tests := []struct { tests := []struct {
@ -20,7 +20,7 @@ func TestFragUDPMessage(t *testing.T) {
{ {
"no frag", "no frag",
args{ args{
protocol.UDPMessage{ &protocol.UDPMessage{
SessionID: 123, SessionID: 123,
PacketID: 123, PacketID: 123,
FragID: 0, FragID: 0,
@ -44,7 +44,7 @@ func TestFragUDPMessage(t *testing.T) {
{ {
"2 frags", "2 frags",
args{ args{
protocol.UDPMessage{ &protocol.UDPMessage{
SessionID: 123, SessionID: 123,
PacketID: 123, PacketID: 123,
FragID: 0, FragID: 0,
@ -76,7 +76,7 @@ func TestFragUDPMessage(t *testing.T) {
{ {
"4 frags", "4 frags",
args{ args{
protocol.UDPMessage{ &protocol.UDPMessage{
SessionID: 123, SessionID: 123,
PacketID: 123, PacketID: 123,
FragID: 0, FragID: 0,
@ -124,7 +124,7 @@ func TestFragUDPMessage(t *testing.T) {
} }
for _, tt := range tests { for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {
if got := FragUDPMessage(&tt.args.m, tt.args.maxSize); !reflect.DeepEqual(got, tt.want) { if got := FragUDPMessage(tt.args.m, tt.args.maxSize); !reflect.DeepEqual(got, tt.want) {
t.Errorf("FragUDPMessage() = %v, want %v", got, tt.want) t.Errorf("FragUDPMessage() = %v, want %v", got, tt.want)
} }
}) })