package main import "testing" func TestPartOne(t *testing.T) { input := []string{ "..##.......", "#...#...#..", ".#....#..#.", "..#.#...#.#", ".#...##..#.", "..#.##.....", ".#.#.#....#", ".#........#", "#.##...#...", "#...##....#", ".#..#...#.#", } expected := 7 got := PartOne(input) if got != expected { t.Errorf("PartOne() = %d, want %d", got, expected) } } func TestPartTwo(t *testing.T) { input := []string{ "..##.......", "#...#...#..", ".#....#..#.", "..#.#...#.#", ".#...##..#.", "..#.##.....", ".#.#.#....#", ".#........#", "#.##...#...", "#...##....#", ".#..#...#.#", } expected := 336 got := PartTwo(input) if got != expected { t.Errorf("PartTwo() = %d, want %d", got, expected) } }