fix(type_test): use string formatting

This commit is contained in:
Tomas Aparicio 2017-11-14 11:43:31 +01:00
parent 6837999321
commit 1f5f95c3c8
2 changed files with 5 additions and 4 deletions

View file

@ -90,6 +90,7 @@ func resizer(buf []byte, o Options) ([]byte, error) {
}
// Transform image, if necessary
fmt.Printf("should transform: %#v", shouldTransformImage(o, inWidth, inHeight))
if shouldTransformImage(o, inWidth, inHeight) {
image, err = transformImage(image, o, shrink, residual)
if err != nil {

View file

@ -68,7 +68,7 @@ func TestIsTypeSupported(t *testing.T) {
for _, n := range types {
if IsTypeSupported(n.name) == false {
t.Fatalf("Image type %#v is not valid", ImageTypes[n.name])
t.Fatalf("Image type %s is not valid", ImageTypes[n.name])
}
}
}
@ -87,7 +87,7 @@ func TestIsTypeNameSupported(t *testing.T) {
for _, n := range types {
if IsTypeNameSupported(n.name) != n.expected {
t.Fatalf("Image type %#v is not valid", n.name)
t.Fatalf("Image type %s is not valid", n.name)
}
}
}
@ -104,7 +104,7 @@ func TestIsTypeSupportedSave(t *testing.T) {
for _, n := range types {
if IsTypeSupportedSave(n.name) == false {
t.Fatalf("Image type %#v is not valid", ImageTypes[n.name])
t.Fatalf("Image type %s is not valid", ImageTypes[n.name])
}
}
}
@ -124,7 +124,7 @@ func TestIsTypeNameSupportedSave(t *testing.T) {
for _, n := range types {
if IsTypeNameSupportedSave(n.name) != n.expected {
t.Fatalf("Image type %#v is not valid", n.name)
t.Fatalf("Image type %s is not valid", n.name)
}
}
}