advent_of_code_2024/day_01/solution_test.go

25 lines
473 B
Go
Raw Normal View History

2024-12-01 09:55:43 +00:00
package day_01_test
import (
"advent_of_code_2024/day_01"
_ "embed"
"testing"
)
//go:embed example_data.txt
var BasicExampleData string
func TestBasicSolutionExample(t *testing.T) {
result := day_01.SolveBasic(BasicExampleData)
if result != 11 {
t.Fatalf("Expected 11 received %d", result)
}
}
func TestComplexSolutionExample(t *testing.T) {
result := day_01.SolveComplex(BasicExampleData)
if result != 31 {
t.Fatalf("Expected 31 received %d", result)
}
}