mirror of
https://github.com/go-vgo/robotgo.git
synced 2025-05-30 22:13:54 +00:00
add more test code
This commit is contained in:
parent
df682b04f3
commit
fca53605c0
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user