forked from quic-go/quic-go
implement more cubic sender tests
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user