introduce invalid stream ID to simplify the outgoing streams map

This commit is contained in:
Marten Seemann
2019-05-30 03:16:45 +08:00
parent 5009f1cb19
commit 82acc7f2b7
6 changed files with 32 additions and 27 deletions

View File

@@ -6,6 +6,10 @@ import (
)
var _ = Describe("Stream ID", func() {
It("InvalidStreamID is smaller than all valid stream IDs", func() {
Expect(InvalidStreamID).To(BeNumerically("<", 0))
})
It("says who initiated a stream", func() {
Expect(StreamID(4).InitiatedBy()).To(Equal(PerspectiveClient))
Expect(StreamID(5).InitiatedBy()).To(Equal(PerspectiveServer))