On Thu, 14 Apr 2011 01:11:48 +0200, bearophile <[email protected]>
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