mirror of
https://github.com/fatedier/frp.git
synced 2026-01-11 22:23:12 +00:00
update test package (#4814)
This commit is contained in:
@@ -3,16 +3,16 @@ package udp
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestUdpPacket(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
require := require.New(t)
|
||||
|
||||
buf := []byte("hello world")
|
||||
udpMsg := NewUDPPacket(buf, nil, nil)
|
||||
|
||||
newBuf, err := GetContent(udpMsg)
|
||||
assert.NoError(err)
|
||||
assert.EqualValues(buf, newBuf)
|
||||
require.NoError(err)
|
||||
require.EqualValues(buf, newBuf)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user