mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 19:50:18 +08:00
添加 github.com/pion/dtls 代码
This commit is contained in:
23
dtls-2.0.9/pkg/protocol/compression_method_test.go
Normal file
23
dtls-2.0.9/pkg/protocol/compression_method_test.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package protocol
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDecodeCompressionMethods(t *testing.T) {
|
||||
testCases := []struct {
|
||||
buf []byte
|
||||
result []*CompressionMethod
|
||||
err error
|
||||
}{
|
||||
{[]byte{}, nil, errBufferTooSmall},
|
||||
}
|
||||
|
||||
for _, testCase := range testCases {
|
||||
_, err := DecodeCompressionMethods(testCase.buf)
|
||||
if !errors.Is(err, testCase.err) {
|
||||
t.Fatal("Unexpected error", err)
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user