forked from quic-go/quic-go
protocol: move away from Ginkgo (#4650)
This commit is contained in:
@@ -1,20 +1,18 @@
|
||||
package protocol
|
||||
|
||||
import (
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
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())
|
||||
})
|
||||
func TestEncryptionLevelNonZeroValue(t *testing.T) {
|
||||
require.NotZero(t, EncryptionInitial*EncryptionHandshake*Encryption0RTT*Encryption1RTT)
|
||||
}
|
||||
|
||||
It("has the correct string representation", func() {
|
||||
Expect(EncryptionInitial.String()).To(Equal("Initial"))
|
||||
Expect(EncryptionHandshake.String()).To(Equal("Handshake"))
|
||||
Expect(Encryption0RTT.String()).To(Equal("0-RTT"))
|
||||
Expect(Encryption1RTT.String()).To(Equal("1-RTT"))
|
||||
})
|
||||
})
|
||||
func TestEncryptionLevelStringRepresentation(t *testing.T) {
|
||||
require.Equal(t, "Initial", EncryptionInitial.String())
|
||||
require.Equal(t, "Handshake", EncryptionHandshake.String())
|
||||
require.Equal(t, "0-RTT", Encryption0RTT.String())
|
||||
require.Equal(t, "1-RTT", Encryption1RTT.String())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user