forked from quic-go/quic-go
minor protocol test fixes
This commit is contained in:
@@ -2,6 +2,7 @@ package protocol_test
|
||||
|
||||
import (
|
||||
"github.com/lucas-clemente/quic-go/protocol"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package protocol
|
||||
package protocol_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
. "github.com/lucas-clemente/quic-go/protocol"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
@@ -2,8 +2,7 @@ package protocol
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"github.com/lucas-clemente/quic-go/utils"
|
||||
"encoding/binary"
|
||||
)
|
||||
|
||||
// VersionNumber is a version number as int
|
||||
@@ -41,7 +40,9 @@ func IsSupportedVersion(v VersionNumber) bool {
|
||||
func init() {
|
||||
var b bytes.Buffer
|
||||
for _, v := range SupportedVersions {
|
||||
utils.WriteUint32(&b, VersionNumberToTag(v))
|
||||
s := make([]byte, 4)
|
||||
binary.LittleEndian.PutUint32(s, VersionNumberToTag(v))
|
||||
b.Write(s)
|
||||
}
|
||||
SupportedVersionsAsTags = b.Bytes()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user