test: add unit test for part one
This commit is contained in:
18
internal/2015/DayEight/code_test.go
Normal file
18
internal/2015/DayEight/code_test.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package dayeight
|
||||
|
||||
import "testing"
|
||||
|
||||
var testInput = []string{
|
||||
`""`,
|
||||
`"abc"`,
|
||||
`"aaa\"aaa"`,
|
||||
`"\x27"`,
|
||||
}
|
||||
|
||||
func TestPartOne(t *testing.T) {
|
||||
expected := 12
|
||||
got := PartOne(testInput)
|
||||
if got != expected {
|
||||
t.Errorf("PartOne() = %d, want %d", got, expected)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user