You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gopsutil/process_test.go

28 lines
394 B
Go

package gopsutil
import (
"testing"
)
func Test_Pids(t *testing.T) {
ret, err := Pids()
if err != nil {
t.Errorf("error %v", err)
}
if len(ret) == 0 {
t.Errorf("could not get pids %v", ret)
}
}
func Test_Pid_exists(t *testing.T) {
ret, err := Pid_exists(1)
if err != nil {
t.Errorf("error %v", err)
}
if ret == false {
t.Errorf("could not get init process %v", ret)
}
}