59 Commits

Author SHA1 Message Date
Ernesto Jiménez
c7668ea997 Fixes #339 - Add assertionf assertions like Errorf and Equalf 2017-05-29 12:56:43 +01:00
Ernesto Jiménez
edd8e19ece Run go generate to syn generated assertions 2017-05-28 12:30:45 +01:00
Nick Miyake
3928f579ee Add comments for Equal and NotEqual to clarify pointer comparison
Clarify that pointer equality is determined by equality of values
rather than memory address.

Fixes #358
2016-11-19 23:31:18 -08:00
Ernesto Jiménez
976c720a22 Format generated code 2016-09-25 23:06:09 +01:00
Russ Egan
4ccf54af99 Clearer messages
- NoError prints the error message on the next line, unquoted, which makes multiline error messages much clearer.  Sample of an error message which includes a multiline stacktrace:

    Error:		Received unexpected error:
			Hi!

			/Volumes/Pouch/Users/russegan/dev/go/src/gitlab.protectv.local/ncryptify/client.git/client_test.go:27 (0x75c8c)
				TestNew: assert.NoError(merry.New("Hi!"), "with message")
			/usr/local/Cellar/go/1.7rc1/libexec/src/testing/testing.go:610 (0x70a01)
				tRunner: fn(t)
			/usr/local/Cellar/go/1.7rc1/libexec/src/runtime/asm_amd64.s:2086 (0x5d131)
				goexit: BYTE	$0x90	// NOP
	Messages:	with message

- Error,NoError,and EqualError now don’t inline the user’s extra messages.  user’s messages are printed in the “Messages:” section, as with all other assertions.
- EqualError now avoids isNil(), mirroring the changes already made to Error and NoError.
- Equal, EqualValues, and EqualError now print the expected and actual values each on a newline, aligned vertically, which makes it easier for a human to visually detect the differences.  Examples:

    Error:		Error message not equal:
            expected: ”no failure"
            recieved: “failure"
    Messages:	with message

    Error:	Not equal:
            "high" (expected)
            "low" (actual)
    Messages:	with message

- EqualValues uses the same value formatting and diff output as Equal for consistency
2016-09-25 11:15:27 -04:00
Ernesto Jiménez
7e30b2ce7a Fixes #261 - Add FailNow back 2016-01-08 12:25:24 +01:00
Ernesto Jiménez
5eeedba61e Fix docs for forwarded assertions 2016-01-07 18:25:18 +01:00
Ernesto Jiménez
004b24af5b Merge branch 'master' into codegen 2016-01-07 16:58:05 +01:00
Ernesto Jiménez
efd1b850c1 First version of code generation 2015-11-05 23:08:36 +00:00