Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
NUD tests incorrectly report `cmp.Diff` #4664
Comments
|
Does this break anything? Looks like we use (-) with got and (+) with want, which is preference with nothing necessarily broken. |
|
The output is backwards, when tests fail "got" is presented as "want" and vice versa. |
|
On second thought, this might be fine. I think I was confused by this output when I was attempting #4663. Feel free to close this if you find the current output satisfactory. |
|
I feel this output is satisfactory, as it states its definition of (+) and (-), but I see your point. I don't mind changing this, but have higher priority items to work on right now. Let's mark this as a good first bug if anyone else wants to take this on. |


Per the example in https://godoc.org/github.com/google/go-cmp/cmp#Diff the form should be:
however, NUD tests (and possibly others) are littered with the reverse, e.g.:
gvisor/pkg/tcpip/stack/neighbor_cache_test.go
Lines 252 to 254 in 8fa18e8
Fix this.
@puradox cc @ghanan94