forked from quic-go/quic-go
add congestion.Bandwidth
This commit is contained in:
15
congestion/bandwidth_test.go
Normal file
15
congestion/bandwidth_test.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package congestion_test
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/congestion"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
var _ = Describe("Bandwidth", func() {
|
||||
It("converts from time delta", func() {
|
||||
Expect(congestion.BandwidthFromDelta(1, time.Millisecond)).To(Equal(1000 * congestion.BytesPerSecond))
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user