21 lines
418 B
Go
21 lines
418 B
Go
|
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)
|
||
|
}
|
||
|
}
|