Added Test
This commit is contained in:
parent
ee64ad9d61
commit
437c1495f5
1 changed files with 4 additions and 6 deletions
|
@ -1,7 +1,6 @@
|
||||||
package rfm69
|
package rfm69
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/kidoman/embd"
|
"github.com/kidoman/embd"
|
||||||
|
@ -9,10 +8,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRfm69(t *testing.T) {
|
func TestRfm69(t *testing.T) {
|
||||||
fmt.Print("Test")
|
t.Log("Test")
|
||||||
|
|
||||||
if err := embd.InitSPI(); err != nil {
|
if err := embd.InitSPI(); err != nil {
|
||||||
panic(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
defer embd.CloseSPI()
|
defer embd.CloseSPI()
|
||||||
|
|
||||||
|
@ -21,7 +19,7 @@ func TestRfm69(t *testing.T) {
|
||||||
|
|
||||||
rfm, err := NewDevice(spiBus, 1, 10, true)
|
rfm, err := NewDevice(spiBus, 1, 10, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
print(rfm)
|
t.Log(rfm)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue