On 27.06.2010 20:20, laurent laffont wrote:
On Sun, Jun 27, 2010 at 7:11 PM, Alexandre Bergel <alexandre@bergel.eu <mailto:alexandre@bergel.eu>> wrote:
> The problem is that I don't really know if the method I've changed has been actually "hit" by the tests. I just see that tests has been run. I don't know if my method has been called when running the tests. > > So I want to detect this. > > One way of doing this seems to use MethodContext>>runSimulated:contextAtEachStep:. I've found this looking at MessageTally. Is it the best solution ?
If you know exactly which compiled method you are interested in, I would wrap it using a plain object that answers to #run:with:in: This is a feature supported which is supported for quite some time by the VM. Info on http://www.iam.unibe.ch/~scg/Archive/Papers/Bergel06bRDLPrototyping.pdf <http://www.iam.unibe.ch/%7Escg/Archive/Papers/Bergel06bRDLPrototyping.pdf> , Section 2.2
Thank you, it's cool to learn so sexy stuff :) Should be in Pharo book.
Laurent
Note: The Cog VM crashes on TestObjectsAsMethods. Cheers, Henry