@betterC, @TestBetterC , @betterCTest or @("betterC") to annotate Phobos's unittests?

RazvanN razvan.nitu1305 at gmail.com
Mon Jul 30 07:51:19 UTC 2018


On Sunday, 29 July 2018 at 14:21:20 UTC, Seb wrote:
> Phobos has recently gotten a primitive way to run betterC tests 
> (https://github.com/dlang/phobos/pull/6640).
>
> Now, it would be really cool if we can annotate existing tests 
> with e.g. `@betterCTest` and thus ensure that those tests work 
> with -betterC (i.e. extract them and run them with a minimal 
> test runner.
>
> a) @betterC
>
> Probably too popular and would lead to too many conflicts.

How about @worksWithBetterC? This is specific enough

>
> b) @TestBetterC

This one is good too.

> c) @betterCTest || @bettercTest
>
> Would probably be defined a enum somewhere in `std.internal`

Thumb up.

>
> d) @("betterC")
>
> A bit ugly and harder to work with. If we ever want to name the 
> unittests in Phobos, this will make it harder.

Thumb down.

>
> At some point we might also want to test whether something runs 
> even without any runtime 
> (https://github.com/dlang/phobos/pull/6641), so e.g. 
> `@baremetalTest` might be defined too.

Why not @noRuntime?




More information about the Digitalmars-d mailing list