Windows: Fix parsers kernel test

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard 2015-10-31 11:22:31 -07:00
parent be7bdc5be2
commit e37f5839e8

View file

@ -1,3 +1,5 @@
// +build !windows
package kernel package kernel
import ( import (
@ -19,6 +21,7 @@ func assertParseRelease(t *testing.T, release string, b *VersionInfo, result int
} }
} }
// TestParseRelease tests the ParseRelease() function
func TestParseRelease(t *testing.T) { func TestParseRelease(t *testing.T) {
assertParseRelease(t, "3.8.0", &VersionInfo{Kernel: 3, Major: 8, Minor: 0}, 0) assertParseRelease(t, "3.8.0", &VersionInfo{Kernel: 3, Major: 8, Minor: 0}, 0)
assertParseRelease(t, "3.4.54.longterm-1", &VersionInfo{Kernel: 3, Major: 4, Minor: 54, Flavor: ".longterm-1"}, 0) assertParseRelease(t, "3.4.54.longterm-1", &VersionInfo{Kernel: 3, Major: 4, Minor: 54, Flavor: ".longterm-1"}, 0)
@ -48,6 +51,7 @@ func assertKernelVersion(t *testing.T, a, b VersionInfo, result int) {
} }
} }
// TestCompareKernelVersion tests the CompareKernelVersion() function
func TestCompareKernelVersion(t *testing.T) { func TestCompareKernelVersion(t *testing.T) {
assertKernelVersion(t, assertKernelVersion(t,
VersionInfo{Kernel: 3, Major: 8, Minor: 0}, VersionInfo{Kernel: 3, Major: 8, Minor: 0},