use shorter variable name in the sent packet handler

This commit is contained in:
Marten Seemann 2019-02-11 15:19:03 +08:00
parent cb253010ea
commit 631947ad7d
2 changed files with 20 additions and 20 deletions

View file

@ -93,16 +93,16 @@ var _ = Describe("SentPacketHandler", func() {
It("accepts two consecutive packets", func() {
handler.SentPacket(retransmittablePacket(&Packet{PacketNumber: 1}))
handler.SentPacket(retransmittablePacket(&Packet{PacketNumber: 2}))
Expect(handler.lastSentPacketNumber).To(Equal(protocol.PacketNumber(2)))
Expect(handler.largestSent).To(Equal(protocol.PacketNumber(2)))
expectInPacketHistory([]protocol.PacketNumber{1, 2})
Expect(handler.bytesInFlight).To(Equal(protocol.ByteCount(2)))
})
It("accepts packet number 0", func() {
handler.SentPacket(retransmittablePacket(&Packet{PacketNumber: 0}))
Expect(handler.lastSentPacketNumber).To(BeZero())
Expect(handler.largestSent).To(BeZero())
handler.SentPacket(retransmittablePacket(&Packet{PacketNumber: 1}))
Expect(handler.lastSentPacketNumber).To(Equal(protocol.PacketNumber(1)))
Expect(handler.largestSent).To(Equal(protocol.PacketNumber(1)))
expectInPacketHistory([]protocol.PacketNumber{0, 1})
Expect(handler.bytesInFlight).To(Equal(protocol.ByteCount(2)))
})