encoder simple Compress test
This commit is contained in:
parent
193b38ec0e
commit
8ccc7eb449
22
encoder_test.go
Normal file
22
encoder_test.go
Normal file
|
@ -0,0 +1,22 @@
|
|||
package tta
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCompress(t *testing.T) {
|
||||
infile, err := os.Open("./data/sample.wav")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer infile.Close()
|
||||
outfile, err := os.Create(os.TempDir() + "/sample_compressed.tta")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer outfile.Close()
|
||||
if err = Compress(infile, outfile, "", nil); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue