advent_of_code_2024/day_08/solution_test.go

41 lines
950 B
Go
Raw Normal View History

2024-12-08 16:56:36 +00:00
package day_08_test
import (
"advent_of_code_2024/day_08"
2024-12-12 21:12:54 +00:00
"advent_of_code_2024/helpers"
2024-12-08 16:56:36 +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
func TestBasicSolutionExample(t *testing.T) {
2024-12-12 21:12:54 +00:00
helpers.Check(t, day_08.SolveBasic, helpers.Format(ExampleData), 14)
}
func TestComplexSolutionExample(t *testing.T) {
helpers.Check(t, day_08.SolveComplex, helpers.Format(ExampleData), 34)
2024-12-08 16:56:36 +00:00
}
func TestBasicSolutionExample01(t *testing.T) {
2024-12-12 21:12:54 +00:00
helpers.Check(t, day_08.SolveBasic, helpers.Format(ExampleData01), 2)
2024-12-08 16:56:36 +00:00
}
func TestBasicSolutionExample02(t *testing.T) {
2024-12-12 21:12:54 +00:00
helpers.Check(t, day_08.SolveBasic, helpers.Format(ExampleData02), 4)
2024-12-08 16:56:36 +00:00
}
func TestComplexSolutionExample03(t *testing.T) {
2024-12-12 21:12:54 +00:00
helpers.Check(t, day_08.SolveComplex, helpers.Format(ExampleData03), 9)
2024-12-08 16:56:36 +00:00
}