test: unit test for part one
This commit is contained in:
18
internal/2025/DaySix/code_test.go
Normal file
18
internal/2025/DaySix/code_test.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package daysix
|
||||
|
||||
import "testing"
|
||||
|
||||
var testInput = []string{
|
||||
"123 328 51 64 ",
|
||||
" 45 64 387 23 ",
|
||||
" 6 98 215 314",
|
||||
"* + * + ",
|
||||
}
|
||||
|
||||
func TestPartOne(t *testing.T) {
|
||||
expected := 4277556
|
||||
got := PartOne(testInput)
|
||||
if got != expected {
|
||||
t.Errorf("PartOne() = %d, want %d", got, expected)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user