Cleanup and reorganization
This commit is contained in:
1 parent
0af5c11e6d
commit
2107b9c990
20 files changed
+158
-215
No files matched your search
+15
-29
@@ -2,6 +2,7 @@ package day_08_test
|
||||
|
||||
import (
|
||||
"advent_of_code_2024/day_08"
|
||||
"advent_of_code_2024/helpers"
|
||||
_ "embed"
|
||||
"testing"
|
||||
)
|
||||
@@ -19,36 +20,21 @@ var ExampleData02 string
|
||||
var ExampleData03 string
|
||||
|
||||
func TestBasicSolutionExample(t *testing.T) {
|
||||
result := day_08.SolveBasic(ExampleData)
|
||||
if result != 14 {
|
||||
t.Fatalf("Expected 14 received %d", result)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBasicSolutionExample01(t *testing.T) {
|
||||
result := day_08.SolveBasic(ExampleData01)
|
||||
if result != 2 {
|
||||
t.Fatalf("Expected 2 received %d", result)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBasicSolutionExample02(t *testing.T) {
|
||||
result := day_08.SolveBasic(ExampleData02)
|
||||
if result != 4 {
|
||||
t.Fatalf("Expected 4 received %d", result)
|
||||
}
|
||||
}
|
||||
|
||||
func TestComplexSolutionExample03(t *testing.T) {
|
||||
result := day_08.SolveComplex(ExampleData03)
|
||||
if result != 9 {
|
||||
t.Fatalf("Expected 9 received %d", result)
|
||||
}
|
||||
helpers.Check(t, day_08.SolveBasic, helpers.Format(ExampleData), 14)
|
||||
}
|
||||
|
||||
func TestComplexSolutionExample(t *testing.T) {
|
||||
result := day_08.SolveComplex(ExampleData)
|
||||
if result != 34 {
|
||||
t.Fatalf("Expected 34 received %d", result)
|
||||
}
|
||||
helpers.Check(t, day_08.SolveComplex, helpers.Format(ExampleData), 34)
|
||||
}
|
||||
|
||||
func TestBasicSolutionExample01(t *testing.T) {
|
||||
helpers.Check(t, day_08.SolveBasic, helpers.Format(ExampleData01), 2)
|
||||
}
|
||||
|
||||
func TestBasicSolutionExample02(t *testing.T) {
|
||||
helpers.Check(t, day_08.SolveBasic, helpers.Format(ExampleData02), 4)
|
||||
}
|
||||
|
||||
func TestComplexSolutionExample03(t *testing.T) {
|
||||
helpers.Check(t, day_08.SolveComplex, helpers.Format(ExampleData03), 9)
|
||||
}
|
||||
Reference in new issue
Block a user