mirror of
https://github.com/pion/webrtc.git
synced 2025-10-05 15:16:52 +08:00

Taking a more extreme approach than #588... This patch disables quic by default. The advantage here would be that webrtc builds with older versions of go than quic-go supports (currently 1.12+).
30 lines
494 B
Go
30 lines
494 B
Go
// +build quic
|
|
|
|
package webrtc
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestQUICRole_String(t *testing.T) {
|
|
testCases := []struct {
|
|
role QUICRole
|
|
expectedString string
|
|
}{
|
|
{QUICRole(Unknown), unknownStr},
|
|
{QUICRoleAuto, "auto"},
|
|
{QUICRoleClient, "client"},
|
|
{QUICRoleServer, "server"},
|
|
}
|
|
|
|
for i, testCase := range testCases {
|
|
assert.Equal(t,
|
|
testCase.expectedString,
|
|
testCase.role.String(),
|
|
"testCase: %d %v", i, testCase,
|
|
)
|
|
}
|
|
}
|