Advent-of-Code/2021/day2/main_test.go

21 lines
418 B
Go
Raw Normal View History

2023-11-15 13:28:22 +01:00
package main
import "testing"
func TestPart1(t *testing.T) {
const expected = 150
data := GetData("./test-data")
result := Part1(data)
if result != expected {
t.Fatalf("Return: %d Expects: %d", result, expected)
}
}
func TestPart2(t *testing.T) {
const expected = 900
data := GetData("./test-data")
result := Part2(data)
if result != expected {
t.Fatalf("Return: %d Expects: %d", result, expected)
}
}