test: add p2 unit test

This commit is contained in:
2025-11-28 16:47:52 +01:00
parent 2d6c89d7c9
commit 950eec898e

View File

@@ -21,3 +21,23 @@ func TestPartOne(t *testing.T) {
})
}
}
func TestPartTwo(t *testing.T) {
tests := []struct {
name string
input string
expected int
}{
{"2x3x4", "2x3x4", 34},
{"1x1x10", "1x1x10", 14},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got := PartTwo([]string{tt.input})
if got != tt.expected {
t.Errorf("PartTwo(%q) = %d, want %d", tt.input, got, tt.expected)
}
})
}
}