2021/03 part 1 finished started with part 2
This commit is contained in:
parent
55c353b141
commit
2d8a3d5780
3 changed files with 140 additions and 28 deletions
|
@ -4,8 +4,23 @@ import "testing"
|
|||
|
||||
func TestPart1(t *testing.T) {
|
||||
const expected = 198
|
||||
result := Part1(GetData("./test-data"))
|
||||
result := Part1(ConvertToUsefulData(GetData("./test-data")))
|
||||
if result != expected {
|
||||
t.Fatalf("Expected: %d Result: %d", expected, result)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPart2Oxygen(t *testing.T) {
|
||||
const expected = 23
|
||||
oxygen, _ := Part2(ConvertToUsefulData(GetData("./test-data")))
|
||||
if oxygen != expected {
|
||||
t.Fatalf("Expected: %d Result: %d", expected, oxygen)
|
||||
}
|
||||
}
|
||||
func TestPart2Co2Scrubber(t *testing.T) {
|
||||
const expected = 10
|
||||
_, co2Scrubber := Part2(ConvertToUsefulData(GetData("./test-data")))
|
||||
if co2Scrubber != expected {
|
||||
t.Fatalf("Expected: %d Result: %d", expected, co2Scrubber)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue