mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-02 19:57:35 +03:00
19 lines
540 B
Go
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))
|
|
})
|
|
})
|