Skip to content

Commit

Permalink
Remove require from wav test
Browse files Browse the repository at this point in the history
testify requires cgo on linux without certain go debug flags set. We should stop using it.
  • Loading branch information
200sc committed Aug 15, 2020
1 parent 21b3409 commit 5274033
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions wav/wav_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,23 @@ import (
"os"
"testing"
"time"

"github.com/stretchr/testify/require"
)

func TestBasicWav(t *testing.T) {
fmt.Println("Running Basic Wav")
f, err := os.Open("test.wav")
fmt.Println(f)
require.Nil(t, err)
if err != nil {
t.Fatal("expected open err to be nil, was", err)
}
a, err := Load(f)
require.Nil(t, err)
if err != nil {
t.Fatal("expected load err to be nil, was", err)
}
err = <-a.Play()
require.Nil(t, err)
if err != nil {
t.Fatal("expected play err to be nil, was", err)
}
time.Sleep(4 * time.Second)
// In addition to the error tests here, this should play noise
}

0 comments on commit 5274033

Please sign in to comment.