forked from quic-go/quic-go
implement version-dependent parsing of the Public Header
This commit is contained in:
18
internal/utils/byteorder_test.go
Normal file
18
internal/utils/byteorder_test.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"github.com/lucas-clemente/quic-go/protocol"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
var _ = Describe("Byte Order", func() {
|
||||
It("says little Little Endian before QUIC 39", func() {
|
||||
Expect(GetByteOrder(protocol.Version36)).To(Equal(LittleEndian))
|
||||
Expect(GetByteOrder(protocol.Version37)).To(Equal(LittleEndian))
|
||||
})
|
||||
|
||||
It("says little Little Endian for QUIC 39", func() {
|
||||
Expect(GetByteOrder(protocol.Version39)).To(Equal(BigEndian))
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user