Skip to content

Commit

Permalink
Use Add(Picture/Comment...)Frame funcs in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
n10v committed Aug 27, 2016
1 parent 7b84e16 commit 73e9908
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func BenchmarkSetCommonCase(b *testing.B) {
Description: "Front cover",
Picture: frontCover,
}
tag.AddFrame(tag.ID("Attached picture"), pic)
tag.AddAttachedPicture(pic)

if err = tag.Save(); err != nil {
b.Error("Error while closing a tag: ", err)
Expand Down Expand Up @@ -66,7 +66,7 @@ func BenchmarkSetManyFrames(b *testing.B) {
Description: "Front cover",
Picture: frontCover,
}
tag.AddFrame(tag.ID("Attached picture"), pic)
tag.AddAttachedPicture(pic)

// Setting USLT
uslt := UnsynchronisedLyricsFrame{
Expand All @@ -75,7 +75,7 @@ func BenchmarkSetManyFrames(b *testing.B) {
ContentDescriptor: "Content descriptor",
Lyrics: "bogem/id3v2",
}
tag.AddFrame(tag.ID("Unsynchronised lyrics/text transcription"), uslt)
tag.AddUnsynchronisedLyricsFrame(uslt)

// Setting comment
comm := CommentFrame{
Expand All @@ -84,7 +84,7 @@ func BenchmarkSetManyFrames(b *testing.B) {
Description: "Short description",
Text: "The actual text",
}
tag.AddFrame(tag.ID("Comments"), comm)
tag.AddCommentFrame(comm)

if err = tag.Save(); err != nil {
b.Error("Error while closing a tag: ", err)
Expand Down
12 changes: 6 additions & 6 deletions tag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ func TestSetTags(t *testing.T) {

// Setting picture frames
resetPictureReaders()
tag.AddFrame(tag.ID("Attached picture"), frontCover)
tag.AddFrame(tag.ID("Attached picture"), backCover)
tag.AddAttachedPicture(frontCover)
tag.AddAttachedPicture(backCover)

// Setting USLTs
tag.AddFrame(tag.ID("Unsynchronised lyrics/text transcription"), engUSLF)
tag.AddFrame(tag.ID("Unsynchronised lyrics/text transcription"), gerUSLF)
tag.AddUnsynchronisedLyricsFrame(engUSLF)
tag.AddUnsynchronisedLyricsFrame(gerUSLF)

// Setting comments
tag.AddFrame(tag.ID("Comments"), engComm)
tag.AddFrame(tag.ID("Comments"), gerComm)
tag.AddCommentFrame(engComm)
tag.AddCommentFrame(gerComm)

if err = tag.Save(); err != nil {
t.Error("Error while saving a tag: ", err)
Expand Down

0 comments on commit 73e9908

Please sign in to comment.