forked from quic-go/quic-go
add a string representation for the Long Header packet types
This commit is contained in:
19
internal/protocol/protocol_test.go
Normal file
19
internal/protocol/protocol_test.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package protocol
|
||||
|
||||
import (
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
var _ = Describe("Protocol", func() {
|
||||
Context("Long Header Packet Types", func() {
|
||||
It("has the correct string representation", func() {
|
||||
Expect(PacketTypeVersionNegotiation.String()).To(Equal("Version Negotiation"))
|
||||
Expect(PacketTypeInitial.String()).To(Equal("Initial"))
|
||||
Expect(PacketTypeRetry.String()).To(Equal("Retry"))
|
||||
Expect(PacketTypeHandshake.String()).To(Equal("Handshake"))
|
||||
Expect(PacketType0RTT.String()).To(Equal("0-RTT Protected"))
|
||||
Expect(PacketType(10).String()).To(Equal("unknown packet type: 10"))
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user