add logging for the packet header

This commit is contained in:
Marten Seemann 2017-10-27 08:40:02 +07:00
parent 3e39991e1e
commit a65929f6cf
9 changed files with 217 additions and 15 deletions

View file

@ -257,7 +257,7 @@ var _ = Describe("Packet packer", func() {
p2, err := packer.PackPacket()
Expect(err).ToNot(HaveOccurred())
Expect(p2).ToNot(BeNil())
Expect(p2.number).To(BeNumerically(">", p1.number))
Expect(p2.header.PacketNumber).To(BeNumerically(">", p1.header.PacketNumber))
})
It("packs a StopWaitingFrame first", func() {
@ -349,7 +349,7 @@ var _ = Describe("Packet packer", func() {
p, err = packer.PackPacket()
Expect(err).ToNot(HaveOccurred())
Expect(p).ToNot(BeNil())
Expect(p.number).To(Equal(protocol.PacketNumber(1)))
Expect(p.header.PacketNumber).To(Equal(protocol.PacketNumber(1)))
Expect(packer.packetNumberGenerator.Peek()).To(Equal(protocol.PacketNumber(2)))
})