Add test case for identical short and long version numbers
Signed-off-by: Lajos Papp <lajos.papp@sequenceiq.com>
This commit is contained in:
parent
327067ef34
commit
12bfdf1727
1 changed files with 2 additions and 0 deletions
|
@ -12,6 +12,8 @@ func assertVersion(t *testing.T, a, b string, result int) {
|
||||||
|
|
||||||
func TestCompareVersion(t *testing.T) {
|
func TestCompareVersion(t *testing.T) {
|
||||||
assertVersion(t, "1.12", "1.12", 0)
|
assertVersion(t, "1.12", "1.12", 0)
|
||||||
|
assertVersion(t, "1.0.0", "1", 0)
|
||||||
|
assertVersion(t, "1", "1.0.0", 0)
|
||||||
assertVersion(t, "1.05.00.0156", "1.0.221.9289", 1)
|
assertVersion(t, "1.05.00.0156", "1.0.221.9289", 1)
|
||||||
assertVersion(t, "1", "1.0.1", -1)
|
assertVersion(t, "1", "1.0.1", -1)
|
||||||
assertVersion(t, "1.0.1", "1", 1)
|
assertVersion(t, "1.0.1", "1", 1)
|
||||||
|
|
Loading…
Reference in a new issue