25 lines
544 B
Go
25 lines
544 B
Go
package dayfifteen
|
|
|
|
import "testing"
|
|
|
|
var testInput = []string{
|
|
"Butterscotch: capacity -1, durability -2, flavor 6, texture 3, calories 8",
|
|
"Cinnamon: capacity 2, durability 3, flavor -2, texture -1, calories 3",
|
|
}
|
|
|
|
func TestPartOne(t *testing.T) {
|
|
expected := 62842880
|
|
got := PartOne(testInput)
|
|
if got != expected {
|
|
t.Errorf("PartOne() = %d, want %d", got, expected)
|
|
}
|
|
}
|
|
|
|
func TestPartTwo(t *testing.T) {
|
|
expected := 57600000
|
|
got := PartTwo(testInput)
|
|
if got != expected {
|
|
t.Errorf("PartTwo() = %d, want %d", got, expected)
|
|
}
|
|
}
|