mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-06-05 08:13:55 +00:00
add more and update test code
This commit is contained in:
parent
f7eec20978
commit
b899d2b4c2
@ -27,10 +27,20 @@ func TestGetVer(t *testing.T) {
|
|||||||
tt.Expect(t, Version, ver)
|
tt.Expect(t, Version, ver)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMouse(t *testing.T) {
|
func TestMoveMouse(t *testing.T) {
|
||||||
MoveMouse(10, 10)
|
MoveMouse(10, 10)
|
||||||
|
Sleep(1)
|
||||||
x, y := GetMousePos()
|
x, y := GetMousePos()
|
||||||
|
|
||||||
tt.Equal(t, 10, x)
|
tt.Equal(t, 10, x)
|
||||||
tt.Equal(t, 10, y)
|
tt.Equal(t, 10, y)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestMoveMouseSmooth(t *testing.T) {
|
||||||
|
MoveMouseSmooth(100, 100)
|
||||||
|
Sleep(1)
|
||||||
|
x, y := GetMousePos()
|
||||||
|
|
||||||
|
tt.Equal(t, 100, x)
|
||||||
|
tt.Equal(t, 100, y)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user