This simplifies many tests and makes it more clear what the expected outcome is.
It also gives a very readable diff output if the ouptut isn't as expected.
I'm working on another PR and it's making it much easier to see at a glance what exactly broke after a change.
Example diff output from the test log:
Diff:
--- Expected
+++ Actual
@@ -7,14 +7,8 @@
type PersonIface interface {
- // Name ...
Name() string
- // SetName ...
SetName(name string)
- // Age ...
Age() int
- // Age ...
SetAge(age int) int
- // AgeAndName ...
AgeAndName() (int, string)
SetAgeAndName(name string, age int)
- // TelephoneAndName ...
GetNameAndTelephone() (name, telephone string)
This simplifies many tests and makes it more clear what the expected outcome is. It also gives a very readable diff output if the ouptut isn't as expected.
I'm working on another PR and it's making it much easier to see at a glance what exactly broke after a change.
Example diff output from the test log: