Cleanup and reorganization

This commit is contained in:
Borna Rajković committed 2024-12-12 22:12:54 +01:00
1 parent 0af5c11e6d
commit 2107b9c990
20 files changed
+158 -215

No files matched your search

+3 -18
View File
@@ -2,6 +2,7 @@ package day_07_test
import (
"advent_of_code_2024/day_07"
"advent_of_code_2024/helpers"
_ "embed"
"testing"
)
@@ -10,25 +11,9 @@ import (
var ExampleData string
func TestBasicSolutionExample(t *testing.T) {
result := day_07.SolveBasic(ExampleData)
if result != 3749 {
t.Fatalf("Expected 3749 received %d", result)
}
helpers.Check(t, day_07.SolveBasic, helpers.Format(ExampleData), 3749)
}
func TestComplexSolutionExample(t *testing.T) {
result := day_07.SolveComplex(ExampleData)
if result != 11387 {
t.Fatalf("Expected 11387 received %d", result)
}
}
func TestSolvable(t *testing.T) {
if !day_07.Solvable(day_07.Equation{
Result: 27100,
Variables: []int{3, 9, 100},
}, 3) {
t.Fatalf("Expected true")
}
helpers.Check(t, day_07.SolveComplex, helpers.Format(ExampleData), 11387)
}