Files
webrtc/quicrole_test.go
Michael MacDonald 64eecd6d39 Disable quic by default; enable with build tag
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+).
2019-04-05 15:32:40 -04:00

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,
)
}
}