MCPcopy Create free account
hub / github.com/cel-expr/cel-go / DiffMessage

Function DiffMessage

test/compare.go:29–31  ·  view source on GitHub ↗

DiffMessage creates a diff dump message for test failures.

(context string, actual interface{}, expected interface{})

Source from the content-addressed store, hash-verified

27
28// DiffMessage creates a diff dump message for test failures.
29func DiffMessage(context string, actual interface{}, expected interface{}) string {
30 return fmt.Sprintf("%s: \ngot %v, \nwanted %v", context, actual, expected)
31}
32
33func stripWhitespace(a string) string {
34 a = strings.Replace(a, " ", "", -1)

Callers 4

TestPruneFunction · 0.92
TestCheckFunction · 0.92
BenchmarkCheckFunction · 0.92
TestParseFunction · 0.92

Calls

no outgoing calls

Tested by 4

TestPruneFunction · 0.74
TestCheckFunction · 0.74
BenchmarkCheckFunction · 0.74
TestParseFunction · 0.74