mirror of
https://github.com/Threnklyn/advent-of-code-go.git
synced 2026-05-18 19:13:27 +02:00
30 lines
594 B
Go
30 lines
594 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/alexchao26/advent-of-code-go/util"
|
|
)
|
|
|
|
func Test_cookieScience(t *testing.T) {
|
|
tests := []struct {
|
|
name string
|
|
input string
|
|
want1 int
|
|
want2 int
|
|
}{
|
|
{"actual both parts", util.ReadFile("input.txt"), 13882464, 11171160},
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
got1, got2 := cookieScience(tt.input)
|
|
if got1 != tt.want1 {
|
|
t.Errorf("cookieScience() part1 = %v, want %v", got1, tt.want1)
|
|
}
|
|
if got2 != tt.want2 {
|
|
t.Errorf("cookieScience() part2 = %v, want %v", got2, tt.want2)
|
|
}
|
|
})
|
|
}
|
|
}
|