test: add unit test for part one
This commit is contained in:
1 parent
0d43b2e12c
commit
a3135a6901
1 file changed
+19
@@ -0,0 +1,19 @@
|
||||
package dayfive
|
||||
|
||||
import "testing"
|
||||
|
||||
var testInput = []int{
|
||||
0,
|
||||
3,
|
||||
0,
|
||||
1,
|
||||
-3,
|
||||
}
|
||||
|
||||
func TestPartOne(t *testing.T) {
|
||||
expected := 5
|
||||
got := PartOne(testInput)
|
||||
if got != expected {
|
||||
t.Errorf("PartOne() = %d, want %d", got, expected)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user