Skip to content

Commit

Permalink
test: fix return handling in TestCodecFloat32
Browse files Browse the repository at this point in the history
This test was actually failing in a darwin VM. The comment was correct.
  • Loading branch information
hraban committed Jun 21, 2024
1 parent 0188a62 commit e008a6d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions opus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ func TestCodecFloat32(t *testing.T) {
if err != nil || dec == nil {
t.Fatalf("Error creating new decoder: %v", err)
}
// TODO: Uh-oh.. it looks like I forgot to put a data = data[:n] here, yet
// the test is not failing. Why?
n, err = dec.DecodeFloat32(data, pcm)
n, err = dec.DecodeFloat32(data[:n], pcm)
if err != nil {
t.Fatalf("Couldn't decode data: %v", err)
}
Expand Down

0 comments on commit e008a6d

Please sign in to comment.