Wrap NoError message with quote marks

Previous behavior was to print the error with no delimiters:

	No error is expected but got unexpected character in stream

New behavior is to print the error surrounded by quotes:

	Recieved unexpected error "unexpected character in stream"
pull/96/head
ac7 2014-11-03 10:26:29 -06:00
parent d6577e08ec
commit 51cd27a889
1 changed files with 1 additions and 1 deletions

View File

@ -695,7 +695,7 @@ func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool {
return true
}
return Fail(t, fmt.Sprintf("No error is expected but got %v", err), msgAndArgs...)
return Fail(t, fmt.Sprintf("Received unexpected error %q", err), msgAndArgs...)
}
// Error asserts that a function returned an error (i.e. not `nil`).