> 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.

Good point indeed.
ISSUE 711.
SUnit-Alexandre_Bergel.62.mcz in PharoInbox


> 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.

We did this because an history does not contains the last run for the  
class. You could run all the tests for a class, subsequently run just  
one test. The history associated to this class should not contains the  
last run, but a combination of the both. Having a method  
TestResult>>merge: would help. I will work on that soon.

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






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

Reply via email to