advent_of_code_2024/day_10/solution_test.go

52 lines
1.2 KiB
Go
Raw Permalink Normal View History

2024-12-10 09:13:42 +00:00
package day_10_test
import (
"advent_of_code_2024/day_10"
2024-12-12 21:12:54 +00:00
"advent_of_code_2024/helpers"
2024-12-10 09:13:42 +00:00
_ "embed"
"testing"
)
//go:embed example_data.txt
var ExampleData string
//go:embed example_data_01.txt
var ExampleData01 string
//go:embed example_data_02.txt
var ExampleData02 string
//go:embed example_data_03.txt
var ExampleData03 string
2024-12-10 09:22:05 +00:00
//go:embed example_data_04.txt
var ExampleData04 string
2024-12-10 09:13:42 +00:00
func TestBasicSolutionExample(t *testing.T) {
2024-12-12 21:12:54 +00:00
helpers.Check(t, day_10.SolveBasic, helpers.Format(ExampleData), 36)
2024-12-10 09:13:42 +00:00
}
func TestBasicSolutionExample01(t *testing.T) {
2024-12-12 21:12:54 +00:00
helpers.Check(t, day_10.SolveBasic, helpers.Format(ExampleData01), 2)
2024-12-10 09:13:42 +00:00
}
func TestBasicSolutionExample02(t *testing.T) {
2024-12-12 21:12:54 +00:00
helpers.Check(t, day_10.SolveBasic, helpers.Format(ExampleData02), 3)
2024-12-10 09:13:42 +00:00
}
func TestBasicSolutionExample03(t *testing.T) {
2024-12-12 21:12:54 +00:00
helpers.Check(t, day_10.SolveBasic, helpers.Format(ExampleData03), 4)
2024-12-10 09:13:42 +00:00
}
func TestComplexSolutionExample(t *testing.T) {
2024-12-12 21:12:54 +00:00
helpers.Check(t, day_10.SolveComplex, helpers.Format(ExampleData), 81)
2024-12-10 09:22:05 +00:00
}
func TestComplexSolutionExample03(t *testing.T) {
2024-12-12 21:12:54 +00:00
helpers.Check(t, day_10.SolveComplex, helpers.Format(ExampleData03), 13)
2024-12-10 09:22:05 +00:00
}
func TestComplexSolutionExample04(t *testing.T) {
2024-12-12 21:12:54 +00:00
helpers.Check(t, day_10.SolveComplex, helpers.Format(ExampleData04), 227)
2024-12-10 09:13:42 +00:00
}