[squeak-dev] The Inbox: SUnit-cmm.116.mcz

Jakob Reschke forums.jakob at resfarm.de
Sun May 26 14:02:04 UTC 2019


Am Fr., 24. Mai 2019 um 04:39 Uhr schrieb <commits at source.squeak.org>:

>
>   ----- Method: TestCase>>assert: (in category 'accessing') -----
>   assert: aBooleanOrBlock
>
> +       aBooleanOrBlock value = self shouldPass ifFalse: [self
> signalFailure: 'Assertion failed']
> -       aBooleanOrBlock value ifFalse: [self signalFailure: 'Assertion
> failed']
>                         !
>
>
Hmm, what if a test case has multiple assertions and only one of them fails
under certain conditions, which is why the test is expected to fail under
these conditions? If only the last of many assertions fails so far, so the
complete test method runs, after this change the first assertion will fail
right away (because it is true contrary to shouldPass), won't it? It might
hide some errors, like exceptions raised in the middle of the assertions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190526/68068ea3/attachment.html>


More information about the Squeak-dev mailing list