File: send_mode_test.go

package info (click to toggle)
golang-github-lucas-clemente-quic-go 0.54.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,312 kB
  • sloc: sh: 54; makefile: 7
file content (18 lines) | stat: -rw-r--r-- 583 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package ackhandler

import (
	"testing"

	"github.com/stretchr/testify/require"
)

func TestSendModeStringer(t *testing.T) {
	require.Equal(t, "none", SendNone.String())
	require.Equal(t, "any", SendAny.String())
	require.Equal(t, "pacing limited", SendPacingLimited.String())
	require.Equal(t, "ack", SendAck.String())
	require.Equal(t, "pto (Initial)", SendPTOInitial.String())
	require.Equal(t, "pto (Handshake)", SendPTOHandshake.String())
	require.Equal(t, "pto (Application Data)", SendPTOAppData.String())
	require.Equal(t, "invalid send mode: 123", SendMode(123).String())
}