advent_of_code_2024/day_09/solution_test.go

25 lines
466 B
Go
Raw Normal View History

2024-12-09 22:53:46 +00:00
package day_09_test
import (
"advent_of_code_2024/day_09"
_ "embed"
"testing"
)
//go:embed example_data.txt
var ExampleData string
func TestBasicSolutionExample(t *testing.T) {
result := day_09.SolveBasic(ExampleData)
if result != 1928 {
t.Fatalf("Expected 1928 received %d", result)
}
}
func TestComplexSolutionExample(t *testing.T) {
result := day_09.SolveComplex(ExampleData)
if result != 2858 {
t.Fatalf("Expected 2858 received %d", result)
}
}