advent_of_code_2024/day_03/solution_test.go

28 lines
534 B
Go
Raw Normal View History

2024-12-03 19:05:59 +00:00
package day_03_test
import (
"advent_of_code_2024/day_03"
_ "embed"
"testing"
)
//go:embed example_data.txt
var ExampleData string
//go:embed complex_example_data.txt
var ComplexExampleData string
func TestBasicSolutionExample(t *testing.T) {
result := day_03.SolveBasic(ExampleData)
if result != 161 {
t.Fatalf("Expected 161 received %d", result)
}
}
func TestComplexSolutionExample(t *testing.T) {
result := day_03.SolveComplex(ComplexExampleData)
if result != 48 {
t.Fatalf("Expected 48 received %d", result)
}
}