Thanks Lucas, I will try it.<br>Yesterday I started to do the code coverage tool using &quot;method wrappers&quot;, it worked :)<br><br>But my unit tests of the coverage tool some times fails and some times pass (I think that is caused by some initialization made by the method wrappers).
<br>Anyway.. I think that tomorrow I'm going to upload the first version of the package to SqueakMap.<br><br><div><span class="gmail_quote">On 1/17/06, <b class="gmail_sendername">Lukas Renggli</b> &lt;<a href="mailto:renggli@gmail.com">
renggli@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">&gt; Hi, is there any tool to do code coverage? (at method level is enough, i
<br>&gt; want to do something to check that unit test cover all the methods)<br><br>You might want to try something like that in any Squeak image:<br><br>tallies := IdentityDictionary new.<br>prev := [ MAFileModelTest suite run ].
<br>thisContext sender<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;runSimulated: prev<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contextAtEachStep: [ :curr |<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;curr == prev ifFalse: [<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(tallies<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at: curr receiver
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ifAbsentPut: [ Set new ])<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add: curr selector ].<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;prev := curr ] ].<br><br>There are some bugs in the simulator that prevent you from running
<br>tests&nbsp;&nbsp;that containing #should:raise: and #shouldnt:raise:, else this<br>technique works very well and requires no additional package.<br><br>Lukas<br><br>--<br>Lukas Renggli<br><a href="http://www.lukas-renggli.ch">http://www.lukas-renggli.ch
</a><br><br></blockquote></div><br>