use protocol.ByteCount in frames, streams and session

This commit is contained in:
Marten Seemann
2016-05-05 11:53:10 +07:00
parent 77f34a9207
commit 6556e2f695
11 changed files with 42 additions and 33 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/lucas-clemente/quic-go/frames"
"github.com/lucas-clemente/quic-go/handshake"
"github.com/lucas-clemente/quic-go/protocol"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@@ -331,13 +332,13 @@ var _ = Describe("Stream", func() {
It("updates the flow control window", func() {
str.flowControlWindow = 3
str.UpdateFlowControlWindow(4)
Expect(str.flowControlWindow).To(Equal(uint64(4)))
Expect(str.flowControlWindow).To(Equal(protocol.ByteCount(4)))
})
It("never shrinks the flow control window", func() {
str.flowControlWindow = 100
str.UpdateFlowControlWindow(50)
Expect(str.flowControlWindow).To(Equal(uint64(100)))
Expect(str.flowControlWindow).To(Equal(protocol.ByteCount(100)))
})
})