Hi, I tend to wrap then like this: [ self operationThatShouldFail. self fail: 'why!'. ] on: Error do: [ "check that is the right error" ]
-----Mensaje original----- De: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] En nombre de Pharo4Stef Enviado el: Martes, 25 de Febrero de 2014 16:51 Para: Pharo Development List Asunto: Re: [Pharo-dev] expected failures
ben
camillo once wrote a nice mail about shouldnot: Error. If I remember correctly.
Stef On 25 Feb 2014, at 17:04, btc@openinworld.com wrote:
I'd like to better understand the semantics of "expected failures" in TestRunner. It seems to me that if you want to ensure that a certain operation fails, in a test you'd wrap it as follows...
shouldFailed=false. [ self operationThatShouldFail ] on: Error do: [ shouldFailed := true ]. self assert: shouldFailed.
So is tagging methods with pragma <expectedFailure> or in method #expectedFailures a temporary measure used to bypass a failing test when the judgment is that it is not critical to fix immediately? What is the process for tacking and resolving expected failures. It would give a warm fuzzy feeling if no expected failures are reported in TestRunner. Otherwise it leaves some residual uncertainty that something is wrong, even though a failure is "expected".
cheers -ben