Fix a couple imports and a float comparison test

This commit is contained in:
Evan Phoenix
2015-04-06 16:22:34 -07:00
parent ba96ae78dd
commit 941c9acabf
3 changed files with 4 additions and 4 deletions

View File

@@ -82,7 +82,7 @@ func testCPUPercent(t *testing.T, percpu bool) {
t.Errorf("error %v", err)
}
for _, percent := range v {
if percent < 0.0 || percent > 100.0*float64(numcpu) {
if percent < 0.0 || int(percent) > 100*numcpu {
t.Fatalf("CPUPercent value is invalid: %f", percent)
}
}