22 lines
619 B
Go
22 lines
619 B
Go
package host
|
|
|
|
import "testing"
|
|
|
|
func TestProcessTreeHelpersRejectEmptyPIDLists(t *testing.T) {
|
|
if FocusProcessTreeWindow(nil) {
|
|
t.Error("FocusProcessTreeWindow(nil) reported success")
|
|
}
|
|
if FocusProcessTreeWindow([]uint32{0}) {
|
|
t.Error("FocusProcessTreeWindow with PID 0 reported success")
|
|
}
|
|
if ForegroundInPIDs(nil) {
|
|
t.Error("ForegroundInPIDs(nil) reported true")
|
|
}
|
|
if IsProcessTreeWindowFullscreen(nil) {
|
|
t.Error("IsProcessTreeWindowFullscreen(nil) reported true")
|
|
}
|
|
if _, err := ToggleProcessTreeWindowFullscreen(nil); err == nil {
|
|
t.Error("ToggleProcessTreeWindowFullscreen(nil) succeeded")
|
|
}
|
|
}
|