diff --git a/test/test.go b/rfm69_test.go similarity index 73% rename from test/test.go rename to rfm69_test.go index 4c0230b..e3f636f 100644 --- a/test/test.go +++ b/rfm69_test.go @@ -1,14 +1,14 @@ -package main +package rfm69 import ( "fmt" + "testing" - "github.com/fulr/rfm69" "github.com/kidoman/embd" _ "github.com/kidoman/embd/host/all" ) -func main() { +func TestRfm69(t *testing.T) { fmt.Print("Test") if err := embd.InitSPI(); err != nil { @@ -19,8 +19,9 @@ func main() { spiBus := embd.NewSPIBus(embd.SPIMode0, 0, 4000000, 8, 0) defer spiBus.Close() - rfm, err := rfm69.NewDevice(spiBus, 1, 10, true) + rfm, err := NewDevice(spiBus, 1, 10, true) if err != nil { panic(err) } + print(rfm) }