Day 2 part 1
This commit is contained in:
13
2017/2/2_test.go
Normal file
13
2017/2/2_test.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestChecksum(t *testing.T) {
|
||||
var spreadsheet = `5 1 9 5
|
||||
7 5 3
|
||||
2 4 6 8`
|
||||
want := 18
|
||||
if got := checksum(spreadsheet); got != want {
|
||||
t.Errorf("checksum() = %d; want %d", got, want)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user