9 gover "github.com/hashicorp/go-version"
12 func TestRevisionLen(t *testing.T) {
14 t.Error("revisionLen too long")
18 func TestCompare(t *testing.T) {
19 rand.Seed(time.Now().UnixNano())
21 rev := fmt.Sprintf("%16x", i)[:revisionLen]
23 v1, err := gover.NewVersion(Version)
25 t.Error("Version 1 format error.")
27 v2, err := gover.NewVersion(Version + "+" + rev)
29 t.Error("Version 2 format error.")
31 if v1.GreaterThan(v2) || v1.GreaterThan(v2) {
32 t.Error("Version comparison error.")
36 // In case someone edit the iota part and have the mapping changed:
40 func TestFlag(t *testing.T) {
42 t.Error("noUpdate value error")
45 t.Error("hasUpdate value error")
48 t.Error("noUpdate value error")