use channels to properly implement the Stream.Read function

This commit is contained in:
Marten Seemann
2016-04-16 23:47:57 +07:00
parent 1da9b86da0
commit 3e59ede7a7
4 changed files with 93 additions and 36 deletions

View File

@@ -82,4 +82,16 @@ var _ = Describe("Utils", func() {
Expect(b.Bytes()).To(Equal([]byte{0x12, 0x35, 0xAC, 0xEF}))
})
})
Context("Max", func() {
It("returns the maximum", func() {
Expect(Max(5, 7)).To(Equal(7))
})
})
Context("Min", func() {
It("returns the minimum", func() {
Expect(Min(5, 7)).To(Equal(5))
})
})
})