Files
advent-of-code-go/2020/day15/main_test.go
T
2020-12-15 00:22:41 -05:00

30 lines
662 B
Go

package main
import (
"testing"
"time"
"github.com/alexchao26/advent-of-code-go/util"
)
func Test_rambunctiousRecitation(t *testing.T) {
tests := []struct {
name string
input string
desiredStep int
want int
}{
{"actual", util.ReadFile("input.txt"), 2020, 1259},
{"actual", util.ReadFile("input.txt"), 30000000, 689},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
startTime := time.Now()
if got := rambunctiousRecitation(tt.input, tt.desiredStep); got != tt.want {
t.Errorf("rambunctiousRecitation() = %v, want %v", got, tt.want)
}
t.Log("Op time: ", time.Since(startTime))
})
}
}