advent_of_code_2024/day_06/solution_test.go

25 lines
456 B
Go
Raw Normal View History

2024-12-06 21:41:21 +00:00
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)
2024-12-08 12:25:17 +00:00
if result != 6 {
t.Fatalf("Expected 6 received %d", result)
2024-12-06 21:41:21 +00:00
}
}