MCPcopy Create free account
hub / github.com/google/gapid / HasMessage

Method HasMessage

core/assert/error.go:52–54  ·  view source on GitHub ↗

HasMessage asserts that the error string matches the expected message.

(expect string)

Source from the content-addressed store, hash-verified

50
51// HasMessage asserts that the error string matches the expected message.
52func (o OnError) HasMessage(expect string) bool {
53 return o.Compare(o.err.Error(), "has message", expect).Test(o.err != nil && o.err.Error() == expect)
54}
55
56// HasCause asserts that the error cause matches expected error.
57func (o OnError) HasCause(expect error) bool {

Callers 11

TestCommandFailedFunction · 0.80
TestCommandBadProgramFunction · 0.80
TestCommandBadDirFunction · 0.80
TestCommandCancelFunction · 0.80
TestCommandOnFunction · 0.80
expectedCommandFunction · 0.80
TestParseDevicesFunction · 0.80
TestRootInvalidFunction · 0.80
TestRootFailedFunction · 0.80
ExampleErrorsFunction · 0.80

Calls 3

TestMethod · 0.80
ErrorMethod · 0.65
CompareMethod · 0.45

Tested by 11

TestCommandFailedFunction · 0.64
TestCommandBadProgramFunction · 0.64
TestCommandBadDirFunction · 0.64
TestCommandCancelFunction · 0.64
TestCommandOnFunction · 0.64
expectedCommandFunction · 0.64
TestParseDevicesFunction · 0.64
TestRootInvalidFunction · 0.64
TestRootFailedFunction · 0.64
ExampleErrorsFunction · 0.64