advent_of_code_2024/day_05/solution_test.go

25 lines
462 B
Go
Raw Normal View History

2024-12-05 18:34:53 +00:00
package day_05_test
import (
"advent_of_code_2024/day_05"
_ "embed"
"testing"
)
//go:embed example_data.txt
var ExampleData string
func TestBasicSolutionExample(t *testing.T) {
result := day_05.SolveBasic(ExampleData)
if result != 143 {
t.Fatalf("Expected 143 received %d", result)
}
}
func TestComplexSolutionExample(t *testing.T) {
result := day_05.SolveComplex(ExampleData)
if result != 123 {
t.Fatalf("Expected 123 received %d", result)
}
}