rename ReadVarint / WriteVarInt / VarIntLen to Read / Write / Len

This commit is contained in:
Marten Seemann
2021-01-01 11:40:53 +08:00
parent 11c5045065
commit f9226887b4
46 changed files with 298 additions and 298 deletions

View File

@@ -236,7 +236,7 @@ var _ = Describe("STREAM frame", func() {
StreamID: 0x1337,
Data: []byte("foobar"),
}
Expect(f.Length(versionIETFFrames)).To(Equal(1 + quicvarint.VarIntLen(0x1337) + 6))
Expect(f.Length(versionIETFFrames)).To(Equal(1 + quicvarint.Len(0x1337) + 6))
})
It("has the right length for a frame with offset", func() {
@@ -245,7 +245,7 @@ var _ = Describe("STREAM frame", func() {
Offset: 0x42,
Data: []byte("foobar"),
}
Expect(f.Length(versionIETFFrames)).To(Equal(1 + quicvarint.VarIntLen(0x1337) + quicvarint.VarIntLen(0x42) + 6))
Expect(f.Length(versionIETFFrames)).To(Equal(1 + quicvarint.Len(0x1337) + quicvarint.Len(0x42) + 6))
})
It("has the right length for a frame with data length", func() {
@@ -255,7 +255,7 @@ var _ = Describe("STREAM frame", func() {
DataLenPresent: true,
Data: []byte("foobar"),
}
Expect(f.Length(versionIETFFrames)).To(Equal(1 + quicvarint.VarIntLen(0x1337) + quicvarint.VarIntLen(0x1234567) + quicvarint.VarIntLen(6) + 6))
Expect(f.Length(versionIETFFrames)).To(Equal(1 + quicvarint.Len(0x1337) + quicvarint.Len(0x1234567) + quicvarint.Len(6) + 6))
})
})