From 908e8c14fb28c1d108865084458b5d2ca762630f Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Fri, 11 Aug 2023 14:31:51 +0200 Subject: [PATCH] Commented out image writer tests cuz i gotta think of a good way to do them :) --- io/writer/image_test.go | 126 ++++++++++++++++++++-------------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/io/writer/image_test.go b/io/writer/image_test.go index 8dc3860..a3d7807 100644 --- a/io/writer/image_test.go +++ b/io/writer/image_test.go @@ -9,67 +9,67 @@ import ( ) func TestImageWriter(t *testing.T) { - pathGradient, err := colorgrad.NewGradient().Colors(color.White).Build() - if err != nil { - panic(err) - } - - tests := []struct { - name string - filename string - m *maze.SolvedMaze - CellWidth, cellHeight int - pathColor, wallColor color.Color - gradient colorgrad.Gradient - }{ - { - "Trivial", - "../../out/trivial_sol.png", - trivial(), - 40, 40, - color.White, color.Black, - colorgrad.Warm(), - }, - { - "Bigger", - "../../out/bigger_sol.png", - bigger(), - 40, 40, - color.White, color.Black, - colorgrad.Warm(), - }, - { - "Bigger Staggered", - "../../out/bigger_staggered_sol.png", - bigger_staggered(), - 40, 40, - color.White, color.Black, - pathGradient, - }, - { - "Normal", - "../../out/normal_sol.png", - normal(), - 40, 40, - color.White, color.Black, - colorgrad.Warm(), - }, - } - - for _, test := range tests { - writer := ImageWriter{ - Filename: test.filename, - Maze: test.m, - CellWidth: test.CellWidth, - CellHeight: test.cellHeight, - WallColor: test.wallColor, - PathColor: test.pathColor, - SolutionGradient: test.gradient, - } - - err := writer.Write() - if err != nil { - t.Fatalf("%s: couldn't write solution, got following error\n%v", test.name, err) - } - } + // pathGradient, err := colorgrad.NewGradient().Colors(color.White).Build() + // if err != nil { + // panic(err) + // } + // + // tests := []struct { + // name string + // filename string + // m *maze.SolvedMaze + // CellWidth, cellHeight int + // pathColor, wallColor color.Color + // gradient colorgrad.Gradient + // }{ + // { + // "Trivial", + // "../../out/trivial_sol.png", + // trivial(), + // 40, 40, + // color.White, color.Black, + // colorgrad.Warm(), + // }, + // { + // "Bigger", + // "../../out/bigger_sol.png", + // bigger(), + // 40, 40, + // color.White, color.Black, + // colorgrad.Warm(), + // }, + // { + // "Bigger Staggered", + // "../../out/bigger_staggered_sol.png", + // bigger_staggered(), + // 40, 40, + // color.White, color.Black, + // pathGradient, + // }, + // { + // "Normal", + // "../../out/normal_sol.png", + // normal(), + // 40, 40, + // color.White, color.Black, + // colorgrad.Warm(), + // }, + // } + // + // for _, test := range tests { + // writer := ImageWriter{ + // Filename: test.filename, + // Maze: test.m, + // CellWidth: test.CellWidth, + // CellHeight: test.cellHeight, + // WallColor: test.wallColor, + // PathColor: test.pathColor, + // SolutionGradient: test.gradient, + // } + // + // err := writer.Write() + // if err != nil { + // t.Fatalf("%s: couldn't write solution, got following error\n%v", test.name, err) + // } + // } }