uquic/quic_suite_test.go
Marten Seemann 759b0d87b1 refactor packet unpacking
This replaces version.UsesMaxDataFrame by versoin.UsesIETFFrameFormat.
That way, we can have two separate code paths in the unpacker to unpack
either gQUIC frames or IETF frames.
2017-12-08 09:18:54 +07:00

37 lines
835 B
Go

package quic
import (
"github.com/golang/mock/gomock"
"github.com/lucas-clemente/quic-go/internal/protocol"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"testing"
)
func TestQuicGo(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "QUIC Suite")
}
const (
versionGQUICFrames = protocol.Version39
versionIETFFrames = protocol.VersionTLS
)
var mockCtrl *gomock.Controller
var _ = BeforeSuite(func() {
Expect(versionGQUICFrames.CryptoStreamID()).To(Equal(protocol.StreamID(1)))
Expect(versionGQUICFrames.UsesIETFFrameFormat()).To(BeFalse())
Expect(versionIETFFrames.CryptoStreamID()).To(Equal(protocol.StreamID(0)))
Expect(versionIETFFrames.UsesIETFFrameFormat()).To(BeTrue())
})
var _ = BeforeEach(func() {
mockCtrl = gomock.NewController(GinkgoT())
})
var _ = AfterEach(func() {
mockCtrl.Finish()
})