mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-06-08 13:29:53 +00:00
chore: trivial test fix
This commit is contained in:
parent
27460960ab
commit
e48bb98024
@ -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)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user