day1 and 2 done & setup for day3
This commit is contained in:
parent
5053b3cbbd
commit
be09a5df2c
26 changed files with 2520 additions and 2 deletions
20
2021/day1/main_test.go
Normal file
20
2021/day1/main_test.go
Normal 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)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue