unittest which uses a disk file

Victor Porton porton at narod.ru
Wed Jan 16 21:07:24 UTC 2019


What is the rule for unittest which uses a file (containing 
example data for testing) available only in the source 
distribution, not in binary distribution?

I am writing a library.

The library has also a file main.d which is compiled only in DUB 
"application" configuration (I use this configuration solely for 
testing.)

Maybe I should put unittest { } into main.d not in the module 
which I test?

Also, what is the correct way to locate the file in the 
filesystem?


More information about the Digitalmars-d-learn mailing list