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/day1/main_test.go Normal file
View file

@ -0,0 +1,20 @@
package main
import "testing"
func TestCountIncreasesTestData(t *testing.T) {
data := LoadData("./test-data")
count := 7
if c := CountIncreases(&data); c != count {
t.Fatalf("Testnumber: %d Result: %d", count, c)
}
}
func TestMutateDataPart2(t *testing.T) {
data := LoadData("./test-data")
data = MutateDataPart2(data)
count := 5
if c := CountIncreases(&data); c != count {
t.Fatalf("Testnumber: %d Result: %d", count, c)
}
}