Files
advent-of-code/2020/day01/main_test.go
2025-11-24 12:47:34 +01:00

22 lines
462 B
Go

package main
import "testing"
func TestPartOne(t *testing.T) {
input := []int{1721, 979, 366, 299, 675, 1456}
expected := 514579
got := PartOne(input)
if got != expected {
t.Errorf("PartOne(%v) = %d, want %d", input, got, expected)
}
}
func TestPartTwo(t *testing.T) {
input := []int{1721, 979, 366, 299, 675, 1456}
expected := 241861950
got := PartTwo(input)
if got != expected {
t.Errorf("PartTwo(%v) = %d, want %d", input, got, expected)
}
}