split STREAM and ACK frames in seperate files

This commit is contained in:
Marten Seemann
2016-04-15 12:34:23 +07:00
parent 9e87ee8ed9
commit 8da53885fc
5 changed files with 133 additions and 115 deletions

21
ack_frame_test.go Normal file
View File

@@ -0,0 +1,21 @@
package quic
import (
"bytes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("AckFrame", func() {
Context("when writing", func() {
It("writes simple frames", func() {
b := &bytes.Buffer{}
(&AckFrame{
Entropy: 2,
LargestObserved: 1,
}).Write(b)
Expect(b.Bytes()).To(Equal([]byte{0x48, 0x02, 0x01, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0}))
})
})
})