anchor.diff:    end;
   
   implementation
  +
  +function BoolToString( b : Boolean) : string;
  +// overrides global BoolToString()
  +begin
  +  if b
  +  then result := 'true'
  +  else result := 'false';
  +end;
   
   
   { TTestClient }
  
positive.code:   finally
      stm.Free;
      prot := nil;  //-> Release
    end;
  end;
  
  
negative.code: begin
    if aTestResult  then begin
      Inc(FSuccesses);
      Console.WriteLine( aTestInfo+': passed');
    end
    else begin
      FErrors.Add( FTestGroup+': '+aTestInfo);
      Console.WriteLine( aTestInfo+': *** FAILED ***');
  
      // We have a failed test!
      // -> issue DebugBreak ONLY if a debugger is attached,
      // -> unhandled DebugBreaks would cause Windows to terminate the app otherwise
      if IsDebuggerPresent then asm int 3 end;
    end;
  end;
  
  
  procedure TClientThread.ReportResults;
  var nTotal : Integer;
      sLine : string;
  begin
    // prevent us from stupid DIV/0 errors
    nTotal := FSuccesses + FErrors.Count;
    if nTotal = 0 then begin
      Console.WriteLine('No results logged');
      Exit;
    end;
  
    Console.WriteLine('');
    Console.WriteLine( StringOfChar('=',60));
    Console.WriteLine( IntToStr(nTotal)+' tests performed');
    Console.WriteLine( IntToStr(FSuccesses)+' tests succeeded ('+IntToStr(round(100*FSuccesses/nTotal))+'%)');
    Console.WriteLine( IntToStr(FErrors.Count)+' tests failed ('+IntToStr(round(100*FErrors.Count/nTotal))+'%)');
    Console.WriteLine( StringOfChar('=',60));
    if FErrors.Count > 0 then begin
      Console.WriteLine('FAILED TESTS:');
      for sLine in FErrors do Console.WriteLine('- '+sLine);
      Console.WriteLine( StringOfChar('=',60));
    end;
    Console.WriteLine('');
  end;
  
  
  