add a function to tell if there's app data in the retransmission queue

This commit is contained in:
Marten Seemann 2020-05-13 11:58:24 +07:00
parent 77b1021a54
commit df55c30c86
2 changed files with 7 additions and 0 deletions

View file

@ -176,9 +176,12 @@ var _ = Describe("Retransmission queue", func() {
It("queues and retrieves a control frame", func() {
f := &wire.MaxDataFrame{ByteOffset: 0x42}
Expect(q.HasAppData()).To(BeFalse())
q.AddAppData(f)
Expect(q.HasAppData()).To(BeTrue())
Expect(q.GetAppDataFrame(f.Length(version) - 1)).To(BeNil())
Expect(q.GetAppDataFrame(f.Length(version))).To(Equal(f))
Expect(q.HasAppData()).To(BeFalse())
})
})
})