wire: migrate tests away from Ginkgo (#4643)

* wire: translate ACK frame tests

* wire: translate CONNECTION_CLOSE frame tests

* wire: translate DATA_BLOCKED frame tests

* wire: translate DATAGRAM frame tests

* wire: translate HANDSHAKE_DONE frame tests

* wire: translate MAX_DATA frame tests

* wire: translate MAX_STREAM_DATA frame tests

* wire: translate MAX_STREAMS frame tests

* wire: translate NEW_CONNECTION_ID frame tests

* wire: translate NEW_TOKEN frame tests

* wire: translate PATH_CHALLENGE frame tests

* wire: translate PATH_RESPONSE frame tests

* wire: translate PING frame test

* wire: translate RESET_STREAM frame tests

* wire: translate RETIRE_CONNECTION_ID frame tests

* wire: translate STOP_SENDING frame tests

* wire: translate STREAM_DATA_BLOCKED frame tests

* wire: translate STREAMS_BLOCKED frame tests

* wire: translate CRYPTO frame tests

* wire: translate STREAM frame tests

* wire: translate version negotiation tests

* wire: translate header tests

* wire: translate pool tests

* wire: translate frame logging tests

* wire: translate short header tests

* wire: translate framer parser tests

* wire: translate transport parameter tests
This commit is contained in:
Marten Seemann
2024-09-13 10:27:39 +08:00
committed by GitHub
parent 7a10ed602d
commit 672f906a40
30 changed files with 3768 additions and 4168 deletions

View File

@@ -1,13 +1,12 @@
package wire
import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"testing"
"github.com/stretchr/testify/require"
)
var _ = Describe("ACK range", func() {
It("returns the length", func() {
Expect(AckRange{Smallest: 10, Largest: 10}.Len()).To(BeEquivalentTo(1))
Expect(AckRange{Smallest: 10, Largest: 13}.Len()).To(BeEquivalentTo(4))
})
})
func TestAckRangeLength(t *testing.T) {
require.EqualValues(t, 1, AckRange{Smallest: 10, Largest: 10}.Len())
require.EqualValues(t, 4, AckRange{Smallest: 10, Largest: 13}.Len())
}