Cleanup and reorganization
This commit is contained in:
1 parent
0af5c11e6d
commit
2107b9c990
20 files changed
+158
-215
No files matched your search
+8
-28
@@ -2,6 +2,7 @@ package day_10_test
|
||||
|
||||
import (
|
||||
"advent_of_code_2024/day_10"
|
||||
"advent_of_code_2024/helpers"
|
||||
_ "embed"
|
||||
"testing"
|
||||
)
|
||||
@@ -22,50 +23,29 @@ var ExampleData03 string
|
||||
var ExampleData04 string
|
||||
|
||||
func TestBasicSolutionExample(t *testing.T) {
|
||||
result := day_10.SolveBasic(ExampleData)
|
||||
if result != 36 {
|
||||
t.Fatalf("Expected 36 received %d", result)
|
||||
}
|
||||
helpers.Check(t, day_10.SolveBasic, helpers.Format(ExampleData), 36)
|
||||
}
|
||||
|
||||
func TestBasicSolutionExample01(t *testing.T) {
|
||||
result := day_10.SolveBasic(ExampleData01)
|
||||
if result != 2 {
|
||||
t.Fatalf("Expected 2 received %d", result)
|
||||
}
|
||||
helpers.Check(t, day_10.SolveBasic, helpers.Format(ExampleData01), 2)
|
||||
}
|
||||
|
||||
func TestBasicSolutionExample02(t *testing.T) {
|
||||
result := day_10.SolveBasic(ExampleData02)
|
||||
if result != 3 {
|
||||
t.Fatalf("Expected 3 received %d", result)
|
||||
}
|
||||
helpers.Check(t, day_10.SolveBasic, helpers.Format(ExampleData02), 3)
|
||||
}
|
||||
|
||||
func TestBasicSolutionExample03(t *testing.T) {
|
||||
result := day_10.SolveBasic(ExampleData03)
|
||||
if result != 4 {
|
||||
t.Fatalf("Expected 4 received %d", result)
|
||||
}
|
||||
helpers.Check(t, day_10.SolveBasic, helpers.Format(ExampleData03), 4)
|
||||
}
|
||||
|
||||
func TestComplexSolutionExample(t *testing.T) {
|
||||
result := day_10.SolveComplex(ExampleData)
|
||||
if result != 81 {
|
||||
t.Fatalf("Expected 81 received %d", result)
|
||||
}
|
||||
helpers.Check(t, day_10.SolveComplex, helpers.Format(ExampleData), 81)
|
||||
}
|
||||
|
||||
func TestComplexSolutionExample03(t *testing.T) {
|
||||
result := day_10.SolveComplex(ExampleData03)
|
||||
if result != 13 {
|
||||
t.Fatalf("Expected 13 received %d", result)
|
||||
}
|
||||
helpers.Check(t, day_10.SolveComplex, helpers.Format(ExampleData03), 13)
|
||||
}
|
||||
|
||||
func TestComplexSolutionExample04(t *testing.T) {
|
||||
result := day_10.SolveComplex(ExampleData04)
|
||||
if result != 227 {
|
||||
t.Fatalf("Expected 227 received %d", result)
|
||||
}
|
||||
helpers.Check(t, day_10.SolveComplex, helpers.Format(ExampleData04), 227)
|
||||
}
|
||||
Reference in new issue
Block a user