github.com/MerlinKodo/quic-go@v0.39.2/internal/wire/ping_frame_test.go (about) 1 package wire 2 3 import ( 4 "github.com/MerlinKodo/quic-go/internal/protocol" 5 6 . "github.com/onsi/ginkgo/v2" 7 . "github.com/onsi/gomega" 8 ) 9 10 var _ = Describe("PING frame", func() { 11 Context("when writing", func() { 12 It("writes a sample frame", func() { 13 frame := PingFrame{} 14 b, err := frame.Append(nil, protocol.Version1) 15 Expect(err).ToNot(HaveOccurred()) 16 Expect(b).To(Equal([]byte{0x1})) 17 }) 18 19 It("has the correct length", func() { 20 frame := PingFrame{} 21 Expect(frame.Length(0)).To(Equal(protocol.ByteCount(1))) 22 }) 23 }) 24 })