How to unit-test a phobos module?
Steven Schveighoffer
schveiguy at gmail.com
Wed Nov 25 21:16:15 UTC 2020
On 11/25/20 3:58 PM, Q. Schroll wrote:
> When trying to unit-test an unchanged phobos module from phobos/master,
> I get errors such as
>
> module core.lifetime import copyEmplace not found
>
> and template instantiation errors. What is the correct arguments to pass
> to (r)dmd? I know it worked for me some years ago, but somehow, it
> doesn't work now.
>
> I've looked at [1], [2], [3] which didn't work (maybe outdated?). How do
> you do it and what am I doing wrong?
>
> My setup:
> * A fresh DMD installed a few minutes ago.
> * Clone of my Phobos fork with up-to-date changes from dlang/phobos/master.
>
> In the clone's folder, ~/dlang/phobos, I tried the following commands:
>
> $ dmd -main -unittest -version=StdUnittest -I. -run std/<module>.d
>
> and
>
> $ rdmd -main -unittest -version=StdUnittest -I. std/<module>.d
>
> I have the feeling I'm missing something quite obvious.
>
> [1]
> https://wiki.dlang.org/Contributing_to_Phobos#Test_a_single_Phobos_module
> [2] https://wiki.dlang.org/Building_under_Windows#Building_Phobos_2
> [3] https://github.com/dlang/phobos/blob/master/CONTRIBUTING.md
I typically do:
make -f posix.mak std/<module>.test
-Steve
More information about the Digitalmars-d-learn
mailing list