1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00
shirou_gopsutil/cpu/cpu_aix_test.go
2024-05-15 12:57:58 -04:00

34 lines
520 B
Go

package cpu
import (
"testing"
)
func TestTimes(t *testing.T) {
_, err := Times(true)
if err != nil {
t.Error("Times(true) failed")
}
_, err = Times(false)
if err != nil {
t.Error("Times(false) failed")
}
}
func TestInfo(t *testing.T) {
{
l, err := Times(true)
if err != nil || len(l) == 0 {
t.Error("Times(true) failed")
}
t.Logf("Times(true): %#v", l)
}
{
l, err := Times(false)
if err != nil || len(l) == 0 {
t.Error("Times(false) failed")
}
t.Logf("Times(false): %#v", l)
}
}