test: add unit test for part one
This commit is contained in:
25
internal/2025/DayFive/code_test.go
Normal file
25
internal/2025/DayFive/code_test.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package dayfive
|
||||
|
||||
import "testing"
|
||||
|
||||
var testInput = []string{
|
||||
"3-5",
|
||||
"10-14",
|
||||
"16-20",
|
||||
"12-18",
|
||||
"",
|
||||
"1",
|
||||
"5",
|
||||
"8",
|
||||
"11",
|
||||
"17",
|
||||
"32",
|
||||
}
|
||||
|
||||
func TestPartOne(t *testing.T) {
|
||||
expected := 3
|
||||
got := PartOne(testInput)
|
||||
if got != expected {
|
||||
t.Errorf("PartOne() = %d, want %d", got, expected)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user