From 8d6e60ce67b91db02354d4b90516617476a30206 Mon Sep 17 00:00:00 2001
From: vcaesar <vzvway@gmail.com>
Date: Wed, 1 Dec 2021 11:43:32 -0400
Subject: [PATCH] add more test code

---
 robotgo_test.go | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/robotgo_test.go b/robotgo_test.go
index 5852bc8..0a11e8e 100644
--- a/robotgo_test.go
+++ b/robotgo_test.go
@@ -14,6 +14,7 @@
 package robotgo
 
 import (
+	"fmt"
 	"testing"
 
 	"github.com/vcaesar/tt"
@@ -157,6 +158,20 @@ func TestBitmap(t *testing.T) {
 	e := SaveBitmap(bit, "robot_test.png")
 	tt.Empty(t, e)
 
+	bit0 := CaptureScreen(10, 10, 20, 20)
+	x, y := FindBitmap(bit0)
+	fmt.Println("Find bitmap: ", x, y)
+
+	arr := FindAllBitmap(bit0)
+	fmt.Println("Find all bitmap:", arr)
+	tt.Equal(t, 1, len(arr))
+
+	c1 := CHex(0xAADCDC)
+	x, y = FindColor(c1)
+	fmt.Println("Find color: ", x, y)
+	arr = FindAllColor(c1)
+	fmt.Println("Find all color: ", arr)
+
 	img := ToImage(bit)
 	err := SavePng(img, "robot_img.png")
 	tt.Nil(t, err)