25 lines
460 B
Go
25 lines
460 B
Go
|
package day_06_test
|
||
|
|
||
|
import (
|
||
|
"advent_of_code_2024/day_06"
|
||
|
_ "embed"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
//go:embed example_data.txt
|
||
|
var ExampleData string
|
||
|
|
||
|
func TestBasicSolutionExample(t *testing.T) {
|
||
|
result := day_06.SolveBasic(ExampleData)
|
||
|
if result != 41 {
|
||
|
t.Fatalf("Expected 41 received %d", result)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func TestComplexSolutionExample(t *testing.T) {
|
||
|
result := day_06.SolveComplex(ExampleData)
|
||
|
if result != 123 {
|
||
|
t.Fatalf("Expected 123 received %d", result)
|
||
|
}
|
||
|
}
|