uquic/internal/protocol/perspective_test.go
Gaukas Wang 4973374ea5
sync: quic-go 0.42.0
Signed-off-by: Gaukas Wang <i@gaukas.wang>
2024-04-23 22:34:55 -06:00

19 lines
540 B
Go

package protocol
import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
var _ = Describe("Perspective", func() {
It("has a string representation", func() {
Expect(PerspectiveClient.String()).To(Equal("client"))
Expect(PerspectiveServer.String()).To(Equal("server"))
Expect(Perspective(0).String()).To(Equal("invalid perspective"))
})
It("returns the opposite", func() {
Expect(PerspectiveClient.Opposite()).To(Equal(PerspectiveServer))
Expect(PerspectiveServer.Opposite()).To(Equal(PerspectiveClient))
})
})