Re: New question on strings



tom.rmadilo <tom.rmadilo@xxxxxxxxx> wrote:
proc ::num::get {} {
variable i ;#[possibly accidentally missing here]
return [incr i]
}
These are not typos, these are examples where things work, and the
original intent is not obvious. If someone were to look at the code,
with the bug, and tried to write up a regression test, is their job
made easier?

Most surely, they'd include in their test-suite some check to see, if
the variable was actually incremented. If it was, then fine, if it
wasn't then the bug is already almost found.

.



Relevant Pages

  • Re: VS2008 vs VS2010, anyone used it?
    ... When I use edit and continue in debugging I ... Sorry, but discussing this particular bug was not the original intent of my post, so I did not do a full bug report here. ... My original post was a "Has anyone used VS2010 yet? ...
    (microsoft.public.vc.mfc)
  • Re: Susan Powter
    ... more than once), duel instead of dual, and loose instead of lose. ... errors don't bug me so much, ...
    (misc.fitness.weights)
  • Re: amazing bug in tclsh8.5?
    ... Jean-Luc Fontaine wrote: ... That was due to a bug in some versions of 8.4 which meant that [incr] ... only ever worked with 32-bit values (additional/modified internal API ...
    (comp.lang.tcl)
  • Re: The Bet
    ... It's "lose", for God's sake! ... lose are two typos that bug me beyond belief. ... spell it every which way but "loose". ...
    (talk.origins)
  • Re: Requiring Lexical $_ / Obliterating Global $_?
    ... What about typos and oversights? ... messages or warnings. ... The only one I remember is a bug found in legacy code that looks like ...
    (comp.lang.perl.misc)