mirror of
https://github.com/fatedier/frp.git
synced 2025-06-01 13:08:26 +00:00
19 lines
302 B
Go
19 lines
302 B
Go
package udp
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestUdpPacket(t *testing.T) {
|
|
require := require.New(t)
|
|
|
|
buf := []byte("hello world")
|
|
udpMsg := NewUDPPacket(buf, nil, nil)
|
|
|
|
newBuf, err := GetContent(udpMsg)
|
|
require.NoError(err)
|
|
require.EqualValues(buf, newBuf)
|
|
}
|