anchor.diff:    first := True;
     for j in setout do
     begin
  -    if first then
  -    begin
  -      first := False;
  -    end else
  -    begin
  -      Console.Write(', ');
  -    end;
  +    if first
  +    then first := False
  +    else Console.Write(', ');
       Console.Write(IntToStr( j));
     end;
  -  Console.Write('})');
  -
  -  Console.Write(' = {');
  -
  +  Console.WriteLine('})');
  +
  +  setin := client.testSet(setout);
  +  Expect( setin.Count = setout.Count, 'testSet: setin.Count = setout.Count');
  +  Expect( setin.Count = 5, 'testSet: setin.Count = '+IntToStr(setin.Count));
  +  for j := -2 to 2 do // unordered, we can't rely on the order => test for known elements only
  +  begin
  +    Expect( setin.Contains(j), 'testSet: setin.Contains('+IntToStr(j)+') => '+BoolToString(setin.Contains(j)));
  +  end;
  +
  +  // list<type>: An ordered list of elements.
  +  // Translates to an STL vector, Java ArrayList, native arrays in scripting languages, etc.
  +  StartTestGroup( 'testList');
  +  listout := TThriftListImpl<Integer>.Create;
  +  listout.Add( +1);
  +  listout.Add( -2);
  +  listout.Add( +3);
  +  listout.Add( -4);
  +  listout.Add( 0);
  +  Console.Write('testList({');
     first := True;
  -  setin := client.testSet(setout);
  -  for j in setin do
  -  begin
  -    if first then
  -    begin
  -      first := False;
  -    end else
  -    begin
  -      Console.Write(', ');
  -    end;
  +  for j in listout do
  +    begin
  +    if first
  +    then first := False
  +    else Console.Write(', ');
       Console.Write(IntToStr( j));
     end;
  -  Console.WriteLine('}');
  -
  -  Console.Write('testEnum(ONE)');
  +  Console.WriteLine('})');
  +
  +  listin := client.testList(listout);
  +  Expect( listin.Count = listout.Count, 'testList: listin.Count = listout.Count');
  +  Expect( listin.Count = 5, 'testList: listin.Count = '+IntToStr(listin.Count));
  +  Expect( listin[0] = +1, 'listin[0] = '+IntToStr( listin[0]));
  +  Expect( listin[1] = -2, 'listin[1] = '+IntToStr( listin[1]));
  +  Expect( listin[2] = +3, 'listin[2] = '+IntToStr( listin[2]));
  +  Expect( listin[3] = -4, 'listin[3] = '+IntToStr( listin[3]));
  +  Expect( listin[4] = 0,  'listin[4] = '+IntToStr( listin[4]));
  +
  +  // enums
     ret := client.testEnum(TNumberz.ONE);
  -  Console.WriteLine(' = ' + IntToStr( Integer( ret)));
  -
  -  Console.Write('testEnum(TWO)');
  +  Expect( ret = TNumberz.ONE, 'testEnum(ONE) = '+IntToStr(Ord(ret)));
  +
     ret := client.testEnum(TNumberz.TWO);
  -  Console.WriteLine(' = ' + IntToStr( Integer( ret)));
  -
  -  Console.Write('testEnum(THREE)');
  +  Expect( ret = TNumberz.TWO, 'testEnum(TWO) = '+IntToStr(Ord(ret)));
  +
     ret := client.testEnum(TNumberz.THREE);
  -  Console.WriteLine(' = ' + IntToStr( Integer( ret)));
  -
  -  Console.Write('testEnum(FIVE)');
  +  Expect( ret = TNumberz.THREE, 'testEnum(THREE) = '+IntToStr(Ord(ret)));
  +
     ret := client.testEnum(TNumberz.FIVE);
  -  Console.WriteLine(' = ' + IntToStr( Integer( ret)));
  -
  -  Console.Write('testEnum(EIGHT)');
  +  Expect( ret = TNumberz.FIVE, 'testEnum(FIVE) = '+IntToStr(Ord(ret)));
  +
     ret := client.testEnum(TNumberz.EIGHT);
  -  Console.WriteLine(' = ' + IntToStr( Integer( ret)));
  -
  -  Console.Write('testTypedef(309858235082523)');
  +  Expect( ret = TNumberz.EIGHT, 'testEnum(EIGHT) = '+IntToStr(Ord(ret)));
  +
  +
  +  // typedef
     uid := client.testTypedef(309858235082523);
  -  Console.WriteLine(' = ' + IntToStr( uid));
  -
  -  Console.Write('testMapMap(1)');
  +  Expect( uid = 309858235082523, 'testTypedef(309858235082523) = '+IntToStr(uid));
  +
  +
  +  // maps of maps
  +  StartTestGroup( 'testMapMap(1)');
     mm := client.testMapMap(1);
     Console.Write(' = {');
     for key in mm.Keys do
  
positive.code:   FTransport := ATransport;
    FProtocol := AProtocol;
    FConsole := TThreadConsole.Create( Self );
  end;
  
  destructor TClientThread.Destroy;
  begin
    FConsole.Free;
    inherited;
  end;
  
  
negative.code:   i : Integer;
    proc : TThreadProcedure;
  begin
    // perform all tests
    try
      for i := 0 to FNumIteration - 1 do
      begin
        ClientTest;
        JSONProtocolReadWriteTest;
      end;
    except
      on e:Exception do Expect( FALSE, 'unexpected exception: "'+e.message+'"');
    end;
  
    // report the outcome
    ReportResults;
  
    // shutdown
    proc := procedure
    begin
      if FTransport <> nil then
  