Examples block
Engine Machine via Digitalmars-d
digitalmars-d at puremagic.com
Sat Aug 20 13:39:13 PDT 2016
We have a unittest, what about an examples?
Examples are self contained short programs, each block acts as a
"main" function. One can run all the examples and spit out all
the output consecutively. It also allows for more robust testing
since it adds another layer.
It would provide better examples for docs also. Instead of using
assert to assert stuff we can see a real program in action. The
output of the example could easily be generated and added to the
end of the code.
Seems like a win win! (maybe examples is not a good keyword, but
that is moot)
More information about the Digitalmars-d
mailing list