day 8 work and jumbled together

This commit is contained in:
RussellChamp committed 2021-12-08 16:31:05 -05:00
1 parent e76cb1a355
commit c7ea0afedc
18 files changed
+457 -21

No files matched your search

+2 -2
View File
@@ -37,8 +37,8 @@ func part1() {
fmt.Println(" Answer: How many measurements are larger than the previous measurement?")
input, err := os.Open("./input.txt")
defer input.Close()
check(err)
defer input.Close()
scanner := bufio.NewScanner(input)
@@ -67,8 +67,8 @@ func part2() {
fmt.Println(" Answer: How many sums are larger than the previous sum?")
input, err := os.Open("./input.txt")
defer input.Close()
check(err)
defer input.Close()
scanner := bufio.NewScanner(input)
+3 -3
View File
@@ -1,14 +1,14 @@
package main
import (
assert "AoC2021/utils/testing"
"AoC2021/utils/assert"
"testing"
)
func TestPrintPip(t *testing.T) {
DEBUG = false
str := GetPip(1, 1, 1, 100)
assert.StrEquals(t, str, "", "Should return an empty string")
assert.EqualsStr(t, str, "", "Should return an empty string")
DEBUG = true
cases := []struct {
@@ -24,7 +24,7 @@ func TestPrintPip(t *testing.T) {
for _, c := range cases {
str := GetPip(c.first, c.previous, c.current, c.total)
assert.StrEquals(t, str, c.expected, c.msg)
assert.EqualsStr(t, str, c.expected, c.msg)
}
}