Invalid printing of multi-line assertions
This might be an expecty bug, I didn't check yet.
For a test like this:
pureTest("demo") {
assert(
List(1, 2, 3).sum == List(
1 + 2,
3 + 1
).sum
)
}
You will see:
[E] - demo
[E] assertion failed (../../dev/pass/kernel/src/test/scala/com/ocado/ospnow/wms/tap/kernel/ConsumerOpsTests.scala:62)
[E]
[E] List(1, 2, 3).sum == List(
[E] | | | | |
[E] | 7 6 | List(3, 4)
[E] List(1, 2, 3) false
[E]
[E]
You can see the 7 that was the result of the RHS, but it's not in the valid position.
This was in bloop, just checked and it's also the case in sbt :)
This one will have to be opened in https://github.com/eed3si9n/expecty (which we delegate power-assertions to). Fortunately, Anton and myself have stepped up as maintainers there.
Out of curiosity, what versions of weaver and scala are you using ?
Missed this...
weaver 0.5.1, scala 2.13.4
What would be the rendering you'd like to see ? Honestly I'm tempted to just make the macro fail on multi-line expressions as all possibilities I can think of will be confusing one way or the other.
Also don't hesitate to try out the latest , we're just waiting for CE3 for an official 0.6.0/0.7.0 release but I don't think we'll be breaking much between now and then.
The project I'm using this in isn't really anything for work and there's no immediate need to upgrade 😅 I was just waiting for scala steward to do the job for me...
Alright then 😄