What    |Removed                     |Added
                 CC|                            |

------- Comment #5 from  2009-03-21 13:34 -------
(In reply to comment #0)
> The current unit tests lack some functionality. 
> - The current unit tests are not named.
> - There is no output that specifically indicates that the tests were run.

I often put writefln statements in my unittests, which seem to solve that

> - A single failing test will prevent all other tests from running.
> - There is no indication of which test failed.

If, as in your example, all assert statements are within the unittest code,
then how is the line number in the assert error message not an indication?

If you're calling functions to do the asserts, and so you can't tell what in
the unittest triggered it, then the aforementioned writefln statements are one
way around it.

> unittest ("XML") {

Why make the unittest names strings, rather than identifiers?

So if I'm understanding correctly:
- Each unittest block would have a pass/fail condition.
- When an assert is thrown, the immediately containing unittest fails and exits
- If one unittest fails, the next will be run, but any unittest it's nested
within would fail.

Have I got this right?  Moreover, would it be legal for statements to follow
nested unittests within a unittest?  How would these be handled?


Reply via email to