add congestion.Bandwidth

This commit is contained in:
Lucas Clemente
2016-04-28 10:33:58 +02:00
parent f16d30a20c
commit 2da6f1860e
2 changed files with 37 additions and 0 deletions

View 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))
})
})