introduce PacketNumberLen type

This commit is contained in:
Marten Seemann
2016-05-09 17:31:12 +07:00
parent a141c31c69
commit e8ba73f275
19 changed files with 61 additions and 46 deletions

View File

@@ -3,6 +3,7 @@ package frames
import (
"bytes"
"github.com/lucas-clemente/quic-go/protocol"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@@ -21,7 +22,7 @@ var _ = Describe("PingFrame", func() {
It("writes a sample frame", func() {
b := &bytes.Buffer{}
frame := PingFrame{}
frame.Write(b, 10, 6)
frame.Write(b, 10, protocol.PacketNumberLen6)
Expect(b.Bytes()).To(Equal([]byte{0x07}))
})