Tempfiles in unittests

Ary Manzana ary at esperanto.org.ar
Sun Mar 11 15:13:26 PDT 2012


On 03/11/2012 06:14 PM, Jonathan M Davis wrote:
> On Sunday, March 11, 2012 13:33:34 Magnus Lie Hetland wrote:
>> On 2012-03-10 17:10:52 +0000, Jonathan M Davis said:
>>>> Otherwise, this wouldn't have been a problem :)
>>>
>>> Then you'll probably have to write a wrapper function which just uses
>>> byLine and join to grab the string line by line and then put it back
>>> together again.
>> Indeed. Not a problem.
>>
>> Just surprised me that there wasn't a standard way of writing
>> file-related unit tests :)
>
> Well, most of the file-related unit tests in Phobos don't care much about the
> contents of the file, and if they do, it's becaus they're testing one of the
> functions for reading one (such as byLine or read), in which case, they're not
> looking to read in the whole file at once. So, as far as Phobos' unit tests are
> concerned, there's not really any need for what you're trying to do. That
> doesn't mean that it shouldn't be supported, but it just doesn't appear to
> have ever come up.
>
> - Jonathan M Davis

What real world product did the designers of the D language do?


More information about the Digitalmars-d-learn mailing list