From b899d2b4c2705d304af725b49ce135fd4c4e61f9 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Sun, 24 Nov 2019 07:18:04 -0400 Subject: [PATCH] add more and update test code --- robotgo_test.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/robotgo_test.go b/robotgo_test.go index bde4f58..19b5251 100644 --- a/robotgo_test.go +++ b/robotgo_test.go @@ -27,10 +27,20 @@ func TestGetVer(t *testing.T) { tt.Expect(t, Version, ver) } -func TestMouse(t *testing.T) { +func TestMoveMouse(t *testing.T) { MoveMouse(10, 10) + Sleep(1) x, y := GetMousePos() tt.Equal(t, 10, x) 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) +}