1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

[process] Properly test Ppid() against known value

This commit is contained in:
Lomanic 2020-09-29 23:58:34 +02:00
parent c9c40215f5
commit 64ba9d03cd

View File

@ -181,6 +181,10 @@ func Test_Process_Ppid(t *testing.T) {
if v == 0 {
t.Errorf("return value is 0 %v", v)
}
expected := os.Getppid()
if v != int32(expected) {
t.Errorf("return value is %v, expected %v", v, expected)
}
}
func Test_Process_Status(t *testing.T) {