forked from quic-go/quic-go
split STREAM and ACK frames in seperate files
This commit is contained in:
21
ack_frame_test.go
Normal file
21
ack_frame_test.go
Normal 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}))
|
||||
})
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user