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

@@ -38,12 +38,12 @@ var _ = Describe("Frame logging", func() {
It("logs sent frames", func() {
LogFrame(logger, &ResetStreamFrame{}, true)
Expect(buf.Bytes()).To(ContainSubstring("\t-> &wire.ResetStreamFrame{StreamID:0x0, ErrorCode:0x0, ByteOffset:0x0}\n"))
Expect(buf.Bytes()).To(ContainSubstring("\t-> &wire.ResetStreamFrame{StreamID:0, ErrorCode:0x0, ByteOffset:0x0}\n"))
})
It("logs received frames", func() {
LogFrame(logger, &ResetStreamFrame{}, false)
Expect(buf.Bytes()).To(ContainSubstring("\t<- &wire.ResetStreamFrame{StreamID:0x0, ErrorCode:0x0, ByteOffset:0x0}\n"))
Expect(buf.Bytes()).To(ContainSubstring("\t<- &wire.ResetStreamFrame{StreamID:0, ErrorCode:0x0, ByteOffset:0x0}\n"))
})
It("logs CRYPTO frames", func() {