Do not include test under utils

This commit is contained in:
DataHoarder 2022-05-15 16:36:26 +02:00
parent a5879e37e5
commit 2df65e5ea5
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk
7 changed files with 28 additions and 14 deletions

View file

@ -167,7 +167,7 @@ func TestEncodeAACMP4(t *testing.T) {
}
}
func TestEncodeAACHE(t *testing.T) {
func TestEncodeAACHEv2(t *testing.T) {
t.Parallel()
fp, err := os.Open(test.TestSingleSample24)
if err != nil {

View file

@ -3,8 +3,11 @@
package guess
import "testing"
import (
"git.gammaspectra.live/S.O.N.G/Kirika/test"
"testing"
)
func TestFLACDecode(t *testing.T) {
DoTest(".flac", t)
DoTest(".flac", test.TestSampleLocations, t)
}

View file

@ -1,14 +1,13 @@
package guess
import (
"git.gammaspectra.live/S.O.N.G/Kirika/test"
"os"
"path"
"testing"
)
func DoTest(ext string, t *testing.T) {
for _, location := range test.TestSampleLocations {
func DoTest(ext string, locations []string, t *testing.T) {
for _, location := range locations {
entries, err := os.ReadDir(location)
if err != nil {
t.Error(err)

View file

@ -3,8 +3,11 @@
package guess
import "testing"
import (
"git.gammaspectra.live/S.O.N.G/Kirika/test"
"testing"
)
func TestMP3Decode(t *testing.T) {
DoTest(".mp3", t)
DoTest(".mp3", test.TestSampleLocations, t)
}

View file

@ -3,8 +3,11 @@
package guess
import "testing"
import (
"git.gammaspectra.live/S.O.N.G/Kirika/test"
"testing"
)
func TestOpusDecode(t *testing.T) {
DoTest(".opus", t)
DoTest(".opus", test.TestSampleLocations, t)
}

View file

@ -3,8 +3,11 @@
package guess
import "testing"
import (
"git.gammaspectra.live/S.O.N.G/Kirika/test"
"testing"
)
func TestTTADecode(t *testing.T) {
DoTest(".tta", t)
DoTest(".tta", test.TestSampleLocations, t)
}

View file

@ -3,8 +3,11 @@
package guess
import "testing"
import (
"git.gammaspectra.live/S.O.N.G/Kirika/test"
"testing"
)
func TestVorbisDecode(t *testing.T) {
DoTest(".vorbis", t)
DoTest(".vorbis", test.TestSampleLocations, t)
}