From fca53605c0b9118be4c0b3c092cd6ffc25187294 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Thu, 13 Feb 2020 09:40:43 -0400 Subject: [PATCH] add more test code --- robotgo_test.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/robotgo_test.go b/robotgo_test.go index 356bd51..45f5db9 100644 --- a/robotgo_test.go +++ b/robotgo_test.go @@ -18,6 +18,26 @@ import ( "github.com/vcaesar/tt" ) +func TestColor(t *testing.T) { + s := GetPixelColor(10, 10) + tt.IsType(t, "string", s) + tt.NotEmpty(t, s) + + c := GetPxColor(10, 10) + s1 := PadHex(c) + tt.Equal(t, s, s1) +} + +func TestSize(t *testing.T) { + x, y := GetScreenSize() + tt.NotZero(t, x) + tt.NotZero(t, y) + + x, y = GetScaleSize() + tt.NotZero(t, x) + tt.NotZero(t, x) +} + func TestMoveMouse(t *testing.T) { MoveMouse(20, 20) MilliSleep(10)