2016-09-16 13:42 GMT+02:00 Cl��ment Bera <bera.clement@gmail.com>:Why don't you just change nautilus to have two text areas, one with the test corresponding to the method and the other one with the method's code ?��You're saying:Their values is active documentation that can be automatically validated.That can also be applied to test we've already had with SUnit. If the only difference you want is to display the test next to the method, then it's an IDE problem, nothing has to be changed but the IDE.This is what I thought first, we already have the association between methods and tests, Nautilus can detect if thereis a corresponding test , for example browse Fraction>>truncated, it will show a test icon, that will run the test FractionTest>>#testTruncated.This works already good, and I think we don't need special comments or pragmas for this.But what stef wants is1. Method docs with examples, so a user can see an example usage of a method (sunit test methods sometimes aren't good "examples")
2. We already had (and still have) some method docs where the example code just won't work anymore because the methods or classes used
��by the example were removed, renamed. So, it would be good if we can extract these examples and run them automatically to make sure theyare still working.
But yes, maybe we can still solve this with better Tools, not working only on the plain text in comments.