On Mon, Dec 28, 2009 at 7:29 PM, Adrian Kuhn <akuhn@iam.unibe.ch> wrote:
Mariano Martinez Peck <marianopeck@...> writes:
So, what I would do is to "fix" it but (I don't know) put is as deprecated so that all the tests of the people are still green and give them time to change it to expectedErrors or similar. After a second release you can remove this fix :) What do you think?
Yes, that is how I planned it ... and then you came with your dynamically generated expectations. Which the new system does not support.
It's an awesome idea, so I am thinking about a way to support dynamic expectations in the new system. I have one solution in mind: given your #expectedFailures, would the following work for you?
testBlob self assume: SqueakDatabaseAccessor DefaultDriver ~~ SqueakDBXDriver. ...
which runs the test if and only if the default driver is not SqueakDBXDriver. This would have the same effect as your #expectedFailures implementation, where you expected an error for that case. Like this your expectation is put closer to the code.
Yes, this will work and will give me a benefit and a drawback :) Benefit: I can declare a expected failure only for a single test and not for all the tests of the class. Right now, I have situations like this and I a doing exactly that (more ugly actually), an if to see something and then a ^ self is it shouldn't be run. Drawback: Most of the times (in my case) the condition (SqueakDatabaseAccessor DefaultDriver ~~ SqueakDBXDrive) is always the same, so that's why it was easier as I did it. Here I should declare it in every test. However, this is VERYYYYYY little detail that I really don't care (I am not eve sure if this solution is better). I am bothering too much hahaha. Of course, I don't know what other people think about this but in my point of view, this is ok :) Cheers Mariano
--AA
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project