From 3481ed70ea3c89a065fd682edf610d31b88ad4a2 Mon Sep 17 00:00:00 2001 From: qeesung <1245712564@qq.com> Date: Fri, 26 Oct 2018 23:10:30 +0800 Subject: [PATCH] Add some comments --- convert/convert_test.go | 2 ++ convert/resize_test.go | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/convert/convert_test.go b/convert/convert_test.go index 62fdfa3..6710b66 100644 --- a/convert/convert_test.go +++ b/convert/convert_test.go @@ -94,6 +94,7 @@ func TestImageFile2ASCIIString(t *testing.T) { } +// BenchmarkBigImage2ASCIIMatrix benchmark convert big image to ascii func BenchmarkBigImage2ASCIIMatrix(b *testing.B) { convertOptions := DefaultOptions convertOptions.FitScreen = false @@ -106,6 +107,7 @@ func BenchmarkBigImage2ASCIIMatrix(b *testing.B) { } } +// BenchmarkSmallImage2ASCIIMatrix benchmark convert small image to ascii func BenchmarkSmallImage2ASCIIMatrix(b *testing.B) { convertOptions := DefaultOptions convertOptions.FitScreen = false diff --git a/convert/resize_test.go b/convert/resize_test.go index aaafa13..3820cd1 100644 --- a/convert/resize_test.go +++ b/convert/resize_test.go @@ -161,7 +161,7 @@ func ExampleScaleImage() { // output: 200 100 } -// BenchmarkScaleImage benchmark scale image test scale image +// BenchmarkScaleImage benchmark scale big image func BenchmarkScaleBigImage(b *testing.B) { imageFilePath := "testdata/cat_2000x1500.jpg" img, err := OpenImageFile(imageFilePath) @@ -180,6 +180,7 @@ func BenchmarkScaleBigImage(b *testing.B) { } } +// BenchmarkScaleSmallImage benchmark scale small image func BenchmarkScaleSmallImage(b *testing.B) { imageFilePath := "testdata/husky_200x200.jpg" img, err := OpenImageFile(imageFilePath) -- 2.45.2