mirror of https://github.com/fatedier/frp
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.
19 lines
297 B
19 lines
297 B
8 years ago
|
package udp
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func TestUdpPacket(t *testing.T) {
|
||
|
assert := assert.New(t)
|
||
|
|
||
|
buf := []byte("hello world")
|
||
5 years ago
|
udpMsg := NewUDPPacket(buf, nil, nil)
|
||
8 years ago
|
|
||
|
newBuf, err := GetContent(udpMsg)
|
||
|
assert.NoError(err)
|
||
|
assert.EqualValues(buf, newBuf)
|
||
|
}
|