elghani
>
>
> De : Sven Van Caekenberghe
> À : abdelghani ALIDRA ; Any question about pharo is
> welcome
> Envoyé le : Mardi 12 janvier 2016 7h35
> Objet : Re: [Pharo-users] Failling Tests are green if BlockCannotReturn
> exception
>
>
>
>
> > On 12
Caekenberghe
À : abdelghani ALIDRA ; Any question about pharo is
welcome
Envoyé le : Mardi 12 janvier 2016 7h35
Objet : Re: [Pharo-users] Failling Tests are green if BlockCannotReturn
exception
> On 12 Jan 2016, at 00:26, abdelghani ALIDRA wrote:
>
> Hi,
>
> I observed
n the behavior you want.
> Cheers,
>
> Vincent
>
>
>
> *From:* Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] *On
> Behalf Of *abdelghani ALIDRA
> *Sent:* mardi 12 janvier 2016 00:26
> *To:* Any Question About Pharo Is Welcome
> *Subject:* [Pharo-users] Failling Te
> On 12 Jan 2016, at 00:26, abdelghani ALIDRA wrote:
>
> Hi,
>
> I observed this unexpected behavior in test classes.
> In a test class define a method :
>
> testBlock
> |aBlock|
> aBlock := [ ^1 ].
> aBlock value.
> self assert: false.
>
> Althought the assertion is false at
: Pharo-users [mailto:pharo-users-boun...@lists.pharo.org] On Behalf Of
abdelghani ALIDRA
Sent: mardi 12 janvier 2016 00:26
To: Any Question About Pharo Is Welcome
Subject: [Pharo-users] Failling Tests are green if BlockCannotReturn exception
Hi,
I observed this unexpected behavior in test
Hi Abdelghani,
this is actually correct behavior: by putting [ ^1 ] , you are specifying that
the method should return 1 when the block is executed. So the result of aBlock
value is that the method returns 1. If you want that the result of evaluating
the block is 1, you should just put [ 1 ]
H
Hi,
I observed this unexpected behavior in test classes.In a test class define a
method :
testBlock
|aBlock|
aBlock := [ ^1 ].
aBlock value.
self assert: false.
Althought the assertion is false at the end of the test, the test is
green.Actually, It does not matter what you put af