github.com/daeuniverse/quic-go@v0.0.0-20240413031024-943f218e0810/internal/protocol/perspective_test.go (about) 1 package protocol 2 3 import ( 4 . "github.com/onsi/ginkgo/v2" 5 . "github.com/onsi/gomega" 6 ) 7 8 var _ = Describe("Perspective", func() { 9 It("has a string representation", func() { 10 Expect(PerspectiveClient.String()).To(Equal("client")) 11 Expect(PerspectiveServer.String()).To(Equal("server")) 12 Expect(Perspective(0).String()).To(Equal("invalid perspective")) 13 }) 14 15 It("returns the opposite", func() { 16 Expect(PerspectiveClient.Opposite()).To(Equal(PerspectiveServer)) 17 Expect(PerspectiveServer.Opposite()).To(Equal(PerspectiveClient)) 18 }) 19 })