unittest "name" {}
Steven Schveighoffer
schveiguy at gmail.com
Fri Feb 17 03:02:19 UTC 2023
On 2/16/23 6:16 PM, Guillaume Piolat wrote:
> On Thursday, 16 February 2023 at 15:36:25 UTC, Steven Schveighoffer wrote:
>>
>> I actually prefer without the quotes. Why? Because it matches what we
>> currently do:
>>
>> struct foo
>> class bar
>> unittest baz
>>
>
> OTOH you give name to structs and classes _because_ you need the names
> elsewere. What is this elsewhere that needs unittests identifiers? I'm
> still not getting it.
The only legitimate reason I can see is to run specific unittests by
naming them at runtime. Or for the stack trace to look pretty.
But I'm ok with running all the unittests in a module. And you can do
that without any language changes today.
Like I said, I don't think anything needs to change. But if such a
feature absolutely has to be added, I'd vote for a symbol and not a string.
-Steve
More information about the Digitalmars-d
mailing list