test: unit test for part one
This commit is contained in:
22
internal/2025/DayNine/code_test.go
Normal file
22
internal/2025/DayNine/code_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package daynine
|
||||
|
||||
import "testing"
|
||||
|
||||
var testInput = []string{
|
||||
"7,1",
|
||||
"11,1",
|
||||
"11,7",
|
||||
"9,7",
|
||||
"9,5",
|
||||
"2,5",
|
||||
"2,3",
|
||||
"7,3",
|
||||
}
|
||||
|
||||
func TestPartOne(t *testing.T) {
|
||||
expected := 50
|
||||
got := PartOne(testInput)
|
||||
if got != expected {
|
||||
t.Errorf("PartOne() = %d, want %d", got, expected)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user