I have a few questions to the authors of the SUnit History feature:

1. I noticed is that all the results are stored in a dictionary of
TestResult mapping the classes to their last result. When I delete
tests, these obsolete classes remain references from the dictionary
and thus never get garbage collected. Why not save the history in a
class-instance variable of the TestCase itself? That would even make
the code much simpler.

2. Why to store the history of test results in nested dictionaries,
sets and arrays? We have a nice TestResult object that remembers
exactly the same information and additionally allows to do all kinds
of queryies like #hasFailures, hasPassed, ... I see that there is one
problem here: the current implementation of TestResult remembers the
test case instances, and thus would reference potentially a lot of
unnecessary state. Maybe TestResult should only remember the method
references of the tests, instead of the test cases? I guess that would
solve other problems people regularly report with SUnit as well.

Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to