package day16 import ( "testing" "gitea.paas.celticinfo.fr/oabrivard/aoc2023/utils" ) func TestPart1(t *testing.T) { lines := []string{ `.|...\....`, `|.-.\.....`, `.....|-...`, `........|.`, `..........`, `.........\`, `..../.\\..`, `.-.-/..|..`, `.|....-|.\`, `..//.|....`, } result := Part1(lines, 0, 0, 'R') if result != 46 { t.Fatalf("expected 46, got %v", result) } } func TestPart1WithInput(t *testing.T) { lines := utils.ReadLines("input.txt") result := Part1(lines, 0, 0, 'R') if result != 8021 { t.Fatalf("expected 8021, got %v", result) } } func TestPart2(t *testing.T) { lines := []string{ `.|...\....`, `|.-.\.....`, `.....|-...`, `........|.`, `..........`, `.........\`, `..../.\\..`, `.-.-/..|..`, `.|....-|.\`, `..//.|....`, } result := Part2(lines) if result != 51 { t.Fatalf("expected 51, got %v", result) } } func TestPart2WithInput(t *testing.T) { lines := utils.ReadLines("input.txt") result := Part2(lines) if result != 8216 { t.Fatalf("expected 8216, got %v", result) } }