From e008a6d530b97a3c66bfc68efee8be36d07cd9ab Mon Sep 17 00:00:00 2001 From: Hraban Luyat Date: Thu, 20 Jun 2024 23:10:34 -0400 Subject: [PATCH] test: fix return handling in TestCodecFloat32 This test was actually failing in a darwin VM. The comment was correct. --- opus_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/opus_test.go b/opus_test.go index 2f3f3bf..6332ddd 100644 --- a/opus_test.go +++ b/opus_test.go @@ -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) }