Next / Previous / Contents / Shipman's homepage

23. Test diary

23.1. Logic defects

  1. 2012-01-19: In Section 6, “Constants”, the part of the regular expression LINE_PAT that recognizes one or more T, F, or X characters originally looked like this:

          r'[{1}+]'       # Matches one or more T, F, or X
    

    The “+” belongs outside the square brackets, like so:

          r'[{1}]+'       # Matches one or more T, F, or X
    
  2. 2012-01-19: In Section 10, “Truths.__init__(), neglected to establish the invariant for self._caseCount. The fix is to add another prime at the end like this:

            #-- 5
            self._caseCount = len0