replace version number literals with constants to make grepping easier

This commit is contained in:
Lucas Clemente
2016-06-03 11:09:48 +02:00
parent 556bf2fe4b
commit 240946dfde
13 changed files with 75 additions and 67 deletions

View File

@@ -10,12 +10,12 @@ import (
var _ = Describe("Version", func() {
It("converts tags to numbers", func() {
Expect(protocol.VersionTagToNumber('Q' + '1'<<8 + '2'<<16 + '3'<<24)).To(Equal(protocol.VersionNumber(123)))
Expect(protocol.VersionTagToNumber('Q' + '0'<<8 + '3'<<16 + '0'<<24)).To(Equal(protocol.VersionNumber(30)))
Expect(protocol.VersionTagToNumber('Q' + '0'<<8 + '3'<<16 + '0'<<24)).To(Equal(protocol.Version30))
})
It("converts number to tag", func() {
Expect(protocol.VersionNumberToTag(protocol.VersionNumber(123))).To(Equal(uint32('Q' + '1'<<8 + '2'<<16 + '3'<<24)))
Expect(protocol.VersionNumberToTag(protocol.VersionNumber(30))).To(Equal(uint32('Q' + '0'<<8 + '3'<<16 + '0'<<24)))
Expect(protocol.VersionNumberToTag(protocol.Version30)).To(Equal(uint32('Q' + '0'<<8 + '3'<<16 + '0'<<24)))
})
It("has proper tag list", func() {