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/day2/main_test.go
Normal file
20
2021/day2/main_test.go
Normal 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)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue