19 lines
348 B
Go
19 lines
348 B
Go
package dayfour
|
|
|
|
import "testing"
|
|
|
|
var testInput = []string{
|
|
"aaaaa-bbb-z-y-x-123[abxyz]",
|
|
"a-b-c-d-e-f-g-h-987[abcde]",
|
|
"not-a-real-room-404[oarel]",
|
|
"totally-real-room-200[decoy]",
|
|
}
|
|
|
|
func TestPartOne(t *testing.T) {
|
|
expected := 1514
|
|
got := PartOne(testInput)
|
|
if got != expected {
|
|
t.Errorf("PartOne() = %d, want %d", got, expected)
|
|
}
|
|
}
|