Stream: ideas

Topic: Test name highlighting when running tests


view this post on Zulip Hristo (Apr 06 2024 at 22:58):

It could be just me, but sometimes I have trouble identifying within a practically short enough instant of time exactly which tests have failed (I know the line numbers are displayed, but still), if the roc test output is large (due to the number of named values and/or their structure).

To help with this, I've started defining a name value of implicit type Str, so that I can have that in the output, in case the corresponding test fails.

Would it make sense for some related highlighting to be introduced. For example, the entire line could be printed in a different colour.

name: "Test #1 name"

A couple of options come to mind:

expect {}
    ...

or

expect { name: "Test #1 name" }
    ...

- Pro: This would enable highlighting of inline expectations as well.

view this post on Zulip Brendan Hansknecht (Apr 06 2024 at 23:29):

Does a comment with a name or description above the expect work?

view this post on Zulip Brendan Hansknecht (Apr 06 2024 at 23:32):

I think the their was most tests didn't need names and they can be added with doc comments if wanted

view this post on Zulip Hristo (Apr 06 2024 at 23:41):

Yes, that's a great suggestion! It'd be substantially less disruptive.


Last updated: Jun 16 2026 at 16:19 UTC