Browse Source

resizing: update test

pull/279/head
tnextday 10 years ago
parent
commit
848b86438f
  1. 17
      go/images/resizing_test.go

17
go/images/resizing_test.go

@ -1,16 +1,25 @@
package images
import (
"testing"
"io/ioutil"
"testing"
)
func TestResizing(t *testing.T) {
fname := "sample1.png"
data, _ := ioutil.ReadFile(fname)
new_data, _, _ := Resized(".jpg", data, 500, 0)
ioutil.WriteFile("resized.jpg", new_data, 0644)
}
func BenchmarkResizing(b *testing.B){
fName := "sample1.jpg"
func BenchmarkResizing(b *testing.B) {
fName := "test1.png"
data, _ := ioutil.ReadFile(fName)
ext := "jpg"
ext := ".jpg"
w := 0
h := 355
b.ResetTimer()

Loading…
Cancel
Save