41 lines
950 B
Go
41 lines
950 B
Go
package day_08_test
|
|
|
|
import (
|
|
"advent_of_code_2024/day_08"
|
|
"advent_of_code_2024/helpers"
|
|
_ "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) {
|
|
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)
|
|
}
|
|
|
|
func TestBasicSolutionExample01(t *testing.T) {
|
|
helpers.Check(t, day_08.SolveBasic, helpers.Format(ExampleData01), 2)
|
|
}
|
|
|
|
func TestBasicSolutionExample02(t *testing.T) {
|
|
helpers.Check(t, day_08.SolveBasic, helpers.Format(ExampleData02), 4)
|
|
}
|
|
|
|
func TestComplexSolutionExample03(t *testing.T) {
|
|
helpers.Check(t, day_08.SolveComplex, helpers.Format(ExampleData03), 9)
|
|
}
|