implement more cubic sender tests

This commit is contained in:
Lucas Clemente
2016-04-28 12:03:49 +02:00
parent 153ff598d9
commit b6a2f72b29
7 changed files with 297 additions and 10 deletions

View File

@@ -141,6 +141,14 @@ func Max(a, b int) int {
return a
}
// MaxUint32 returns the maximum of two uint32
func MaxUint32(a, b uint32) uint32 {
if a < b {
return b
}
return a
}
// MaxUint64 returns the maximum of two uint64
func MaxUint64(a, b uint64) uint64 {
if a < b {

View File

@@ -127,6 +127,10 @@ var _ = Describe("Utils", func() {
Expect(Max(5, 7)).To(Equal(7))
})
It("returns the maximum uint32", func() {
Expect(MaxUint32(5, 7)).To(Equal(uint32(7)))
})
It("returns the maximum uint64", func() {
Expect(MaxUint64(5, 7)).To(Equal(uint64(7)))
})