(TestCase>>#setUp) = (TestCase>>#tearDown)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

(TestCase>>#setUp) = (TestCase>>#tearDown)

marcel.taeumel (old)
Hi!

Try to print it: "TestCase methodDict values select: [:method | method = (TestCase >> #setUp)]". It will show: "{(TestCase>>#tearDown "a CompiledMethod(423)") . (TestCase>>#setUp "a CompiledMethod(1421)")}".

So "(TestCase>>#setUp) = (TestCase>>#tearDown)" evaluates to true.

Is this intended?

Squeak 4.4, CogVM (Dec 20, 2012), Win7

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: (TestCase>>#setUp) = (TestCase>>#tearDown)

Frank Shearar-3
On 29 January 2013 19:38, Marcel Taeumel
<[hidden email]> wrote:

> Hi!
>
> Try to print it: "TestCase methodDict values select: [:method | method =
> (TestCase >> #setUp)]". It will show: "{(TestCase>>#tearDown "a
> CompiledMethod(423)") . (TestCase>>#setUp "a CompiledMethod(1421)")}".
>
> So "(TestCase>>#setUp) = (TestCase>>#tearDown)" evaluates to true.
>
> Is this intended?
>
> Squeak 4.4, CogVM (Dec 20, 2012), Win7

Caveat: I'm away from my image. But I would imagine this could well
happen, if both methods are "empty" - quick return self methods. In
that case, since CompiledMethod is a subclass of ByteArray, the
contents would both be equal.

What _would_ be _very_ surprising would be if (TestCase>>#setUp) ==
(TestCase>>#tearDown) was true.

frank

> Best,
> Marcel
>
>
>
> --
> View this message in context: http://forum.world.st/TestCase-setUp-TestCase-tearDown-tp4666363.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>