advent_of_code_2024/day_02/solution_test.go

25 lines
454 B
Go

package day_02_test
import (
"advent_of_code_2024/day_02"
_ "embed"
"testing"
)
//go:embed example_data.txt
var ExampleData string
func TestBasicSolutionExample(t *testing.T) {
result := day_02.SolveBasic(ExampleData)
if result != 2 {
t.Fatalf("Expected 2 received %d", result)
}
}
func TestComplexSolutionExample(t *testing.T) {
result := day_02.SolveComplex(ExampleData)
if result != 4 {
t.Fatalf("Expected 4 received %d", result)
}
}