mirror of
https://github.com/robotn/gohook.git
synced 2024-11-23 03:56:47 +08:00
24 lines
297 B
Go
24 lines
297 B
Go
package hook
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
|
|
"github.com/vcaesar/tt"
|
|
)
|
|
|
|
func TestAdd(t *testing.T) {
|
|
fmt.Println("hook test...")
|
|
|
|
e := Start()
|
|
tt.NotNil(t, e)
|
|
}
|
|
|
|
func TestKey(t *testing.T) {
|
|
k := RawcodetoKeychar(0)
|
|
tt.Equal(t, "error", k)
|
|
|
|
r := KeychartoRawcode("error")
|
|
tt.Equal(t, 0, r)
|
|
}
|