day1 and 2 done & setup for day3

This commit is contained in:
ZennDev1337 2023-11-15 13:28:22 +01:00
parent 5053b3cbbd
commit be09a5df2c
26 changed files with 2520 additions and 2 deletions

20
2021/day2/main_test.go Normal file
View file

@ -0,0 +1,20 @@
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)
}
}