I just uploaded to SqueakMap some tools for code coverage, the package
is named with the original name of....&nbsp; &quot;CodeCoverage&quot; :)<br>
An usage example:<br>
<br>
| watcher report |<br>
<br>
watcher := MethodExecutionWatcher <br>
forAllMethodsOfPackageNamed: 'CodeCoverage-Model' duringExecutionOf: [<br>
&nbsp;&nbsp;&nbsp; MethodExecutionReportTest suite run<br>
].<br>
<br>
report := watcher value.<br>
<br>
(MethodExecutionReportWriter on: Transcript) write: report<br>
<br>
The unit test MethodExecutionWatcherTest contains more examples.<br>
It simply uses the block simulation,&nbsp; and&nbsp; creates&nbsp; a&nbsp; report of the executed methods.<br>
<br>
Andreas, note that this version is a little slow :(<br>
I think is because I'm using MethodReference and a Set (so each time
that a &quot;step&quot; is evaluated an instance of MethodReference is created is
checked for inclusion against the set). In a previous version I was
using directly a compiled method, and a IdentitySet, it was fast but I
don't like the idea of holding instances of compiled methods (well the
next version will be faster).<br>
<br>
Ralph, my first attempt was using MethodWrappers. Then Steph told me
that Squeak 3.9 can simulate the execution, so I changed the
implementation. (I think that the later was a lot easier). <br>
I known that MW is portable, but maybe if your students are creating an
UI for Squeak they can take a look to the uploaded package.<br>
&nbsp;<br>
Cheers,<br>
Diego,-<br>
<br><br><div><span class="gmail_quote">On 4/4/06, <b class="gmail_sendername">Ralph Johnson</b> &lt;<a href="mailto:johnson@cs.uiuc.edu">johnson@cs.uiuc.edu</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;">
<div style="direction: ltr;">There is a code coverage tool for VisualWorks that is based on method
wrappers.&nbsp; A couple of students in my OOP&amp;D class this
semester are trying to make a version for Squeak.&nbsp; There might be
one in a month or so.<br></div><div style="direction: ltr;"><span class="sg">
<br>
-Ralph Johnson<br>

</span></div><br><br><br><br></blockquote></div><br>