On Sun, Jun 27, 2010 at 5:39 PM, Lukas Renggli <renggli@gmail.com> wrote:
> One way of doing this seems to use
> MethodContext>>runSimulated:contextAtEachStep:. I've found this looking at
> MessageTally. Is it the best solution ?
> So in Autotest>>findRunAndShowTestsOf: I try something like this
> Autotest>>findRunAndShowTestsOf:changedMethod
> ����| testMethods aTestResult methodHit |
> ����"Finds the test related to changedMethod, run them and tell the view to
> update"
> testMethods := search methodsFor: changedMethod.
> methodHit := false.
> thisContext sender
> runSimulated: [aTestResult := runner run: testMethods]
> contextAtEachStep: [:current|
> (current method = changedMethod) �� ��"<--- here I detect if changedMethod has
> been hit"
> ���� �� �� ifTrue: [methodHit := true]].
> ���� �� �� ��.....
> but using this debugger opens with "SimulationGuardException: triggered by
> BlockClosure>>newProcess" in
> MethodContext>>doPrimitive:method:receiver:args:
> As I don't (yet :) understand all this stuff, I want to know if it's the
> right way to do it and what should I check.

This is the stepping mechanism of the debugger. It is dead slow, and
likely to break when you fork processes, mess with the stack, or hit
other kinds of primitives.

I would use method wrappers, they are much easier to use, less error
prone, very efficient, and already integrated with the test runner
(see the in the GUI code: 'test coverage').

Thank you Lukas ! I will have a look.

Laurent
��

Lukas

--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project