// go test v0_test.go v0.go package main import ( "testing" ) // START OMIT func TestLineCount(t *testing.T) { for i, tc := range []struct { path string lc int }{ {"10", 10}, {"11", 0}, } { lc := lineCount(tc.path) if lc != tc.lc { t.Errorf("%d. lineCount(%q) = %d; want = %d", i, tc.path, lc, tc.lc) } } }