Rename patch.Stats to LineStats

This commit is contained in:
Dan Sosedoff 2023-03-15 18:49:00 -05:00
parent 59b46241d3
commit e24dc55e1b
No known key found for this signature in database
GPG Key ID: 26186197D282B164
2 changed files with 4 additions and 4 deletions

View File

@ -37,7 +37,7 @@ func (patch *Patch) Free() error {
return nil return nil
} }
func (patch *Patch) Stats() (uint, uint, error) { func (patch *Patch) LineStats() (uint, uint, error) {
if patch.ptr == nil { if patch.ptr == nil {
return 0, 0, ErrInvalid return 0, 0, ErrInvalid
} }

View File

@ -36,12 +36,12 @@ func TestPatch(t *testing.T) {
t.Fatalf("patch was bad") t.Fatalf("patch was bad")
} }
numAdditions, numDeletions, err := patch.Stats() numAdditions, numDeletions, err := patch.LineStats()
checkFatal(t, err) checkFatal(t, err)
if numAdditions != 1 { if numAdditions != 1 {
t.Fatal("Incorrect number of additions in stats") t.Fatal("Incorrect number of additions in line stats")
} }
if numDeletions != 1 { if numDeletions != 1 {
t.Fatal("Incorrect number of deletions in stats") t.Fatal("Incorrect number of deletions in line stats")
} }
} }