mirror of
https://github.com/Threnklyn/advent-of-code-go.git
synced 2026-05-18 19:13:27 +02:00
42 lines
771 B
Go
42 lines
771 B
Go
package main
|
|
|
|
import "testing"
|
|
|
|
var tests1 = []struct {
|
|
name string
|
|
want int
|
|
input string
|
|
// add extra args if needed
|
|
}{
|
|
// {"actual", ACTUAL_ANSWER, util.ReadFile("input.txt")},
|
|
}
|
|
|
|
func TestPart1(t *testing.T) {
|
|
for _, tt := range tests1 {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
if got := part1(tt.input); got != tt.want {
|
|
t.Errorf("part1() = %v, want %v", got, tt.want)
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|
|
var tests2 = []struct {
|
|
name string
|
|
want int
|
|
input string
|
|
// add extra args if needed
|
|
}{
|
|
// {"actual", ACTUAL_ANSWER, util.ReadFile("input.txt")},
|
|
}
|
|
|
|
func TestPart2(t *testing.T) {
|
|
for _, tt := range tests2 {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
if got := part2(tt.input); got != tt.want {
|
|
t.Errorf("part2() = %v, want %v", got, tt.want)
|
|
}
|
|
})
|
|
}
|
|
}
|