add entropy accumulation

This commit is contained in:
Lucas Clemente
2016-04-12 17:03:24 +02:00
parent 284b86c02c
commit 59ed21e690
5 changed files with 48 additions and 6 deletions

View File

@@ -58,9 +58,10 @@ var _ = Describe("Frame", func() {
It("writes simple frames", func() {
b := &bytes.Buffer{}
WriteAckFrame(b, &AckFrame{
Entropy: 2,
LargestObserved: 1,
})
Expect(b.Bytes()).To(Equal([]byte{0x48, 0, 0x01, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0}))
Expect(b.Bytes()).To(Equal([]byte{0x48, 0x02, 0x01, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0}))
})
})
})