"Try it now"

Simen kjaeraas simen.kjaras at gmail.com
Wed Apr 13 22:06:04 PDT 2011


On Thu, 14 Apr 2011 01:11:48 +0200, bearophile <bearophileHUGS at lycos.com>  
wrote:

> Adam D. Ruppe:
>
>> * Since most of them don't actually output anything, the program
>>   now detects output.length == 0 and says "Program run
>>   successfully." upon completion to give some feedback.
>
> This is a problem. Unittest code is not meant to produce an output,  
> while online snippets to try are meant to nearly always produce a  
> meaningful output.

I thought about this - if D's reflection capabilities allowed it to
iterate over local variables, the system could simply add code to
print those, to the end of the unittest. Likely requires some
changes to the compiler, though.


-- 
Simen


More information about the Digitalmars-d mailing list