mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-05 21:27:35 +03:00
reject unknown versions in the quic.Config
This commit is contained in:
parent
cd01b55090
commit
624ac61412
6 changed files with 76 additions and 33 deletions
|
@ -15,6 +15,14 @@ var _ = Describe("Version", func() {
|
|||
Expect(Version39).To(BeEquivalentTo(0x51303339))
|
||||
})
|
||||
|
||||
It("says if a version is valid", func() {
|
||||
Expect(IsValidVersion(Version39)).To(BeTrue())
|
||||
Expect(IsValidVersion(VersionTLS)).To(BeTrue())
|
||||
Expect(IsValidVersion(VersionWhatever)).To(BeFalse())
|
||||
Expect(IsValidVersion(VersionUnknown)).To(BeFalse())
|
||||
Expect(IsValidVersion(1234)).To(BeFalse())
|
||||
})
|
||||
|
||||
It("says if a version supports TLS", func() {
|
||||
Expect(Version39.UsesTLS()).To(BeFalse())
|
||||
Expect(VersionTLS.UsesTLS()).To(BeTrue())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue