shirou_gopsutil/load_test.go

19 lines
247 B
Go
Raw Normal View History

2014-04-18 15:34:47 +08:00
// +build linux
2014-04-22 08:44:22 +08:00
package gopsutil
2014-04-18 15:34:47 +08:00
import (
"testing"
)
func TestLoad(t *testing.T) {
v, err := LoadAvg()
2014-04-18 15:34:47 +08:00
if err != nil {
t.Errorf("error %v", err)
}
if v.Load1 == 0 || v.Load5 == 0 || v.Load15 == 0 {
t.Errorf("error load: %v", v)
}
}