chore: add more test coverage

This commit is contained in:
Tristan Cartledge
2023-12-14 17:42:32 +00:00
parent a08b859904
commit 13b97f84db
5 changed files with 103 additions and 23 deletions

View File

@@ -110,6 +110,10 @@ func (d *DocumentChanges) GetAllChanges() []*Change {
// TotalBreakingChanges returns a total count of all breaking changes made in the Document
func (d *DocumentChanges) TotalBreakingChanges() int {
if d == nil {
return 0
}
c := d.PropertyChanges.TotalBreakingChanges()
if d.InfoChanges != nil {
c += d.InfoChanges.TotalBreakingChanges()