uquic/internal/wire/wire_suite_test.go
Marten Seemann 11c5045065 move varint encoding / decoding to a separate package
... which is not internal.
2021-01-01 11:46:45 +08:00

28 lines
505 B
Go

package wire
import (
"bytes"
"testing"
"github.com/lucas-clemente/quic-go/internal/protocol"
"github.com/lucas-clemente/quic-go/quicvarint"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
func TestWire(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Wire Suite")
}
const (
// a QUIC version that uses the IETF frame types
versionIETFFrames = protocol.VersionTLS
)
func encodeVarInt(i uint64) []byte {
b := &bytes.Buffer{}
quicvarint.WriteVarInt(b, i)
return b.Bytes()
}