Re: NUnit Test

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Ether.Sysu <zsuboy@xxxxxxxx> wrote:
At last, i use class Type's member function InvokeMember(...) to invoke
the private function.

By the way, the code i'm going to test is written by myself. If test
the code by tracing it step by step(F11 in visual studio 2003) is a
good habit?

There are people who swear by tracing through the code line by line
manually. I far prefer unit testing, because it means when I've changed
one bit of code I don't need to run through *everything* manually
again.

I only use the debugger when something isn't working as I expect it to,
after thinking about it for a while. Apart from when I'm investigating
the behaviour of someone else's library, I regard needing to go into
the debugger as a bit of a personal failure. That's not to say it's not
invaluable when you get to that stage, but I tend to think that if what
the code does isn't obvious just by looking at it, then I've got a bit
of a problem beyond it not working properly.

--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.



Relevant Pages

  • Re: [PATCH 39/40] debug_core: Turn off tracing while in the debugger
    ... int error; ... What else do you imagine would turn on tracing, ... There are two exit points from this context depending on ... while the debugger was active. ...
    (Linux-Kernel)
  • Re: [PATCH 2/4] security: filesystem capabilities bugfix2
    ... I guess that means that if you're tracing a binary that has ... CAP_SETPCAP already, and whose filecaps say that it wants CAP_SETPCAP, ... even if the debugger doesn't. ... additional capabilities, apart from what's available under CAP_SETPCAP. ...
    (Linux-Kernel)
  • Re: [PATCH 2/4] security: filesystem capabilities bugfix2
    ... I guess that means that if you're tracing a binary that has ... CAP_SETPCAP already, and whose filecaps say that it wants CAP_SETPCAP, ... even if the debugger doesn't. ... additional capabilities, apart from what's available under CAP_SETPCAP. ...
    (Linux-Kernel)
  • RE: combo box misbehavin
    ... Have you tried tracing the code with the Debugger to see what code or PEM ... is executing when the active table changes? ...
    (microsoft.public.fox.vfp.forms)