>> I would expect it to turn green if I press
resume.
I disagree with your expectations. You are arguing that
we should operate is if "probably correct" is the same as "correct". That's why
we have ****ty software.
I have no objection to leaving the method uncoloured
when you resume after correcting the error.
I have no objection to eliminating the red colouring in
these scenarios.
I strongly object to pretending that it is known to be
correct.
In my experience, we end up with better results when we
act on what we absolutely know to be factual and stop relying on
guessing.
Richard - I better understand what you are saying now. If you change
the method and save it (hence restarting on the stack) I would expect it to turn
green if I press resume. That is the TDD flow I expect, and one which sunit and
coding in the debugger was predicated on.
However, there is the potential that some memory object that cached a
result and is now running a second time could be the cause of a pass and so it
is remotely possible that this is a false pass…. (And this I think is the crux
of your argument - if any memory object is affected, theoretically you should
rerun the whole transaction from a virgin state - which is effectively rerun the
test from the beginning). So I guess we are discussing that we don’t have fully
transactional memory executions?
However I would argue that its way more common that you edit a method and
fix a text and have 0 side effects than mucking around in memory or having
something that rerunning locally messes up memory as well. So its much more
useful to get the confirmation of green and move on. YES you could have a subtle
error, and when you re-run it may later go red - but I would favour the 99% case
as its a annoying if you are doing TDD.
Tim
I hear you and I understand your pain.
However, if you
corrected the problem, not by a code change, but by playing in the object's
inspector or otherwise causing its internal state to change, and then resumed
from the debugger, would you still claim the method was successful and should
be coloured green?
The only thing we can claim is that there were
or were not further errors in the test. Colour it red if there were, but you
cannot honestly colour it green. The code doesn't actually work.