MCPcopy Create free account
hub / github.com/aws/smithy-go / CompareValues

Function CompareValues

testing/struct.go:23–25  ·  view source on GitHub ↗

CompareValues compares two values to determine if they are equal, specialized for comparison of SDK operation output types. CompareValues expects the two values to be of the same underlying type. Doing otherwise will result in undefined behavior. The third variadic argument is vestigial from a pre

(expect, actual interface{}, _ ...interface{})

Source from the content-addressed store, hash-verified

21// The third variadic argument is vestigial from a previous implementation that
22// depended on go-cmp. Values passed therein have no effect.
23func CompareValues(expect, actual interface{}, _ ...interface{}) error {
24 return deepEqual(reflect.ValueOf(expect), reflect.ValueOf(actual), "<root>")
25}
26
27func deepEqual(expect, actual reflect.Value, path string) error {
28 if et, at := expect.Kind(), actual.Kind(); et != at {

Callers 2

TestCompareValuesFunction · 0.85

Calls 1

deepEqualFunction · 0.85

Tested by 2

TestCompareValuesFunction · 0.68