Re-enabled text_test.go
This commit is contained in:
parent
b6dff509f9
commit
3d4a2b9bfb
@ -1,33 +1,31 @@
|
||||
package reader
|
||||
|
||||
import (
|
||||
// "maze-solver/maze"
|
||||
// "maze-solver/utils"
|
||||
// "reflect"
|
||||
"maze-solver/utils"
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestTextReadTrivial(t *testing.T) {
|
||||
/*
|
||||
tests := []struct {
|
||||
name string
|
||||
filename string
|
||||
pathChar byte
|
||||
wallChar byte
|
||||
expected *maze.RawMaze
|
||||
expected *RawMaze
|
||||
}{
|
||||
{
|
||||
"Trivial",
|
||||
"../../assets/trivial.txt",
|
||||
' ',
|
||||
'#',
|
||||
&maze.RawMaze{
|
||||
PathChar: ' ',
|
||||
WallChar: '#',
|
||||
Data: []string{
|
||||
"## ##",
|
||||
"# #",
|
||||
"### #",
|
||||
&RawMaze{
|
||||
Width: 5,
|
||||
Height: 3,
|
||||
Data: [][]byte{
|
||||
{0b_00100_000},
|
||||
{0b_01110_000},
|
||||
{0b_00010_000},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -36,15 +34,15 @@ func TestTextReadTrivial(t *testing.T) {
|
||||
"../../assets/trivial-bigger.txt",
|
||||
' ',
|
||||
'#',
|
||||
&maze.RawMaze{
|
||||
PathChar: ' ',
|
||||
WallChar: '#',
|
||||
Data: []string{
|
||||
"### ###",
|
||||
"### ###",
|
||||
"# #",
|
||||
"##### #",
|
||||
"##### #",
|
||||
&RawMaze{
|
||||
Width: 7,
|
||||
Height: 5,
|
||||
Data: [][]byte{
|
||||
{0b_0001000_0},
|
||||
{0b_0001000_0},
|
||||
{0b_0111110_0},
|
||||
{0b_0000010_0},
|
||||
{0b_0000010_0},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -53,15 +51,15 @@ func TestTextReadTrivial(t *testing.T) {
|
||||
"../../assets/trivial-bigger-staggered.txt",
|
||||
' ',
|
||||
'#',
|
||||
&maze.RawMaze{
|
||||
PathChar: ' ',
|
||||
WallChar: '#',
|
||||
Data: []string{
|
||||
"### ###",
|
||||
"### ###",
|
||||
"# #",
|
||||
"#### ##",
|
||||
"#### ##",
|
||||
&RawMaze{
|
||||
Width: 7,
|
||||
Height: 5,
|
||||
Data: [][]byte{
|
||||
{0b_0001000_0},
|
||||
{0b_0001000_0},
|
||||
{0b_0111110_0},
|
||||
{0b_0000100_0},
|
||||
{0b_0000100_0},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -70,21 +68,21 @@ func TestTextReadTrivial(t *testing.T) {
|
||||
"../../assets/normal.txt",
|
||||
' ',
|
||||
'#',
|
||||
&maze.RawMaze{
|
||||
PathChar: ' ',
|
||||
WallChar: '#',
|
||||
Data: []string{
|
||||
"##### #####",
|
||||
"# # #",
|
||||
"##### ### #",
|
||||
"# # #",
|
||||
"# # ##### #",
|
||||
"# # #",
|
||||
"### ### # #",
|
||||
"# # # #",
|
||||
"# ####### #",
|
||||
"# # #",
|
||||
"##### #####",
|
||||
&RawMaze{
|
||||
Width: 11,
|
||||
Height: 11,
|
||||
Data: [][]byte{
|
||||
{0b_00000100, 0b000_00000},
|
||||
{0b_01111101, 0b110_00000},
|
||||
{0b_00000100, 0b010_00000},
|
||||
{0b_01110111, 0b110_00000},
|
||||
{0b_01010000, 0b010_00000},
|
||||
{0b_01011111, 0b110_00000},
|
||||
{0b_00010001, 0b010_00000},
|
||||
{0b_01110111, 0b010_00000},
|
||||
{0b_01000000, 0b010_00000},
|
||||
{0b_01111101, 0b110_00000},
|
||||
{0b_00000100, 0b000_00000},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -104,5 +102,4 @@ func TestTextReadTrivial(t *testing.T) {
|
||||
t.Fatalf("%s: lexed mazes do not match\nGot: %v\nWant: %v", test.name, got, test.expected)
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user