encoder simple Compress test

This commit is contained in:
zyxar 2015-08-19 11:19:51 +08:00
parent 193b38ec0e
commit 8ccc7eb449

22
encoder_test.go Normal file
View 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)
}
}