2024-12-12 08:16:52 +00:00
|
|
|
package day_12_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"advent_of_code_2024/day_12"
|
2024-12-12 21:12:54 +00:00
|
|
|
"advent_of_code_2024/helpers"
|
2024-12-12 08:16:52 +00:00
|
|
|
_ "embed"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
|
|
|
//go:embed example_data.txt
|
|
|
|
var ExampleData string
|
|
|
|
|
2024-12-12 09:04:22 +00:00
|
|
|
//go:embed example_data_01.txt
|
|
|
|
var ExampleData01 string
|
|
|
|
|
2024-12-12 08:16:52 +00:00
|
|
|
func TestBasicSolutionExample(t *testing.T) {
|
2024-12-12 21:12:54 +00:00
|
|
|
helpers.Check(t, day_12.SolveBasic, helpers.Format(ExampleData), 1930)
|
2024-12-12 08:16:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func TestComplexSolutionExample(t *testing.T) {
|
2024-12-12 21:12:54 +00:00
|
|
|
helpers.Check(t, day_12.SolveComplex, helpers.Format(ExampleData), 1206)
|
2024-12-12 09:04:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func TestComplexSolutionExample01(t *testing.T) {
|
2024-12-12 21:12:54 +00:00
|
|
|
helpers.Check(t, day_12.SolveComplex, helpers.Format(ExampleData01), 80)
|
2024-12-12 08:16:52 +00:00
|
|
|
}
|