Commit 7f7594ab authored by santiaago's avatar santiaago
Browse files

test draw/squares RandomGrid and RandomGradientGrid

parent 048bb760
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
package squares

import (
	"image"
	"net/http"
	"net/http/httptest"
	"testing"
)

func TestRandomGrid(t *testing.T) {
	img := image.NewRGBA(image.Rect(0, 0, 10, 10))
	RandomGrid(img, colorTheme, 10, float64(0.33))
}

func TestRandomGridSVG(t *testing.T) {
	rec := httptest.NewRecorder()
	RandomGridSVG(rec, colorTheme, 10, 10, 10, float64(50))
@@ -15,6 +21,12 @@ func TestRandomGridSVG(t *testing.T) {

}

func TestRandomGradientGrid(t *testing.T) {
	img := image.NewRGBA(image.Rect(0, 0, 10, 10))
	RandomGradientGrid(img, colorTheme, 10)

}

func TestRandomGradientGridSVG(t *testing.T) {
	rec := httptest.NewRecorder()
	RandomGradientGridSVG(rec, colorTheme, 10, 10, 10)