forked from quic-go/quic-go
remove the EncryptionUnspecified enum value
This commit is contained in:
@@ -5,10 +5,8 @@ package protocol
|
||||
type EncryptionLevel uint8
|
||||
|
||||
const (
|
||||
// EncryptionUnspecified is a not specified encryption level
|
||||
EncryptionUnspecified EncryptionLevel = iota
|
||||
// EncryptionInitial is the Initial encryption level
|
||||
EncryptionInitial
|
||||
EncryptionInitial EncryptionLevel = 1 + iota
|
||||
// EncryptionHandshake is the Handshake encryption level
|
||||
EncryptionHandshake
|
||||
// Encryption0RTT is the 0-RTT encryption level
|
||||
|
||||
@@ -6,8 +6,12 @@ import (
|
||||
)
|
||||
|
||||
var _ = Describe("Encryption Level", func() {
|
||||
It("doesn't use 0 as a value", func() {
|
||||
// 0 is used in some tests
|
||||
Expect(EncryptionInitial * EncryptionHandshake * Encryption0RTT * Encryption1RTT).ToNot(BeZero())
|
||||
})
|
||||
|
||||
It("has the correct string representation", func() {
|
||||
Expect(EncryptionUnspecified.String()).To(Equal("unknown"))
|
||||
Expect(EncryptionInitial.String()).To(Equal("Initial"))
|
||||
Expect(EncryptionHandshake.String()).To(Equal("Handshake"))
|
||||
Expect(Encryption0RTT.String()).To(Equal("0-RTT"))
|
||||
|
||||
Reference in New Issue
Block a user