Skip to content

Commit

Permalink
Add generated source file containing test data.
Browse files Browse the repository at this point in the history
  • Loading branch information
upperstream authored and dhowden committed Jul 16, 2016
1 parent abfb486 commit f16224d
Show file tree
Hide file tree
Showing 3 changed files with 355 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

5 changes: 3 additions & 2 deletions id3v1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
package tag

import (
"./id3v1_test"
"bytes"
"testing"
)

//go:generate go-bindata -o id3v1_testdata.go -pkg tag -ignore .txt id3v1_test
//go:generate go-bindata -o id3v1_test/id3v1_testdata.go -pkg id3v1_test -ignore .txt -ignore .go id3v1_test

func TestReadID3v1Tags(t *testing.T) {
for _, name := range []string{
Expand All @@ -27,7 +28,7 @@ func TestReadID3v1Tags(t *testing.T) {
}

func doTest(name string, track int, length int, t *testing.T) {
mp3 := MustAsset(name)
mp3 := id3v1_test.MustAsset(name)
metadata, _ := ReadID3v1Tags(bytes.NewReader(mp3))
if actual, total := metadata.Track(); actual != track || total != 0 {
t.Errorf("Track number for %s is (%d, %d) where (%d, 0) is expected.", name, actual, total, track)
Expand Down
352 changes: 352 additions & 0 deletions id3v1_test/id3v1_testdata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f16224d

Please sign in to comment.