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