mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-11 00:10:27 -07:00
fix(type_test): use string formatting
This commit is contained in:
parent
6837999321
commit
1f5f95c3c8
2 changed files with 5 additions and 4 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue