use time.Duration as delay time type in ackframe

This commit is contained in:
Lucas Clemente 2016-04-29 12:18:35 +02:00
parent 3a18452a93
commit 2878e47317
3 changed files with 9 additions and 18 deletions

View file

@ -2,6 +2,7 @@ package quic
import (
"bytes"
"time"
"github.com/lucas-clemente/quic-go/crypto"
"github.com/lucas-clemente/quic-go/frames"
@ -60,20 +61,7 @@ var _ = Describe("Packet unpacker", func() {
It("unpacks ack frames", func() {
f := &frames.AckFrame{
LargestObserved: 1,
DelayTime: 1,
}
err := f.Write(buf, 3, 6)
Expect(err).ToNot(HaveOccurred())
setReader(buf.Bytes())
packet, err := unpacker.Unpack(hdrBin, hdr, r)
Expect(err).ToNot(HaveOccurred())
Expect(packet.frames).To(Equal([]frames.Frame{f}))
})
It("unpacks ack frames", func() {
f := &frames.AckFrame{
LargestObserved: 1,
DelayTime: 1,
DelayTime: time.Microsecond,
}
err := f.Write(buf, 3, 6)
Expect(err).ToNot(HaveOccurred())