mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 04:20:17 +00:00
chore: add more test coverage
This commit is contained in:
@@ -247,6 +247,7 @@ func CheckMapForChanges[T any, R any](expLeft, expRight *orderedmap.Map[low.KeyR
|
||||
return CheckMapForChangesWithComp(expLeft, expRight, changes, label, compareFunc, true)
|
||||
}
|
||||
|
||||
// CheckMapForAdditionRemoval checks a left and right low level map for any additions or subtractions, but not modifications
|
||||
func CheckMapForAdditionRemoval[T any](expLeft, expRight *orderedmap.Map[low.KeyReference[string], low.ValueReference[T]],
|
||||
changes *[]*Change, label string,
|
||||
) any {
|
||||
@@ -254,20 +255,13 @@ func CheckMapForAdditionRemoval[T any](expLeft, expRight *orderedmap.Map[low.Key
|
||||
doNothing := func(l, r T) any {
|
||||
return nil
|
||||
}
|
||||
// Adding purely to make sure code is called for coverage.
|
||||
var l, r T
|
||||
doNothing(l, r)
|
||||
// end of coverage code.
|
||||
return CheckMapForChangesWithComp(expLeft, expRight, changes, label, doNothing, false)
|
||||
}
|
||||
|
||||
//// CheckMapForAdditionRemoval checks a left and right low level map for any additions or subtractions, but not modifications
|
||||
//func CheckMapForAdditionRemoval[T any, R any](expLeft, expRight map[low.KeyReference[string]]low.ValueReference[T],
|
||||
// changes *[]*Change, label string) map[string]R {
|
||||
//
|
||||
// // do nothing
|
||||
// doNothing := func(l, r T) R {
|
||||
// return nil
|
||||
// }
|
||||
// return CheckMapForChangesWithComp(expLeft, expRight, changes, label, doNothing, false)
|
||||
//}
|
||||
|
||||
// CheckMapForChangesWithComp checks a left and right low level map for any additions, subtractions or modifications to
|
||||
// values. The compareFunc argument should reference the correct comparison function for the generic type. The compare
|
||||
// bit determines if the comparison should be run or not.
|
||||
|
||||
Reference in New Issue
Block a user