add some small performance stuff

This commit is contained in:
sentriz
2019-07-04 14:09:24 +01:00
parent f4b766e86d
commit e3ef5fa5e2
2 changed files with 14 additions and 7 deletions

View File

@@ -7,7 +7,11 @@ import (
)
func egAlbum(id int) *model.Album {
return &model.Album{IDBase: model.IDBase{id}}
return &model.Album{
IDBase: model.IDBase{
ID: id,
},
}
}
func TestFolderStack(t *testing.T) {
@@ -19,8 +23,8 @@ func TestFolderStack(t *testing.T) {
expected := "[6, 5, 4, 3, ]"
actual := sta.String()
if expected != actual {
t.Errorf("first stack: expected string %q, got %q",
expected, actual)
t.Errorf("first stack: expected string "+
"%q, got %q", expected, actual)
}
//
sta = &Stack{}
@@ -34,7 +38,7 @@ func TestFolderStack(t *testing.T) {
expected = "[6, 5, 4, 27, ]"
actual = sta.String()
if expected != actual {
t.Errorf("second stack: expected string %q, got %q",
expected, actual)
t.Errorf("second stack: expected string "+
"%q, got %q", expected, actual)
}
}