Hilaire if you want to reuse the trait created a TestCase subclass: uses: put the trait here. have a look at OrderedCollectionTest for example. On Jan 13, 2009, at 4:34 PM, Hilaire Fernandes wrote:
i am writting double link list and co, then a few test.
i found it will be neat to reuse the linked list test. this one is trait based.
I found the following issue preventing reussability:
- when i subclass linked list test with trait,
I do not understand what you mean above.
i get the trait test but not the test from linked list test, i expected to get these ones as well - when i sublcass without trait i get the test from linked list test but not the trait ones, i guess this is an expected behavior - when i subclass without trait then reimplement some of the test, i only got the those test exexuted, not the one from super.
how do you deal with such situation?
check if the superclass is abstract when a test case class implement isAbstract ^ self name = #name of the class then your tests on the class are not executed but they are in the subclasses. stef
-- http://blog.ofset.org/hilaire
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project