scalameta/munit

`assertNotEquals` produces unhelpful message on assertion fail.

zaclegarssure opened this issue · 1 comments

Hi,

When using assertNotEquals if the assertion fails, by default, the error message is quite unhelpful.
For instance with the following test (tested on munit version 1.0.0-M10):

test("example test that fails") {
  val obtained = 42
  val expected = 42
  assertNotEquals(obtained, expected)
}

we obtain: values are the same expected same: 42 was not: 42.

The expected same is a bit contradictory, same for the was not. Maybe something like "values are the same, expected two different values: 42 is equal to 42" would be enough. It's a quick fix in Assertions.scala, I can open a PR if needed.

Oh yeah, that does not seem super easy to understand.
A PR improving clarity would be great!