On 21 September 2011 12:26, Marcus Denker <[email protected]> wrote:
>
> On Sep 21, 2011, at 12:59 PM, Frank Shearar wrote:
>
>> On 21 September 2011 11:48, Torsten Bergmann <[email protected]> wrote:
>>> Hi Eliot,
>>>
>>> at [1] you mentioned a port of MethodWrappers to Squeak 4.2.
>>> Is there also a port for Pharo available or do you plan to
>>> port it?
>>>
>>> For those who dont know about MethodWrappers: look at [2]
>>
>> And if you're wondering why on Earth you'd want them, take a look at
>> SUnit's TestCoverage class for a use case.
>>
> But that is working in Pharo already, isn't it?
>
> Using the MethodWrapper version that is based on Object-As-Methods,
> as far as I know.

Indeed - I didn't mean to suggest that TestCoverage uses
MethodWrappers the library, just that it uses the concept of method
wrappers.

(What it does is replace the existing CompiledMethods in a class'
method dictionary with a TestCoverage instance proxying the
CompiledMethod. When you run that method, you set a flag in the
TestCoverage instance. After you've calculated the package tests'
coverage, it uninstalls itself by replacing itself with the original
CompiledMethod in the class' method dictionary.)

frank

>        Marcus
>
>
>
> --
> Marcus Denker -- http://marcusdenker.de
>
>
>

Reply via email to