test: add unit test for part one
This commit is contained in:
18
internal/2025/DayThree/code_test.go
Normal file
18
internal/2025/DayThree/code_test.go
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package daythree
|
||||||
|
|
||||||
|
import "testing"
|
||||||
|
|
||||||
|
var testInput = []string{
|
||||||
|
"987654321111111",
|
||||||
|
"811111111111119",
|
||||||
|
"234234234234278",
|
||||||
|
"818181911112111",
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestPartOne(t *testing.T) {
|
||||||
|
expected := 357
|
||||||
|
got := PartOne(testInput)
|
||||||
|
if got != expected {
|
||||||
|
t.Errorf("PartOne() = %d, want %d", got, expected)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user