25 lines
462 B
Go
25 lines
462 B
Go
|
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)
|
||
|
}
|
||
|
}
|