unittest "name" {}

IGotD- nise at nise.com
Thu Feb 16 10:40:52 UTC 2023


On Friday, 10 February 2023 at 21:48:00 UTC, Steven Schveighoffer 
wrote:
>
> If you are going that route, just `unittest Johnny` would be 
> fine.
>

I'm actually for that it should be unittest "Johnny" instead of 
without the quotations. The reason is that we want something that 
describes the test much as possible and that will often include 
spaces.

For example:

unittest "Johnny download test fail to find server"

instead of

unittest Johnny download test fail to find server

which certainly will confuse the parser.

You can overcome this by having snake case but that it kind of 
ugly

unittest Johnny_download_test_fail_to_find_server


With quotation marks we will have more freedom how to name the 
tests.






More information about the Digitalmars-d mailing list