You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by je...@apache.org on 2021/03/29 21:00:40 UTC

[thrift] branch master updated (7e53750 -> 66f9536)

This is an automated email from the ASF dual-hosted git repository.

jensg pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git.


    from 7e53750  THRIFT-5341 Old-Style-Cast & missing Override Client: cpp Patch: Kashirin Alex
     new cc8c2c6  THRIFT-5385 XML-HTTP client reports IsOpen=TRUE even if it is not Client: Delphi Patch: Jens Geyer
     new 589ee5b  THRIFT-5384 Improved error message for HTTP transports Client: Delphi Patch: Jens Geyer
     new 036665e  THRIFT-5386 XML-HTTP client may throw "max message size reached" incorrectly Client: delphi Patch: Jens Geyer
     new 66f9536  THRIFT-5387 Improved and simplified Delphi test setup Client: Delphi Patch: Jens Geyer

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                                         |   4 +-
 lib/delphi/DelphiThrift.groupproj                  | 120 ++++++++++++---------
 lib/delphi/src/Thrift.Protocol.pas                 |  17 ++-
 lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas      |   7 +-
 lib/delphi/src/Thrift.Transport.pas                |   4 +-
 lib/delphi/src/Thrift.Utils.pas                    |  26 +++++
 lib/delphi/test/TestClient.pas                     |   7 ++
 lib/delphi/test/client.dpr                         |   2 +-
 .../ReservedKeywords.dproj => client.dproj}        |  97 ++++++++++++-----
 lib/delphi/test/keywords/ReservedKeywords.dproj    |  24 ++++-
 .../test/multiplexed/Multiplex.Client.Main.pas     |   4 +-
 .../test/multiplexed/Multiplex.Test.Client.dpr     |   2 +
 .../Multiplex.Test.Client.dproj}                   |  89 ++++++++++-----
 .../test/multiplexed/Multiplex.Test.Server.dpr     |   2 +
 .../Multiplex.Test.Server.dproj}                   |  91 +++++++++++-----
 lib/delphi/test/serializer/TestSerializer.Data.pas | 102 +++++++++---------
 lib/delphi/test/serializer/TestSerializer.dpr      |   5 +-
 .../TestSerializer.dproj}                          |  92 +++++++++++-----
 lib/delphi/test/server.dpr                         |   2 +-
 .../ReservedKeywords.dproj => server.dproj}        |  92 +++++++++++-----
 lib/delphi/test/skip/skiptest_version1.dpr         |   6 +-
 .../skiptest_version1.dproj}                       |  86 ++++++++++-----
 lib/delphi/test/skip/skiptest_version2.dpr         |   6 +-
 .../skiptest_version2.dproj}                       |  86 ++++++++++-----
 lib/delphi/test/typeregistry/TestTypeRegistry.dpr  |   3 +-
 .../TestTypeRegistry.dproj}                        |  88 ++++++++++-----
 tutorial/delphi/DelphiClient/DelphiClient.dpr      |   4 +-
 tutorial/delphi/DelphiClient/DelphiClient.dproj    |  32 +++++-
 tutorial/delphi/DelphiServer/DelphiServer.dpr      |   4 +-
 tutorial/delphi/DelphiServer/DelphiServer.dproj    |  29 ++++-
 30 files changed, 770 insertions(+), 363 deletions(-)
 copy lib/delphi/test/{keywords/ReservedKeywords.dproj => client.dproj} (55%)
 copy lib/delphi/test/{keywords/ReservedKeywords.dproj => multiplexed/Multiplex.Test.Client.dproj} (58%)
 copy lib/delphi/test/{keywords/ReservedKeywords.dproj => multiplexed/Multiplex.Test.Server.dproj} (57%)
 copy lib/delphi/test/{keywords/ReservedKeywords.dproj => serializer/TestSerializer.dproj} (57%)
 copy lib/delphi/test/{keywords/ReservedKeywords.dproj => server.dproj} (57%)
 copy lib/delphi/test/{keywords/ReservedKeywords.dproj => skip/skiptest_version1.dproj} (60%)
 copy lib/delphi/test/{keywords/ReservedKeywords.dproj => skip/skiptest_version2.dproj} (60%)
 copy lib/delphi/test/{keywords/ReservedKeywords.dproj => typeregistry/TestTypeRegistry.dproj} (59%)

[thrift] 01/04: THRIFT-5385 XML-HTTP client reports IsOpen=TRUE even if it is not Client: Delphi Patch: Jens Geyer

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit cc8c2c630393f109779816b7650a33f50b7763b5
Author: Jens Geyer <je...@apache.org>
AuthorDate: Mon Mar 29 22:38:30 2021 +0200

    THRIFT-5385 XML-HTTP client reports IsOpen=TRUE even if it is not
    Client: Delphi
    Patch: Jens Geyer
---
 lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas | 6 ++++--
 lib/delphi/test/TestClient.pas                | 7 +++++++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas b/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas
index bdc65d1..a3f387b 100644
--- a/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas
+++ b/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas
@@ -197,7 +197,7 @@ end;
 
 function TMsxmlHTTPClientImpl.GetIsOpen: Boolean;
 begin
-  Result := True;
+  Result := Assigned(FOutputStream);
 end;
 
 procedure TMsxmlHTTPClientImpl.Open;
@@ -264,7 +264,9 @@ end;
 
 procedure TMsxmlHTTPClientImpl.Write( const pBuf : Pointer; off, len : Integer);
 begin
-  FOutputStream.Write( pBuf, off, len);
+  if FOutputStream <> nil
+  then FOutputStream.Write( pBuf, off, len)
+  else raise TTransportExceptionNotOpen.Create('Transport closed');
 end;
 
 
diff --git a/lib/delphi/test/TestClient.pas b/lib/delphi/test/TestClient.pas
index 6c962ab..ebc0796 100644
--- a/lib/delphi/test/TestClient.pas
+++ b/lib/delphi/test/TestClient.pas
@@ -474,6 +474,10 @@ begin
     on e:Exception do Expect( FALSE, 'Unexpected exception "'+e.ClassName+'": '+e.Message);
   end;
 
+  // re-open connection if needed
+  if not FTransport.IsOpen
+  then FTransport.Open;
+
   // case 2: exception type NOT declared in IDL at the function call
   // this will close the connection
   try
@@ -505,6 +509,9 @@ begin
   end;
   {$ENDIF Exceptions}
 
+  // re-open connection if needed
+  if not FTransport.IsOpen
+  then FTransport.Open;
 
   // simple things
   StartTestGroup( 'simple Thrift calls', test_BaseTypes);

[thrift] 03/04: THRIFT-5386 XML-HTTP client may throw "max message size reached" incorrectly Client: delphi Patch: Jens Geyer

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 036665edc1b1567e521472f295ce039a10d06b73
Author: Jens Geyer <je...@apache.org>
AuthorDate: Mon Mar 29 22:36:19 2021 +0200

    THRIFT-5386 XML-HTTP client may throw "max message size reached" incorrectly
    Client: delphi
    Patch: Jens Geyer
---
 lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas b/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas
index a3f387b..6704c12 100644
--- a/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas
+++ b/lib/delphi/src/Thrift.Transport.MsxmlHTTP.pas
@@ -256,6 +256,7 @@ begin
     xmlhttp.send( IUnknown( TStreamAdapter.Create( ms, soReference )));
     FInputStream := nil;
     FInputStream := TThriftStreamAdapterCOM.Create( IUnknown( xmlhttp.responseStream) as IStream);
+    ResetConsumedMessageSize;
     UpdateKnownMessageSize( FInputStream.Size);
   finally
     ms.Free;

[thrift] 02/04: THRIFT-5384 Improved error message for HTTP transports Client: Delphi Patch: Jens Geyer

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 589ee5b160f808fdee18ae9657d7c9e2f70014f0
Author: Jens Geyer <je...@apache.org>
AuthorDate: Mon Mar 29 21:40:55 2021 +0200

    THRIFT-5384 Improved error message for HTTP transports
    Client: Delphi
    Patch: Jens Geyer
---
 lib/delphi/src/Thrift.Protocol.pas  | 17 ++++++++++++-----
 lib/delphi/src/Thrift.Transport.pas |  4 +++-
 lib/delphi/src/Thrift.Utils.pas     | 26 ++++++++++++++++++++++++++
 3 files changed, 41 insertions(+), 6 deletions(-)

diff --git a/lib/delphi/src/Thrift.Protocol.pas b/lib/delphi/src/Thrift.Protocol.pas
index d5a7587..aa12ad3 100644
--- a/lib/delphi/src/Thrift.Protocol.pas
+++ b/lib/delphi/src/Thrift.Protocol.pas
@@ -833,6 +833,7 @@ var
 begin
   Reset;
   Init( result);
+
   size := ReadI32;
   if (size < 0) then begin
     version := size and Integer( VERSION_MASK);
@@ -842,14 +843,20 @@ begin
     result.Type_ := TMessageType( size and $000000ff);
     result.Name := ReadString;
     result.SeqID := ReadI32;
-  end
-  else begin
-    if FStrictRead then begin
-      raise TProtocolExceptionBadVersion.Create('Missing version in readMessageBegin, old client?' );
-    end;
+    Exit;
+  end;
+
+  try
+    if FStrictRead
+    then raise TProtocolExceptionBadVersion.Create('Missing version in readMessageBegin, old client?' );
+
     result.Name := ReadStringBody( size );
     result.Type_ := TMessageType( ReadByte );
     result.SeqID := ReadI32;
+  except
+    if CharUtils.IsHtmlDoctype(size)
+    then raise TProtocolExceptionInvalidData.Create('Remote end sends HTML instead of data')
+    else raise; // something else
   end;
 end;
 
diff --git a/lib/delphi/src/Thrift.Transport.pas b/lib/delphi/src/Thrift.Transport.pas
index 6a69d93..79fc977 100644
--- a/lib/delphi/src/Thrift.Transport.pas
+++ b/lib/delphi/src/Thrift.Transport.pas
@@ -1437,7 +1437,9 @@ begin
 
   if Int64(size) > Int64(Configuration.MaxFrameSize) then begin
     Close();
-    raise TTransportExceptionCorruptedData.Create('Frame size ('+IntToStr(size)+') larger than allowed maximum ('+IntToStr(Configuration.MaxFrameSize)+')');
+    if CharUtils.IsHtmlDoctype(size)
+    then raise TTransportExceptionCorruptedData.Create('Remote end sends HTML instead of data')
+    else raise TTransportExceptionCorruptedData.Create('Frame size ('+IntToStr(size)+') larger than allowed maximum ('+IntToStr(Configuration.MaxFrameSize)+')');
   end;
 
   UpdateKnownMessageSize(size + SizeOf(size));
diff --git a/lib/delphi/src/Thrift.Utils.pas b/lib/delphi/src/Thrift.Utils.pas
index bfd020e..4a75af8 100644
--- a/lib/delphi/src/Thrift.Utils.pas
+++ b/lib/delphi/src/Thrift.Utils.pas
@@ -80,6 +80,8 @@ type
   public
     class function IsHighSurrogate( const c : Char) : Boolean; static; inline;
     class function IsLowSurrogate( const c : Char) : Boolean; static; inline;
+
+    class function IsHtmlDoctype( const fourBytes : Integer) : Boolean; static;
   end;
 
   EnumUtils<T> = class sealed
@@ -259,6 +261,30 @@ begin
 end;
 
 
+class function CharUtils.IsHtmlDoctype( const fourBytes : Integer) : Boolean;
+var pc : PAnsiChar;
+const HTML_BEGIN : PAnsiChar = 'OD!<';  // first 4 bytes of '<!DOCTYPE ' in LE byte order
+begin
+  pc := @fourBytes;
+
+  if UpCase(pc^) <> HTML_BEGIN[0]
+  then Exit(FALSE);
+
+  Inc( pc);
+  if UpCase(pc^) <> HTML_BEGIN[1]
+  then Exit(FALSE);
+
+
+  Inc( pc);
+  if UpCase(pc^) <> HTML_BEGIN[2]
+  then Exit(FALSE);
+
+  Inc( pc);
+  result := (UpCase(pc^) = HTML_BEGIN[3]);
+end;
+
+
+
 {$IFDEF Win64}
 
 function InterlockedCompareExchange64( var Target : Int64; Exchange, Comparand : Int64) : Int64;  inline;

[thrift] 04/04: THRIFT-5387 Improved and simplified Delphi test setup Client: Delphi Patch: Jens Geyer

Posted by je...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 66f9536e2cd3899a9dbbb740eff44ec0271787c3
Author: Jens Geyer <je...@apache.org>
AuthorDate: Mon Mar 29 20:35:41 2021 +0200

    THRIFT-5387 Improved and simplified Delphi test setup
    Client: Delphi
    Patch: Jens Geyer
---
 .gitignore                                         |   4 +-
 lib/delphi/DelphiThrift.groupproj                  | 120 ++++++++++++---------
 lib/delphi/test/client.dpr                         |   2 +-
 .../ReservedKeywords.dproj => client.dproj}        |  97 ++++++++++++-----
 lib/delphi/test/keywords/ReservedKeywords.dproj    |  24 ++++-
 .../test/multiplexed/Multiplex.Client.Main.pas     |   4 +-
 .../test/multiplexed/Multiplex.Test.Client.dpr     |   2 +
 .../Multiplex.Test.Client.dproj}                   |  89 ++++++++++-----
 .../test/multiplexed/Multiplex.Test.Server.dpr     |   2 +
 .../Multiplex.Test.Server.dproj}                   |  91 +++++++++++-----
 lib/delphi/test/serializer/TestSerializer.Data.pas | 102 +++++++++---------
 lib/delphi/test/serializer/TestSerializer.dpr      |   5 +-
 .../TestSerializer.dproj}                          |  92 +++++++++++-----
 lib/delphi/test/server.dpr                         |   2 +-
 .../ReservedKeywords.dproj => server.dproj}        |  92 +++++++++++-----
 lib/delphi/test/skip/skiptest_version1.dpr         |   6 +-
 .../skiptest_version1.dproj}                       |  86 ++++++++++-----
 lib/delphi/test/skip/skiptest_version2.dpr         |   6 +-
 .../skiptest_version2.dproj}                       |  86 ++++++++++-----
 lib/delphi/test/typeregistry/TestTypeRegistry.dpr  |   3 +-
 .../TestTypeRegistry.dproj}                        |  88 ++++++++++-----
 tutorial/delphi/DelphiClient/DelphiClient.dpr      |   4 +-
 tutorial/delphi/DelphiClient/DelphiClient.dproj    |  32 +++++-
 tutorial/delphi/DelphiServer/DelphiServer.dpr      |   4 +-
 tutorial/delphi/DelphiServer/DelphiServer.dproj    |  29 ++++-
 25 files changed, 717 insertions(+), 355 deletions(-)

diff --git a/.gitignore b/.gitignore
index c34d9f6..6d07751 100644
--- a/.gitignore
+++ b/.gitignore
@@ -198,14 +198,12 @@ project.lock.json
 /lib/dart/**/packages
 /lib/dart/**/.pub/
 /lib/dart/**/pubspec.lock
-/lib/delphi/test/skip/*.request
-/lib/delphi/test/skip/*.response
+/lib/delphi/test/skip/bin
 /lib/delphi/test/serializer/*.dat
 /lib/delphi/**/*.identcache
 /lib/delphi/**/*.local
 /lib/delphi/**/*.dcu
 /lib/delphi/**/*.2007
-/lib/delphi/**/*.dproj
 /lib/delphi/**/codegen/*.bat
 /lib/erl/_build/
 /lib/erl/.eunit
diff --git a/lib/delphi/DelphiThrift.groupproj b/lib/delphi/DelphiThrift.groupproj
index a172e49..179f680 100644
--- a/lib/delphi/DelphiThrift.groupproj
+++ b/lib/delphi/DelphiThrift.groupproj
@@ -1,39 +1,57 @@
-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 		<PropertyGroup>
 			<ProjectGuid>{6BD327A5-7688-4263-B6A8-B15207CF4EC5}</ProjectGuid>
 		</PropertyGroup>
 		<ItemGroup>
-			<Projects Include="test\client.dproj">
+			<Projects Include="..\..\tutorial\delphi\DelphiServer\DelphiServer.dproj">
 				<Dependencies/>
 			</Projects>
-			<Projects Include="test\server.dproj">
+			<Projects Include="..\..\tutorial\delphi\DelphiClient\DelphiClient.dproj">
 				<Dependencies/>
 			</Projects>
-			<Projects Include="test\multiplexed\Multiplex.Test.Client.dproj">
+			<Projects Include="test\keywords\ReservedKeywords.dproj">
 				<Dependencies/>
 			</Projects>
-			<Projects Include="test\multiplexed\Multiplex.Test.Server.dproj">
+			<Projects Include="test\client.dproj">
 				<Dependencies/>
 			</Projects>
-			<Projects Include="test\serializer\TestSerializer.dproj">
+			<Projects Include="test\server.dproj">
 				<Dependencies/>
 			</Projects>
-			<Projects Include="test\skip\skiptest_version1.dproj">
+			<Projects Include="test\multiplexed\Multiplex.Test.Client.dproj">
 				<Dependencies/>
 			</Projects>
-			<Projects Include="test\skip\skiptest_version2.dproj">
+			<Projects Include="test\multiplexed\Multiplex.Test.Server.dproj">
 				<Dependencies/>
 			</Projects>
-			<Projects Include="test\typeregistry\TestTypeRegistry.dproj">
+			<Projects Include="test\skip\skiptest_version1.dproj">
 				<Dependencies/>
 			</Projects>
-			<Projects Include="..\..\tutorial\delphi\DelphiServer\DelphiServer.dproj">
+			<Projects Include="test\skip\skiptest_version2.dproj">
 				<Dependencies/>
 			</Projects>
-			<Projects Include="..\..\tutorial\delphi\DelphiClient\DelphiClient.dproj">
+			<Projects Include="test\serializer\TestSerializer.dproj">
 				<Dependencies/>
 			</Projects>
-			<Projects Include="test\keywords\ReservedKeywords.dproj">
+			<Projects Include="test\typeregistry\TestTypeRegistry.dproj">
 				<Dependencies/>
 			</Projects>
 		</ItemGroup>
@@ -44,6 +62,33 @@
 				<Default.Personality/>
 			</BorlandProject>
 		</ProjectExtensions>
+		<Target Name="DelphiServer">
+			<MSBuild Projects="..\..\tutorial\delphi\DelphiServer\DelphiServer.dproj"/>
+		</Target>
+		<Target Name="DelphiServer:Clean">
+			<MSBuild Projects="..\..\tutorial\delphi\DelphiServer\DelphiServer.dproj" Targets="Clean"/>
+		</Target>
+		<Target Name="DelphiServer:Make">
+			<MSBuild Projects="..\..\tutorial\delphi\DelphiServer\DelphiServer.dproj" Targets="Make"/>
+		</Target>
+		<Target Name="DelphiClient">
+			<MSBuild Projects="..\..\tutorial\delphi\DelphiClient\DelphiClient.dproj"/>
+		</Target>
+		<Target Name="DelphiClient:Clean">
+			<MSBuild Projects="..\..\tutorial\delphi\DelphiClient\DelphiClient.dproj" Targets="Clean"/>
+		</Target>
+		<Target Name="DelphiClient:Make">
+			<MSBuild Projects="..\..\tutorial\delphi\DelphiClient\DelphiClient.dproj" Targets="Make"/>
+		</Target>
+		<Target Name="ReservedKeywords">
+			<MSBuild Projects="test\keywords\ReservedKeywords.dproj"/>
+		</Target>
+		<Target Name="ReservedKeywords:Clean">
+			<MSBuild Projects="test\keywords\ReservedKeywords.dproj" Targets="Clean"/>
+		</Target>
+		<Target Name="ReservedKeywords:Make">
+			<MSBuild Projects="test\keywords\ReservedKeywords.dproj" Targets="Make"/>
+		</Target>
 		<Target Name="client">
 			<MSBuild Projects="test\client.dproj"/>
 		</Target>
@@ -80,15 +125,6 @@
 		<Target Name="Multiplex_Test_Server:Make">
 			<MSBuild Projects="test\multiplexed\Multiplex.Test.Server.dproj" Targets="Make"/>
 		</Target>
-		<Target Name="TestSerializer">
-			<MSBuild Projects="test\serializer\TestSerializer.dproj"/>
-		</Target>
-		<Target Name="TestSerializer:Clean">
-			<MSBuild Projects="test\serializer\TestSerializer.dproj" Targets="Clean"/>
-		</Target>
-		<Target Name="TestSerializer:Make">
-			<MSBuild Projects="test\serializer\TestSerializer.dproj" Targets="Make"/>
-		</Target>
 		<Target Name="skiptest_version1">
 			<MSBuild Projects="test\skip\skiptest_version1.dproj"/>
 		</Target>
@@ -107,6 +143,15 @@
 		<Target Name="skiptest_version2:Make">
 			<MSBuild Projects="test\skip\skiptest_version2.dproj" Targets="Make"/>
 		</Target>
+		<Target Name="TestSerializer">
+			<MSBuild Projects="test\serializer\TestSerializer.dproj"/>
+		</Target>
+		<Target Name="TestSerializer:Clean">
+			<MSBuild Projects="test\serializer\TestSerializer.dproj" Targets="Clean"/>
+		</Target>
+		<Target Name="TestSerializer:Make">
+			<MSBuild Projects="test\serializer\TestSerializer.dproj" Targets="Make"/>
+		</Target>
 		<Target Name="TestTypeRegistry">
 			<MSBuild Projects="test\typeregistry\TestTypeRegistry.dproj"/>
 		</Target>
@@ -116,41 +161,14 @@
 		<Target Name="TestTypeRegistry:Make">
 			<MSBuild Projects="test\typeregistry\TestTypeRegistry.dproj" Targets="Make"/>
 		</Target>
-		<Target Name="DelphiServer">
-			<MSBuild Projects="..\..\tutorial\delphi\DelphiServer\DelphiServer.dproj"/>
-		</Target>
-		<Target Name="DelphiServer:Clean">
-			<MSBuild Projects="..\..\tutorial\delphi\DelphiServer\DelphiServer.dproj" Targets="Clean"/>
-		</Target>
-		<Target Name="DelphiServer:Make">
-			<MSBuild Projects="..\..\tutorial\delphi\DelphiServer\DelphiServer.dproj" Targets="Make"/>
-		</Target>
-		<Target Name="DelphiClient">
-			<MSBuild Projects="..\..\tutorial\delphi\DelphiClient\DelphiClient.dproj"/>
-		</Target>
-		<Target Name="DelphiClient:Clean">
-			<MSBuild Projects="..\..\tutorial\delphi\DelphiClient\DelphiClient.dproj" Targets="Clean"/>
-		</Target>
-		<Target Name="DelphiClient:Make">
-			<MSBuild Projects="..\..\tutorial\delphi\DelphiClient\DelphiClient.dproj" Targets="Make"/>
-		</Target>
-		<Target Name="ReservedKeywords">
-			<MSBuild Projects="test\keywords\ReservedKeywords.dproj"/>
-		</Target>
-		<Target Name="ReservedKeywords:Clean">
-			<MSBuild Projects="test\keywords\ReservedKeywords.dproj" Targets="Clean"/>
-		</Target>
-		<Target Name="ReservedKeywords:Make">
-			<MSBuild Projects="test\keywords\ReservedKeywords.dproj" Targets="Make"/>
-		</Target>
 		<Target Name="Build">
-			<CallTarget Targets="client;server;Multiplex_Test_Client;Multiplex_Test_Server;TestSerializer;skiptest_version1;skiptest_version2;TestTypeRegistry;DelphiServer;DelphiClient;ReservedKeywords"/>
+			<CallTarget Targets="DelphiServer;DelphiClient;ReservedKeywords;client;server;Multiplex_Test_Client;Multiplex_Test_Server;skiptest_version1;skiptest_version2;TestSerializer;TestTypeRegistry"/>
 		</Target>
 		<Target Name="Clean">
-			<CallTarget Targets="client:Clean;server:Clean;Multiplex_Test_Client:Clean;Multiplex_Test_Server:Clean;TestSerializer:Clean;skiptest_version1:Clean;skiptest_version2:Clean;TestTypeRegistry:Clean;DelphiServer:Clean;DelphiClient:Clean;ReservedKeywords:Clean"/>
+			<CallTarget Targets="DelphiServer:Clean;DelphiClient:Clean;ReservedKeywords:Clean;client:Clean;server:Clean;Multiplex_Test_Client:Clean;Multiplex_Test_Server:Clean;skiptest_version1:Clean;skiptest_version2:Clean;TestSerializer:Clean;TestTypeRegistry:Clean"/>
 		</Target>
 		<Target Name="Make">
-			<CallTarget Targets="client:Make;server:Make;Multiplex_Test_Client:Make;Multiplex_Test_Server:Make;TestSerializer:Make;skiptest_version1:Make;skiptest_version2:Make;TestTypeRegistry:Make;DelphiServer:Make;DelphiClient:Make;ReservedKeywords:Make"/>
+			<CallTarget Targets="DelphiServer:Make;DelphiClient:Make;ReservedKeywords:Make;client:Make;server:Make;Multiplex_Test_Client:Make;Multiplex_Test_Server:Make;skiptest_version1:Make;skiptest_version2:Make;TestSerializer:Make;TestTypeRegistry:Make"/>
 		</Target>
 		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')" Project="$(BDS)\Bin\CodeGear.Group.Targets"/>
 	</Project>
diff --git a/lib/delphi/test/client.dpr b/lib/delphi/test/client.dpr
index d4875b8..eaeeee0 100644
--- a/lib/delphi/test/client.dpr
+++ b/lib/delphi/test/client.dpr
@@ -27,7 +27,7 @@ uses
   DataFactory in 'Performance\DataFactory.pas',
   PerfTests in 'Performance\PerfTests.pas',
   TestClient in 'TestClient.pas',
-  Thrift.Test, // in 'gen-delphi\Thrift.Test.pas',
+  Thrift.Test in 'gen-delphi\Thrift.Test.pas',
   Thrift in '..\src\Thrift.pas',
   Thrift.Transport in '..\src\Thrift.Transport.pas',
   Thrift.Socket in '..\src\Thrift.Socket.pas',
diff --git a/lib/delphi/test/keywords/ReservedKeywords.dproj b/lib/delphi/test/client.dproj
similarity index 55%
copy from lib/delphi/test/keywords/ReservedKeywords.dproj
copy to lib/delphi/test/client.dproj
index cc36988..8df93a0 100644
--- a/lib/delphi/test/keywords/ReservedKeywords.dproj
+++ b/lib/delphi/test/client.dproj
@@ -1,63 +1,103 @@
-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 		<PropertyGroup>
-			<ProjectGuid>{F2E9B6FC-A931-4271-8E30-5A4E402481B4}</ProjectGuid>
-			<MainSource>ReservedKeywords.dpr</MainSource>
-			<ProjectVersion>12.3</ProjectVersion>
+			<ProjectGuid>{F262F488-F81C-4B6E-8694-518C54CBB8F3}</ProjectGuid>
+			<MainSource>client.dpr</MainSource>
 			<Basis>True</Basis>
 			<Config Condition="'$(Config)'==''">Debug</Config>
 			<Platform>Win32</Platform>
 			<AppType>Console</AppType>
 			<FrameworkType>None</FrameworkType>
 			<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
+			<ProjectVersion>12.3</ProjectVersion>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Config)'=='Basis' or '$(Base)'!=''">
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
 			<Cfg_1>true</Cfg_1>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
 			<Cfg_2>true</Cfg_2>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Base)'!=''">
+			<DCC_DcuOutput>dcu\$(Project)\$(Config)\$(Platform)</DCC_DcuOutput>
+			<DCC_ExeOutput>bin\$(Config)\$(Platform)</DCC_ExeOutput>
+			<DCC_E>false</DCC_E>
 			<DCC_ImageBase>00400000</DCC_ImageBase>
-			<DCC_DcuOutput>.\$(Config)\$(Platform)</DCC_DcuOutput>
-			<DCC_UnitSearchPath>gen-delphi;..\..\src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
-			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;$(DCC_UnitAlias)</DCC_UnitAlias>
-			<DCC_ExeOutput>.\$(Config)\$(Platform)</DCC_ExeOutput>
-			<DCC_N>false</DCC_N>
+			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;WinTypes=Windows;WinProcs=Windows;$(DCC_UnitAlias)</DCC_UnitAlias>
+			<DCC_F>false</DCC_F>
 			<DCC_S>false</DCC_S>
+			<DCC_N>false</DCC_N>
 			<DCC_K>false</DCC_K>
-			<DCC_E>false</DCC_E>
-			<DCC_F>false</DCC_F>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Cfg_1)'!=''">
-			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
-			<DCC_Optimize>false</DCC_Optimize>
-			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Cfg_2)'!=''">
 			<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
 			<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
 			<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
 			<DCC_DebugInformation>false</DCC_DebugInformation>
 		</PropertyGroup>
+		<PropertyGroup Condition="'$(Cfg_2)'!=''">
+			<DCC_ExeOutput>bin\$(Config)\$(Platform)</DCC_ExeOutput>
+			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
+			<DCC_Optimize>false</DCC_Optimize>
+			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+		</PropertyGroup>
 		<ItemGroup>
-			<DelphiCompile Include="ReservedKeywords.dpr">
+			<DelphiCompile Include="client.dpr">
 				<MainSource>MainSource</MainSource>
 			</DelphiCompile>
-			<BuildConfiguration Include="Release">
+			<DCCReference Include="Performance\DataFactory.pas"/>
+			<DCCReference Include="Performance\PerfTests.pas"/>
+			<DCCReference Include="TestClient.pas"/>
+			<DCCReference Include="gen-delphi\Thrift.Test.pas"/>
+			<DCCReference Include="..\src\Thrift.pas"/>
+			<DCCReference Include="..\src\Thrift.Transport.pas"/>
+			<DCCReference Include="..\src\Thrift.Socket.pas"/>
+			<DCCReference Include="..\src\Thrift.Configuration.pas"/>
+			<DCCReference Include="..\src\Thrift.Exception.pas"/>
+			<DCCReference Include="..\src\Thrift.Transport.Pipes.pas"/>
+			<DCCReference Include="..\src\Thrift.Transport.WinHTTP.pas"/>
+			<DCCReference Include="..\src\Thrift.Transport.MsxmlHTTP.pas"/>
+			<DCCReference Include="..\src\Thrift.Protocol.pas"/>
+			<DCCReference Include="..\src\Thrift.Protocol.JSON.pas"/>
+			<DCCReference Include="..\src\Thrift.Protocol.Compact.pas"/>
+			<DCCReference Include="..\src\Thrift.Protocol.Multiplex.pas"/>
+			<DCCReference Include="..\src\Thrift.Collections.pas"/>
+			<DCCReference Include="..\src\Thrift.Server.pas"/>
+			<DCCReference Include="..\src\Thrift.Stream.pas"/>
+			<DCCReference Include="..\src\Thrift.TypeRegistry.pas"/>
+			<DCCReference Include="..\src\Thrift.WinHTTP.pas"/>
+			<DCCReference Include="..\src\Thrift.Utils.pas"/>
+			<BuildConfiguration Include="Debug">
 				<Key>Cfg_2</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
 			<BuildConfiguration Include="Basis">
 				<Key>Base</Key>
 			</BuildConfiguration>
-			<BuildConfiguration Include="Debug">
+			<BuildConfiguration Include="Release">
 				<Key>Cfg_1</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
@@ -65,15 +105,16 @@
 		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
 		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
 		<PropertyGroup>
-			<PreBuildEvent><![CDATA[if exist gen-delphi del gen-delphi\* /s /q
-thrift -r  -gen delphi ReservedKeywords.thrift
-thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
+			<PreBuildEvent><![CDATA[thrift.exe -r -gen delphi ..\..\..\test\ThriftTest.thrift]]></PreBuildEvent>
 		</PropertyGroup>
 		<ProjectExtensions>
 			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
-			<Borland.ProjectType/>
+			<Borland.ProjectType>VCLApplication</Borland.ProjectType>
 			<BorlandProject>
 				<Delphi.Personality>
+					<Source>
+						<Source Name="MainSource">client.dpr</Source>
+					</Source>
 					<VersionInfo>
 						<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
 						<VersionInfo Name="AutoIncBuild">False</VersionInfo>
@@ -101,9 +142,9 @@ thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
 						<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
 						<VersionInfoKeys Name="Comments"/>
 					</VersionInfoKeys>
-					<Source>
-						<Source Name="MainSource">ReservedKeywords.dpr</Source>
-					</Source>
+					<Parameters>
+						<Parameters Name="RunParams"> --transport=framed --transport=winhttp --host=example.org --port=80</Parameters>
+					</Parameters>
 				</Delphi.Personality>
 				<Platforms>
 					<Platform value="Win32">True</Platform>
diff --git a/lib/delphi/test/keywords/ReservedKeywords.dproj b/lib/delphi/test/keywords/ReservedKeywords.dproj
index cc36988..3603abe 100644
--- a/lib/delphi/test/keywords/ReservedKeywords.dproj
+++ b/lib/delphi/test/keywords/ReservedKeywords.dproj
@@ -1,4 +1,22 @@
-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 		<PropertyGroup>
 			<ProjectGuid>{F2E9B6FC-A931-4271-8E30-5A4E402481B4}</ProjectGuid>
 			<MainSource>ReservedKeywords.dpr</MainSource>
@@ -24,11 +42,11 @@
 			<Base>true</Base>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Base)'!=''">
+			<DCC_ExeOutput>bin\$(Config)\$(Platform)</DCC_ExeOutput>
+			<DCC_DcuOutput>dcu\$(Project)\$(Config)\$(Platform)</DCC_DcuOutput>
 			<DCC_ImageBase>00400000</DCC_ImageBase>
-			<DCC_DcuOutput>.\$(Config)\$(Platform)</DCC_DcuOutput>
 			<DCC_UnitSearchPath>gen-delphi;..\..\src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
 			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;$(DCC_UnitAlias)</DCC_UnitAlias>
-			<DCC_ExeOutput>.\$(Config)\$(Platform)</DCC_ExeOutput>
 			<DCC_N>false</DCC_N>
 			<DCC_S>false</DCC_S>
 			<DCC_K>false</DCC_K>
diff --git a/lib/delphi/test/multiplexed/Multiplex.Client.Main.pas b/lib/delphi/test/multiplexed/Multiplex.Client.Main.pas
index 4b6a0a2..b6d5fb6 100644
--- a/lib/delphi/test/multiplexed/Multiplex.Client.Main.pas
+++ b/lib/delphi/test/multiplexed/Multiplex.Client.Main.pas
@@ -36,8 +36,8 @@ uses
   Thrift.Stream,
   Thrift.Collections,
   Thrift.Configuration,
-  Benchmark,  // in gen-delphi folder
-  Aggr,       // in gen-delphi folder
+  Benchmark,
+  Aggr,
   Multiplex.Test.Common;
 
 type
diff --git a/lib/delphi/test/multiplexed/Multiplex.Test.Client.dpr b/lib/delphi/test/multiplexed/Multiplex.Test.Client.dpr
index 19f8f6a..95215ff 100644
--- a/lib/delphi/test/multiplexed/Multiplex.Test.Client.dpr
+++ b/lib/delphi/test/multiplexed/Multiplex.Test.Client.dpr
@@ -25,6 +25,8 @@ program Multiplex.Test.Client;
 uses
   SysUtils,
   Multiplex.Client.Main in 'Multiplex.Client.Main.pas',
+  Benchmark in 'gen-delphi\Benchmark.pas',
+  Aggr in 'gen-delphi\Aggr.pas',
   Thrift in '..\..\src\Thrift.pas',
   Thrift.Socket in '..\..\src\Thrift.Socket.pas',
   Thrift.Exception in '..\..\src\Thrift.Exception.pas',
diff --git a/lib/delphi/test/keywords/ReservedKeywords.dproj b/lib/delphi/test/multiplexed/Multiplex.Test.Client.dproj
similarity index 58%
copy from lib/delphi/test/keywords/ReservedKeywords.dproj
copy to lib/delphi/test/multiplexed/Multiplex.Test.Client.dproj
index cc36988..06118f0 100644
--- a/lib/delphi/test/keywords/ReservedKeywords.dproj
+++ b/lib/delphi/test/multiplexed/Multiplex.Test.Client.dproj
@@ -1,63 +1,97 @@
-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 		<PropertyGroup>
-			<ProjectGuid>{F2E9B6FC-A931-4271-8E30-5A4E402481B4}</ProjectGuid>
-			<MainSource>ReservedKeywords.dpr</MainSource>
-			<ProjectVersion>12.3</ProjectVersion>
+			<ProjectGuid>{59132A87-6294-4E25-AE9C-7CD17CD4400D}</ProjectGuid>
+			<MainSource>Multiplex.Test.Client.dpr</MainSource>
 			<Basis>True</Basis>
 			<Config Condition="'$(Config)'==''">Debug</Config>
 			<Platform>Win32</Platform>
 			<AppType>Console</AppType>
 			<FrameworkType>None</FrameworkType>
 			<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
+			<ProjectVersion>12.3</ProjectVersion>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Config)'=='Basis' or '$(Base)'!=''">
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
 			<Cfg_1>true</Cfg_1>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
 			<Cfg_2>true</Cfg_2>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Base)'!=''">
+			<DCC_DcuOutput>dcu\$(Project)\$(Config)\$(Platform)</DCC_DcuOutput>
+			<DCC_ExeOutput>bin\$(Config)\$(Platform)</DCC_ExeOutput>
+			<DCC_E>false</DCC_E>
 			<DCC_ImageBase>00400000</DCC_ImageBase>
-			<DCC_DcuOutput>.\$(Config)\$(Platform)</DCC_DcuOutput>
-			<DCC_UnitSearchPath>gen-delphi;..\..\src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
-			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;$(DCC_UnitAlias)</DCC_UnitAlias>
-			<DCC_ExeOutput>.\$(Config)\$(Platform)</DCC_ExeOutput>
-			<DCC_N>false</DCC_N>
+			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;WinTypes=Windows;WinProcs=Windows;$(DCC_UnitAlias)</DCC_UnitAlias>
+			<DCC_F>false</DCC_F>
 			<DCC_S>false</DCC_S>
+			<DCC_N>false</DCC_N>
 			<DCC_K>false</DCC_K>
-			<DCC_E>false</DCC_E>
-			<DCC_F>false</DCC_F>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Cfg_1)'!=''">
-			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
-			<DCC_Optimize>false</DCC_Optimize>
-			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Cfg_2)'!=''">
 			<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
 			<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
 			<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
 			<DCC_DebugInformation>false</DCC_DebugInformation>
 		</PropertyGroup>
+		<PropertyGroup Condition="'$(Cfg_2)'!=''">
+			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
+			<DCC_Optimize>false</DCC_Optimize>
+			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+		</PropertyGroup>
 		<ItemGroup>
-			<DelphiCompile Include="ReservedKeywords.dpr">
+			<DelphiCompile Include="Multiplex.Test.Client.dpr">
 				<MainSource>MainSource</MainSource>
 			</DelphiCompile>
-			<BuildConfiguration Include="Release">
+			<DCCReference Include="Multiplex.Client.Main.pas"/>
+			<DCCReference Include="gen-delphi\Benchmark.pas"/>
+			<DCCReference Include="gen-delphi\Aggr.pas"/>
+			<DCCReference Include="..\..\src\Thrift.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Socket.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Exception.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Transport.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Transport.Pipes.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Protocol.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Protocol.Multiplex.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Collections.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Configuration.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Server.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Stream.pas"/>
+			<DCCReference Include="..\..\src\Thrift.TypeRegistry.pas"/>
+			<DCCReference Include="..\..\src\Thrift.WinHTTP.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Utils.pas"/>
+			<BuildConfiguration Include="Debug">
 				<Key>Cfg_2</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
 			<BuildConfiguration Include="Basis">
 				<Key>Base</Key>
 			</BuildConfiguration>
-			<BuildConfiguration Include="Debug">
+			<BuildConfiguration Include="Release">
 				<Key>Cfg_1</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
@@ -65,15 +99,17 @@
 		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
 		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
 		<PropertyGroup>
-			<PreBuildEvent><![CDATA[if exist gen-delphi del gen-delphi\* /s /q
-thrift -r  -gen delphi ReservedKeywords.thrift
-thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
+			<PreBuildEvent><![CDATA[thrift.exe -r -gen delphi ..\..\..\..\contrib\async-test\Aggr.thrift
+thrift.exe -r -gen delphi ..\..\..\..\lib\rb\benchmark\Benchmark.thrift]]></PreBuildEvent>
 		</PropertyGroup>
 		<ProjectExtensions>
 			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
-			<Borland.ProjectType/>
+			<Borland.ProjectType>VCLApplication</Borland.ProjectType>
 			<BorlandProject>
 				<Delphi.Personality>
+					<Source>
+						<Source Name="MainSource">Multiplex.Test.Client.dpr</Source>
+					</Source>
 					<VersionInfo>
 						<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
 						<VersionInfo Name="AutoIncBuild">False</VersionInfo>
@@ -101,9 +137,6 @@ thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
 						<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
 						<VersionInfoKeys Name="Comments"/>
 					</VersionInfoKeys>
-					<Source>
-						<Source Name="MainSource">ReservedKeywords.dpr</Source>
-					</Source>
 				</Delphi.Personality>
 				<Platforms>
 					<Platform value="Win32">True</Platform>
diff --git a/lib/delphi/test/multiplexed/Multiplex.Test.Server.dpr b/lib/delphi/test/multiplexed/Multiplex.Test.Server.dpr
index 307a9c2..d9bbf88 100644
--- a/lib/delphi/test/multiplexed/Multiplex.Test.Server.dpr
+++ b/lib/delphi/test/multiplexed/Multiplex.Test.Server.dpr
@@ -24,6 +24,8 @@ program Multiplex.Test.Server;
 uses
   SysUtils,
   Multiplex.Server.Main in 'Multiplex.Server.Main.pas',
+  Benchmark in 'gen-delphi\Benchmark.pas',
+  Aggr in 'gen-delphi\Aggr.pas',
   ConsoleHelper in '..\ConsoleHelper.pas',
   Thrift in '..\..\src\Thrift.pas',
   Thrift.Exception in '..\..\src\Thrift.Exception.pas',
diff --git a/lib/delphi/test/keywords/ReservedKeywords.dproj b/lib/delphi/test/multiplexed/Multiplex.Test.Server.dproj
similarity index 57%
copy from lib/delphi/test/keywords/ReservedKeywords.dproj
copy to lib/delphi/test/multiplexed/Multiplex.Test.Server.dproj
index cc36988..5f4fa73 100644
--- a/lib/delphi/test/keywords/ReservedKeywords.dproj
+++ b/lib/delphi/test/multiplexed/Multiplex.Test.Server.dproj
@@ -1,63 +1,99 @@
-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 		<PropertyGroup>
-			<ProjectGuid>{F2E9B6FC-A931-4271-8E30-5A4E402481B4}</ProjectGuid>
-			<MainSource>ReservedKeywords.dpr</MainSource>
-			<ProjectVersion>12.3</ProjectVersion>
+			<ProjectGuid>{42C6ED3D-36E2-47C5-99B2-02BDA574B9E5}</ProjectGuid>
+			<MainSource>Multiplex.Test.Server.dpr</MainSource>
 			<Basis>True</Basis>
 			<Config Condition="'$(Config)'==''">Debug</Config>
 			<Platform>Win32</Platform>
 			<AppType>Console</AppType>
 			<FrameworkType>None</FrameworkType>
 			<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
+			<ProjectVersion>12.3</ProjectVersion>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Config)'=='Basis' or '$(Base)'!=''">
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
 			<Cfg_1>true</Cfg_1>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
 			<Cfg_2>true</Cfg_2>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Base)'!=''">
+			<DCC_DcuOutput>dcu\$(Project)\$(Config)\$(Platform)</DCC_DcuOutput>
+			<DCC_ExeOutput>bin\$(Config)\$(Platform)</DCC_ExeOutput>
+			<DCC_E>false</DCC_E>
 			<DCC_ImageBase>00400000</DCC_ImageBase>
-			<DCC_DcuOutput>.\$(Config)\$(Platform)</DCC_DcuOutput>
-			<DCC_UnitSearchPath>gen-delphi;..\..\src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
-			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;$(DCC_UnitAlias)</DCC_UnitAlias>
-			<DCC_ExeOutput>.\$(Config)\$(Platform)</DCC_ExeOutput>
-			<DCC_N>false</DCC_N>
+			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;WinTypes=Windows;WinProcs=Windows;$(DCC_UnitAlias)</DCC_UnitAlias>
+			<DCC_F>false</DCC_F>
 			<DCC_S>false</DCC_S>
+			<DCC_N>false</DCC_N>
 			<DCC_K>false</DCC_K>
-			<DCC_E>false</DCC_E>
-			<DCC_F>false</DCC_F>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Cfg_1)'!=''">
-			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
-			<DCC_Optimize>false</DCC_Optimize>
-			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Cfg_2)'!=''">
 			<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
 			<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
 			<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
 			<DCC_DebugInformation>false</DCC_DebugInformation>
 		</PropertyGroup>
+		<PropertyGroup Condition="'$(Cfg_2)'!=''">
+			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
+			<DCC_Optimize>false</DCC_Optimize>
+			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+		</PropertyGroup>
 		<ItemGroup>
-			<DelphiCompile Include="ReservedKeywords.dpr">
+			<DelphiCompile Include="Multiplex.Test.Server.dpr">
 				<MainSource>MainSource</MainSource>
 			</DelphiCompile>
-			<BuildConfiguration Include="Release">
+			<DCCReference Include="Multiplex.Server.Main.pas"/>
+			<DCCReference Include="gen-delphi\Benchmark.pas"/>
+			<DCCReference Include="gen-delphi\Aggr.pas"/>
+			<DCCReference Include="..\ConsoleHelper.pas"/>
+			<DCCReference Include="..\..\src\Thrift.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Exception.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Socket.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Transport.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Transport.Pipes.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Protocol.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Protocol.Multiplex.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Processor.Multiplex.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Configuration.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Collections.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Server.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Utils.pas"/>
+			<DCCReference Include="..\..\src\Thrift.WinHTTP.pas"/>
+			<DCCReference Include="..\..\src\Thrift.TypeRegistry.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Stream.pas"/>
+			<BuildConfiguration Include="Debug">
 				<Key>Cfg_2</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
 			<BuildConfiguration Include="Basis">
 				<Key>Base</Key>
 			</BuildConfiguration>
-			<BuildConfiguration Include="Debug">
+			<BuildConfiguration Include="Release">
 				<Key>Cfg_1</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
@@ -65,15 +101,17 @@
 		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
 		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
 		<PropertyGroup>
-			<PreBuildEvent><![CDATA[if exist gen-delphi del gen-delphi\* /s /q
-thrift -r  -gen delphi ReservedKeywords.thrift
-thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
+			<PreBuildEvent><![CDATA[thrift.exe -r -gen delphi ..\..\..\..\contrib\async-test\Aggr.thrift
+thrift.exe -r -gen delphi ..\..\..\..\lib\rb\benchmark\Benchmark.thrift]]></PreBuildEvent>
 		</PropertyGroup>
 		<ProjectExtensions>
 			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
-			<Borland.ProjectType/>
+			<Borland.ProjectType>VCLApplication</Borland.ProjectType>
 			<BorlandProject>
 				<Delphi.Personality>
+					<Source>
+						<Source Name="MainSource">Multiplex.Test.Server.dpr</Source>
+					</Source>
 					<VersionInfo>
 						<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
 						<VersionInfo Name="AutoIncBuild">False</VersionInfo>
@@ -101,9 +139,6 @@ thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
 						<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
 						<VersionInfoKeys Name="Comments"/>
 					</VersionInfoKeys>
-					<Source>
-						<Source Name="MainSource">ReservedKeywords.dpr</Source>
-					</Source>
 				</Delphi.Personality>
 				<Platforms>
 					<Platform value="Win32">True</Platform>
diff --git a/lib/delphi/test/serializer/TestSerializer.Data.pas b/lib/delphi/test/serializer/TestSerializer.Data.pas
index 2420e9a..a90d650 100644
--- a/lib/delphi/test/serializer/TestSerializer.Data.pas
+++ b/lib/delphi/test/serializer/TestSerializer.Data.pas
@@ -284,57 +284,57 @@ class function Fixtures.CreateCompactProtoTestStruct : ICompactProtoTestStruct;
 // superhuge compact proto test struct
 begin
   result := TCompactProtoTestStructImpl.Create;
-  result.A_byte := TDebugProtoTestConstants.COMPACT_TEST.A_byte;
-  result.A_i16 := TDebugProtoTestConstants.COMPACT_TEST.A_i16;
-  result.A_i32 := TDebugProtoTestConstants.COMPACT_TEST.A_i32;
-  result.A_i64 := TDebugProtoTestConstants.COMPACT_TEST.A_i64;
-  result.A_double := TDebugProtoTestConstants.COMPACT_TEST.A_double;
-  result.A_string := TDebugProtoTestConstants.COMPACT_TEST.A_string;
-  result.A_binary := TDebugProtoTestConstants.COMPACT_TEST.A_binary;
-  result.True_field := TDebugProtoTestConstants.COMPACT_TEST.True_field;
-  result.False_field := TDebugProtoTestConstants.COMPACT_TEST.False_field;
-  result.Empty_struct_field := TDebugProtoTestConstants.COMPACT_TEST.Empty_struct_field;
-  result.Byte_list := TDebugProtoTestConstants.COMPACT_TEST.Byte_list;
-  result.I16_list := TDebugProtoTestConstants.COMPACT_TEST.I16_list;
-  result.I32_list := TDebugProtoTestConstants.COMPACT_TEST.I32_list;
-  result.I64_list := TDebugProtoTestConstants.COMPACT_TEST.I64_list;
-  result.Double_list := TDebugProtoTestConstants.COMPACT_TEST.Double_list;
-  result.String_list := TDebugProtoTestConstants.COMPACT_TEST.String_list;
-  result.Binary_list := TDebugProtoTestConstants.COMPACT_TEST.Binary_list;
-  result.Boolean_list := TDebugProtoTestConstants.COMPACT_TEST.Boolean_list;
-  result.Struct_list := TDebugProtoTestConstants.COMPACT_TEST.Struct_list;
-  result.Byte_set := TDebugProtoTestConstants.COMPACT_TEST.Byte_set;
-  result.I16_set := TDebugProtoTestConstants.COMPACT_TEST.I16_set;
-  result.I32_set := TDebugProtoTestConstants.COMPACT_TEST.I32_set;
-  result.I64_set := TDebugProtoTestConstants.COMPACT_TEST.I64_set;
-  result.Double_set := TDebugProtoTestConstants.COMPACT_TEST.Double_set;
-  result.String_set := TDebugProtoTestConstants.COMPACT_TEST.String_set;
-  result.String_set := TDebugProtoTestConstants.COMPACT_TEST.String_set;
-  result.String_set := TDebugProtoTestConstants.COMPACT_TEST.String_set;
-  result.Binary_set := TDebugProtoTestConstants.COMPACT_TEST.Binary_set;
-  result.Boolean_set := TDebugProtoTestConstants.COMPACT_TEST.Boolean_set;
-  result.Struct_set := TDebugProtoTestConstants.COMPACT_TEST.Struct_set;
-  result.Byte_byte_map := TDebugProtoTestConstants.COMPACT_TEST.Byte_byte_map;
-  result.I16_byte_map := TDebugProtoTestConstants.COMPACT_TEST.I16_byte_map;
-  result.I32_byte_map := TDebugProtoTestConstants.COMPACT_TEST.I32_byte_map;
-  result.I64_byte_map := TDebugProtoTestConstants.COMPACT_TEST.I64_byte_map;
-  result.Double_byte_map := TDebugProtoTestConstants.COMPACT_TEST.Double_byte_map;
-  result.String_byte_map := TDebugProtoTestConstants.COMPACT_TEST.String_byte_map;
-  result.Binary_byte_map := TDebugProtoTestConstants.COMPACT_TEST.Binary_byte_map;
-  result.Boolean_byte_map := TDebugProtoTestConstants.COMPACT_TEST.Boolean_byte_map;
-  result.Byte_i16_map := TDebugProtoTestConstants.COMPACT_TEST.Byte_i16_map;
-  result.Byte_i32_map := TDebugProtoTestConstants.COMPACT_TEST.Byte_i32_map;
-  result.Byte_i64_map := TDebugProtoTestConstants.COMPACT_TEST.Byte_i64_map;
-  result.Byte_double_map := TDebugProtoTestConstants.COMPACT_TEST.Byte_double_map;
-  result.Byte_string_map := TDebugProtoTestConstants.COMPACT_TEST.Byte_string_map;
-  result.Byte_binary_map := TDebugProtoTestConstants.COMPACT_TEST.Byte_binary_map;
-  result.Byte_boolean_map := TDebugProtoTestConstants.COMPACT_TEST.Byte_boolean_map;
-  result.List_byte_map := TDebugProtoTestConstants.COMPACT_TEST.List_byte_map;
-  result.Set_byte_map := TDebugProtoTestConstants.COMPACT_TEST.Set_byte_map;
-  result.Map_byte_map := TDebugProtoTestConstants.COMPACT_TEST.Map_byte_map;
-  result.Byte_map_map := TDebugProtoTestConstants.COMPACT_TEST.Byte_map_map;
-  result.Byte_set_map := TDebugProtoTestConstants.COMPACT_TEST.Byte_set_map;
-  result.Byte_list_map := TDebugProtoTestConstants.COMPACT_TEST.Byte_list_map;
+  result.A_byte := DebugProtoTest.TConstants.COMPACT_TEST.A_byte;
+  result.A_i16 := DebugProtoTest.TConstants.COMPACT_TEST.A_i16;
+  result.A_i32 := DebugProtoTest.TConstants.COMPACT_TEST.A_i32;
+  result.A_i64 := DebugProtoTest.TConstants.COMPACT_TEST.A_i64;
+  result.A_double := DebugProtoTest.TConstants.COMPACT_TEST.A_double;
+  result.A_string := DebugProtoTest.TConstants.COMPACT_TEST.A_string;
+  result.A_binary := DebugProtoTest.TConstants.COMPACT_TEST.A_binary;
+  result.True_field := DebugProtoTest.TConstants.COMPACT_TEST.True_field;
+  result.False_field := DebugProtoTest.TConstants.COMPACT_TEST.False_field;
+  result.Empty_struct_field := DebugProtoTest.TConstants.COMPACT_TEST.Empty_struct_field;
+  result.Byte_list := DebugProtoTest.TConstants.COMPACT_TEST.Byte_list;
+  result.I16_list := DebugProtoTest.TConstants.COMPACT_TEST.I16_list;
+  result.I32_list := DebugProtoTest.TConstants.COMPACT_TEST.I32_list;
+  result.I64_list := DebugProtoTest.TConstants.COMPACT_TEST.I64_list;
+  result.Double_list := DebugProtoTest.TConstants.COMPACT_TEST.Double_list;
+  result.String_list := DebugProtoTest.TConstants.COMPACT_TEST.String_list;
+  result.Binary_list := DebugProtoTest.TConstants.COMPACT_TEST.Binary_list;
+  result.Boolean_list := DebugProtoTest.TConstants.COMPACT_TEST.Boolean_list;
+  result.Struct_list := DebugProtoTest.TConstants.COMPACT_TEST.Struct_list;
+  result.Byte_set := DebugProtoTest.TConstants.COMPACT_TEST.Byte_set;
+  result.I16_set := DebugProtoTest.TConstants.COMPACT_TEST.I16_set;
+  result.I32_set := DebugProtoTest.TConstants.COMPACT_TEST.I32_set;
+  result.I64_set := DebugProtoTest.TConstants.COMPACT_TEST.I64_set;
+  result.Double_set := DebugProtoTest.TConstants.COMPACT_TEST.Double_set;
+  result.String_set := DebugProtoTest.TConstants.COMPACT_TEST.String_set;
+  result.String_set := DebugProtoTest.TConstants.COMPACT_TEST.String_set;
+  result.String_set := DebugProtoTest.TConstants.COMPACT_TEST.String_set;
+  result.Binary_set := DebugProtoTest.TConstants.COMPACT_TEST.Binary_set;
+  result.Boolean_set := DebugProtoTest.TConstants.COMPACT_TEST.Boolean_set;
+  result.Struct_set := DebugProtoTest.TConstants.COMPACT_TEST.Struct_set;
+  result.Byte_byte_map := DebugProtoTest.TConstants.COMPACT_TEST.Byte_byte_map;
+  result.I16_byte_map := DebugProtoTest.TConstants.COMPACT_TEST.I16_byte_map;
+  result.I32_byte_map := DebugProtoTest.TConstants.COMPACT_TEST.I32_byte_map;
+  result.I64_byte_map := DebugProtoTest.TConstants.COMPACT_TEST.I64_byte_map;
+  result.Double_byte_map := DebugProtoTest.TConstants.COMPACT_TEST.Double_byte_map;
+  result.String_byte_map := DebugProtoTest.TConstants.COMPACT_TEST.String_byte_map;
+  result.Binary_byte_map := DebugProtoTest.TConstants.COMPACT_TEST.Binary_byte_map;
+  result.Boolean_byte_map := DebugProtoTest.TConstants.COMPACT_TEST.Boolean_byte_map;
+  result.Byte_i16_map := DebugProtoTest.TConstants.COMPACT_TEST.Byte_i16_map;
+  result.Byte_i32_map := DebugProtoTest.TConstants.COMPACT_TEST.Byte_i32_map;
+  result.Byte_i64_map := DebugProtoTest.TConstants.COMPACT_TEST.Byte_i64_map;
+  result.Byte_double_map := DebugProtoTest.TConstants.COMPACT_TEST.Byte_double_map;
+  result.Byte_string_map := DebugProtoTest.TConstants.COMPACT_TEST.Byte_string_map;
+  result.Byte_binary_map := DebugProtoTest.TConstants.COMPACT_TEST.Byte_binary_map;
+  result.Byte_boolean_map := DebugProtoTest.TConstants.COMPACT_TEST.Byte_boolean_map;
+  result.List_byte_map := DebugProtoTest.TConstants.COMPACT_TEST.List_byte_map;
+  result.Set_byte_map := DebugProtoTest.TConstants.COMPACT_TEST.Set_byte_map;
+  result.Map_byte_map := DebugProtoTest.TConstants.COMPACT_TEST.Map_byte_map;
+  result.Byte_map_map := DebugProtoTest.TConstants.COMPACT_TEST.Byte_map_map;
+  result.Byte_set_map := DebugProtoTest.TConstants.COMPACT_TEST.Byte_set_map;
+  result.Byte_list_map := DebugProtoTest.TConstants.COMPACT_TEST.Byte_list_map;
 
   result.Field500 := 500;
   result.Field5000 := 5000;
diff --git a/lib/delphi/test/serializer/TestSerializer.dpr b/lib/delphi/test/serializer/TestSerializer.dpr
index 0620014..971401e 100644
--- a/lib/delphi/test/serializer/TestSerializer.dpr
+++ b/lib/delphi/test/serializer/TestSerializer.dpr
@@ -41,8 +41,9 @@ uses
   Thrift.Stream in '..\..\src\Thrift.Stream.pas',
   Thrift.WinHTTP in '..\..\src\Thrift.WinHTTP.pas',
   Thrift.TypeRegistry in '..\..\src\Thrift.TypeRegistry.pas',
-  System_,
-  DebugProtoTest,
+  System_ in 'gen-delphi\System_.pas',
+  SysUtils_ in 'gen-delphi\SysUtils_.pas',
+  DebugProtoTest in 'gen-delphi\DebugProtoTest.pas',
   TestSerializer.Tests in 'TestSerializer.Tests.pas',
   TestSerializer.Data in 'TestSerializer.Data.pas';
 
diff --git a/lib/delphi/test/keywords/ReservedKeywords.dproj b/lib/delphi/test/serializer/TestSerializer.dproj
similarity index 57%
copy from lib/delphi/test/keywords/ReservedKeywords.dproj
copy to lib/delphi/test/serializer/TestSerializer.dproj
index cc36988..5f26264 100644
--- a/lib/delphi/test/keywords/ReservedKeywords.dproj
+++ b/lib/delphi/test/serializer/TestSerializer.dproj
@@ -1,63 +1,100 @@
-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 		<PropertyGroup>
-			<ProjectGuid>{F2E9B6FC-A931-4271-8E30-5A4E402481B4}</ProjectGuid>
-			<MainSource>ReservedKeywords.dpr</MainSource>
-			<ProjectVersion>12.3</ProjectVersion>
+			<ProjectGuid>{9282EDD8-7C12-41B0-8172-61C6BFA6E238}</ProjectGuid>
+			<MainSource>TestSerializer.dpr</MainSource>
 			<Basis>True</Basis>
 			<Config Condition="'$(Config)'==''">Debug</Config>
 			<Platform>Win32</Platform>
 			<AppType>Console</AppType>
 			<FrameworkType>None</FrameworkType>
 			<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
+			<ProjectVersion>12.3</ProjectVersion>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Config)'=='Basis' or '$(Base)'!=''">
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
 			<Cfg_1>true</Cfg_1>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
 			<Cfg_2>true</Cfg_2>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Base)'!=''">
+			<DCC_DcuOutput>dcu\$(Project)\$(Config)\$(Platform)</DCC_DcuOutput>
+			<DCC_ExeOutput>bin\$(Config)\$(Platform)</DCC_ExeOutput>
+			<DCC_E>false</DCC_E>
 			<DCC_ImageBase>00400000</DCC_ImageBase>
-			<DCC_DcuOutput>.\$(Config)\$(Platform)</DCC_DcuOutput>
-			<DCC_UnitSearchPath>gen-delphi;..\..\src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
-			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;$(DCC_UnitAlias)</DCC_UnitAlias>
-			<DCC_ExeOutput>.\$(Config)\$(Platform)</DCC_ExeOutput>
-			<DCC_N>false</DCC_N>
+			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;WinTypes=Windows;WinProcs=Windows;$(DCC_UnitAlias)</DCC_UnitAlias>
+			<DCC_F>false</DCC_F>
 			<DCC_S>false</DCC_S>
+			<DCC_N>false</DCC_N>
 			<DCC_K>false</DCC_K>
-			<DCC_E>false</DCC_E>
-			<DCC_F>false</DCC_F>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Cfg_1)'!=''">
-			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
-			<DCC_Optimize>false</DCC_Optimize>
-			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Cfg_2)'!=''">
 			<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
 			<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
 			<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
 			<DCC_DebugInformation>false</DCC_DebugInformation>
 		</PropertyGroup>
+		<PropertyGroup Condition="'$(Cfg_2)'!=''">
+			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
+			<DCC_Optimize>false</DCC_Optimize>
+			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+		</PropertyGroup>
 		<ItemGroup>
-			<DelphiCompile Include="ReservedKeywords.dpr">
+			<DelphiCompile Include="TestSerializer.dpr">
 				<MainSource>MainSource</MainSource>
 			</DelphiCompile>
-			<BuildConfiguration Include="Release">
+			<DCCReference Include="..\..\src\Thrift.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Exception.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Socket.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Transport.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Protocol.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Protocol.JSON.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Protocol.Compact.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Collections.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Configuration.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Server.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Utils.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Serializer.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Stream.pas"/>
+			<DCCReference Include="..\..\src\Thrift.WinHTTP.pas"/>
+			<DCCReference Include="..\..\src\Thrift.TypeRegistry.pas"/>
+			<DCCReference Include="gen-delphi\System_.pas"/>
+			<DCCReference Include="gen-delphi\SysUtils_.pas"/>
+			<DCCReference Include="gen-delphi\DebugProtoTest.pas"/>
+			<DCCReference Include="TestSerializer.Tests.pas"/>
+			<DCCReference Include="TestSerializer.Data.pas"/>
+			<BuildConfiguration Include="Debug">
 				<Key>Cfg_2</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
 			<BuildConfiguration Include="Basis">
 				<Key>Base</Key>
 			</BuildConfiguration>
-			<BuildConfiguration Include="Debug">
+			<BuildConfiguration Include="Release">
 				<Key>Cfg_1</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
@@ -65,15 +102,17 @@
 		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
 		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
 		<PropertyGroup>
-			<PreBuildEvent><![CDATA[if exist gen-delphi del gen-delphi\* /s /q
-thrift -r  -gen delphi ReservedKeywords.thrift
-thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
+			<PreBuildEvent><![CDATA[thrift.exe -r -gen delphi ..\keywords\ReservedKeywords.thrift
+thrift.exe -r -gen delphi ..\..\..\..\test\DebugProtoTest.thrift]]></PreBuildEvent>
 		</PropertyGroup>
 		<ProjectExtensions>
 			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
-			<Borland.ProjectType/>
+			<Borland.ProjectType>VCLApplication</Borland.ProjectType>
 			<BorlandProject>
 				<Delphi.Personality>
+					<Source>
+						<Source Name="MainSource">TestSerializer.dpr</Source>
+					</Source>
 					<VersionInfo>
 						<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
 						<VersionInfo Name="AutoIncBuild">False</VersionInfo>
@@ -101,9 +140,6 @@ thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
 						<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
 						<VersionInfoKeys Name="Comments"/>
 					</VersionInfoKeys>
-					<Source>
-						<Source Name="MainSource">ReservedKeywords.dpr</Source>
-					</Source>
 				</Delphi.Personality>
 				<Platforms>
 					<Platform value="Win32">True</Platform>
diff --git a/lib/delphi/test/server.dpr b/lib/delphi/test/server.dpr
index 954d0b6..7994281 100644
--- a/lib/delphi/test/server.dpr
+++ b/lib/delphi/test/server.dpr
@@ -25,7 +25,7 @@ uses
   SysUtils,
   TestServer in 'TestServer.pas',
   TestServerEvents in 'TestServerEvents.pas',
-  Thrift.Test,  // in gen-delphi folder
+  Thrift.Test in 'gen-delphi\Thrift.Test.pas',
   Thrift in '..\src\Thrift.pas',
   Thrift.Exception in '..\src\Thrift.Exception.pas',
   Thrift.Transport in '..\src\Thrift.Transport.pas',
diff --git a/lib/delphi/test/keywords/ReservedKeywords.dproj b/lib/delphi/test/server.dproj
similarity index 57%
copy from lib/delphi/test/keywords/ReservedKeywords.dproj
copy to lib/delphi/test/server.dproj
index cc36988..9f7e5c6 100644
--- a/lib/delphi/test/keywords/ReservedKeywords.dproj
+++ b/lib/delphi/test/server.dproj
@@ -1,63 +1,101 @@
-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 		<PropertyGroup>
-			<ProjectGuid>{F2E9B6FC-A931-4271-8E30-5A4E402481B4}</ProjectGuid>
-			<MainSource>ReservedKeywords.dpr</MainSource>
-			<ProjectVersion>12.3</ProjectVersion>
+			<ProjectGuid>{07CEDA3D-0963-40FE-B3C2-0ED4E24DE067}</ProjectGuid>
+			<MainSource>server.dpr</MainSource>
 			<Basis>True</Basis>
 			<Config Condition="'$(Config)'==''">Debug</Config>
 			<Platform>Win32</Platform>
 			<AppType>Console</AppType>
 			<FrameworkType>None</FrameworkType>
 			<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
+			<ProjectVersion>12.3</ProjectVersion>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Config)'=='Basis' or '$(Base)'!=''">
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
 			<Cfg_1>true</Cfg_1>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
 			<Cfg_2>true</Cfg_2>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Base)'!=''">
+			<DCC_DcuOutput>dcu\$(Project)\$(Config)\$(Platform)</DCC_DcuOutput>
+			<DCC_ExeOutput>bin\$(Config)\$(Platform)</DCC_ExeOutput>
+			<DCC_E>false</DCC_E>
 			<DCC_ImageBase>00400000</DCC_ImageBase>
-			<DCC_DcuOutput>.\$(Config)\$(Platform)</DCC_DcuOutput>
-			<DCC_UnitSearchPath>gen-delphi;..\..\src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
-			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;$(DCC_UnitAlias)</DCC_UnitAlias>
-			<DCC_ExeOutput>.\$(Config)\$(Platform)</DCC_ExeOutput>
-			<DCC_N>false</DCC_N>
+			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;WinTypes=Windows;WinProcs=Windows;$(DCC_UnitAlias)</DCC_UnitAlias>
+			<DCC_F>false</DCC_F>
 			<DCC_S>false</DCC_S>
+			<DCC_N>false</DCC_N>
 			<DCC_K>false</DCC_K>
-			<DCC_E>false</DCC_E>
-			<DCC_F>false</DCC_F>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Cfg_1)'!=''">
-			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
-			<DCC_Optimize>false</DCC_Optimize>
-			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Cfg_2)'!=''">
 			<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
 			<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
 			<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
 			<DCC_DebugInformation>false</DCC_DebugInformation>
 		</PropertyGroup>
+		<PropertyGroup Condition="'$(Cfg_2)'!=''">
+			<DCC_ExeOutput>bin\$(Config)\$(Platform)</DCC_ExeOutput>
+			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
+			<DCC_Optimize>false</DCC_Optimize>
+			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+		</PropertyGroup>
 		<ItemGroup>
-			<DelphiCompile Include="ReservedKeywords.dpr">
+			<DelphiCompile Include="server.dpr">
 				<MainSource>MainSource</MainSource>
 			</DelphiCompile>
-			<BuildConfiguration Include="Release">
+			<DCCReference Include="TestServer.pas"/>
+			<DCCReference Include="TestServerEvents.pas"/>
+			<DCCReference Include="gen-delphi\Thrift.Test.pas"/>
+			<DCCReference Include="..\src\Thrift.pas"/>
+			<DCCReference Include="..\src\Thrift.Exception.pas"/>
+			<DCCReference Include="..\src\Thrift.Transport.pas"/>
+			<DCCReference Include="..\src\Thrift.Socket.pas"/>
+			<DCCReference Include="..\src\Thrift.Transport.Pipes.pas"/>
+			<DCCReference Include="..\src\Thrift.Protocol.pas"/>
+			<DCCReference Include="..\src\Thrift.Protocol.JSON.pas"/>
+			<DCCReference Include="..\src\Thrift.Protocol.Compact.pas"/>
+			<DCCReference Include="..\src\Thrift.Protocol.Multiplex.pas"/>
+			<DCCReference Include="..\src\Thrift.Processor.Multiplex.pas"/>
+			<DCCReference Include="..\src\Thrift.Collections.pas"/>
+			<DCCReference Include="..\src\Thrift.Configuration.pas"/>
+			<DCCReference Include="..\src\Thrift.Server.pas"/>
+			<DCCReference Include="..\src\Thrift.TypeRegistry.pas"/>
+			<DCCReference Include="..\src\Thrift.Utils.pas"/>
+			<DCCReference Include="..\src\Thrift.WinHTTP.pas"/>
+			<DCCReference Include="..\src\Thrift.Stream.pas"/>
+			<BuildConfiguration Include="Debug">
 				<Key>Cfg_2</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
 			<BuildConfiguration Include="Basis">
 				<Key>Base</Key>
 			</BuildConfiguration>
-			<BuildConfiguration Include="Debug">
+			<BuildConfiguration Include="Release">
 				<Key>Cfg_1</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
@@ -65,15 +103,16 @@
 		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
 		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
 		<PropertyGroup>
-			<PreBuildEvent><![CDATA[if exist gen-delphi del gen-delphi\* /s /q
-thrift -r  -gen delphi ReservedKeywords.thrift
-thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
+			<PreBuildEvent><![CDATA[thrift.exe -r -gen delphi ..\..\..\test\ThriftTest.thrift]]></PreBuildEvent>
 		</PropertyGroup>
 		<ProjectExtensions>
 			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
-			<Borland.ProjectType/>
+			<Borland.ProjectType>VCLApplication</Borland.ProjectType>
 			<BorlandProject>
 				<Delphi.Personality>
+					<Source>
+						<Source Name="MainSource">server.dpr</Source>
+					</Source>
 					<VersionInfo>
 						<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
 						<VersionInfo Name="AutoIncBuild">False</VersionInfo>
@@ -101,9 +140,6 @@ thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
 						<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
 						<VersionInfoKeys Name="Comments"/>
 					</VersionInfoKeys>
-					<Source>
-						<Source Name="MainSource">ReservedKeywords.dpr</Source>
-					</Source>
 				</Delphi.Personality>
 				<Platforms>
 					<Platform value="Win32">True</Platform>
diff --git a/lib/delphi/test/skip/skiptest_version1.dpr b/lib/delphi/test/skip/skiptest_version1.dpr
index f7cde2f..6d877de 100644
--- a/lib/delphi/test/skip/skiptest_version1.dpr
+++ b/lib/delphi/test/skip/skiptest_version1.dpr
@@ -23,7 +23,7 @@ program skiptest_version1;
 
 uses
   Classes, Windows, SysUtils,
-  Skiptest.One,
+  Skiptest.One in 'gen-delphi\Skiptest.One.pas',
   Thrift in '..\..\src\Thrift.pas',
   Thrift.Exception in '..\..\src\Thrift.Exception.pas',
   Thrift.Socket in '..\..\src\Thrift.Socket.pas',
@@ -47,7 +47,7 @@ const
 function CreatePing : IPing;
 begin
   result := TPingImpl.Create;
-  result.Version1  := Tskiptest_version_1Constants.SKIPTESTSERVICE_VERSION;
+  result.Version1  := TConstants.SKIPTESTSERVICE_VERSION;
   result.EnumTest  := TPingPongEnum.PingOne;
 end;
 
@@ -189,7 +189,7 @@ const
   FILE_COMPACT = 'pingpong.compact';
 begin
   try
-    Writeln( 'Delphi SkipTest '+IntToStr(Tskiptest_version_1Constants.SKIPTESTSERVICE_VERSION)+' using '+Thrift.Version);
+    Writeln( 'Delphi SkipTest '+IntToStr(TConstants.SKIPTESTSERVICE_VERSION)+' using '+Thrift.Version);
 
     Writeln;
     Writeln('Binary protocol');
diff --git a/lib/delphi/test/keywords/ReservedKeywords.dproj b/lib/delphi/test/skip/skiptest_version1.dproj
similarity index 60%
copy from lib/delphi/test/keywords/ReservedKeywords.dproj
copy to lib/delphi/test/skip/skiptest_version1.dproj
index cc36988..2e8997e 100644
--- a/lib/delphi/test/keywords/ReservedKeywords.dproj
+++ b/lib/delphi/test/skip/skiptest_version1.dproj
@@ -1,63 +1,95 @@
-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 		<PropertyGroup>
-			<ProjectGuid>{F2E9B6FC-A931-4271-8E30-5A4E402481B4}</ProjectGuid>
-			<MainSource>ReservedKeywords.dpr</MainSource>
-			<ProjectVersion>12.3</ProjectVersion>
+			<ProjectGuid>{894CD87B-337B-49F7-BC7D-2D9F65CE8FE0}</ProjectGuid>
+			<MainSource>skiptest_version1.dpr</MainSource>
 			<Basis>True</Basis>
 			<Config Condition="'$(Config)'==''">Debug</Config>
 			<Platform>Win32</Platform>
 			<AppType>Console</AppType>
 			<FrameworkType>None</FrameworkType>
 			<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
+			<ProjectVersion>12.3</ProjectVersion>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Config)'=='Basis' or '$(Base)'!=''">
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
 			<Cfg_1>true</Cfg_1>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
 			<Cfg_2>true</Cfg_2>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Base)'!=''">
+			<DCC_DcuOutput>dcu\$(Project)\$(Config)\$(Platform)</DCC_DcuOutput>
+			<DCC_ExeOutput>bin\$(Config)\$(Platform)</DCC_ExeOutput>
+			<DCC_E>false</DCC_E>
 			<DCC_ImageBase>00400000</DCC_ImageBase>
-			<DCC_DcuOutput>.\$(Config)\$(Platform)</DCC_DcuOutput>
-			<DCC_UnitSearchPath>gen-delphi;..\..\src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
-			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;$(DCC_UnitAlias)</DCC_UnitAlias>
-			<DCC_ExeOutput>.\$(Config)\$(Platform)</DCC_ExeOutput>
-			<DCC_N>false</DCC_N>
+			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;WinTypes=Windows;WinProcs=Windows;$(DCC_UnitAlias)</DCC_UnitAlias>
+			<DCC_F>false</DCC_F>
 			<DCC_S>false</DCC_S>
+			<DCC_N>false</DCC_N>
 			<DCC_K>false</DCC_K>
-			<DCC_E>false</DCC_E>
-			<DCC_F>false</DCC_F>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Cfg_1)'!=''">
-			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
-			<DCC_Optimize>false</DCC_Optimize>
-			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Cfg_2)'!=''">
 			<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
 			<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
 			<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
 			<DCC_DebugInformation>false</DCC_DebugInformation>
 		</PropertyGroup>
+		<PropertyGroup Condition="'$(Cfg_2)'!=''">
+			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
+			<DCC_Optimize>false</DCC_Optimize>
+			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+		</PropertyGroup>
 		<ItemGroup>
-			<DelphiCompile Include="ReservedKeywords.dpr">
+			<DelphiCompile Include="skiptest_version1.dpr">
 				<MainSource>MainSource</MainSource>
 			</DelphiCompile>
-			<BuildConfiguration Include="Release">
+			<DCCReference Include="gen-delphi\Skiptest.One.pas"/>
+			<DCCReference Include="..\..\src\Thrift.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Exception.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Socket.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Transport.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Protocol.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Protocol.JSON.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Protocol.Compact.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Collections.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Configuration.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Server.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Utils.pas"/>
+			<DCCReference Include="..\..\src\Thrift.WinHTTP.pas"/>
+			<DCCReference Include="..\..\src\Thrift.TypeRegistry.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Stream.pas"/>
+			<BuildConfiguration Include="Debug">
 				<Key>Cfg_2</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
 			<BuildConfiguration Include="Basis">
 				<Key>Base</Key>
 			</BuildConfiguration>
-			<BuildConfiguration Include="Debug">
+			<BuildConfiguration Include="Release">
 				<Key>Cfg_1</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
@@ -65,15 +97,16 @@
 		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
 		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
 		<PropertyGroup>
-			<PreBuildEvent><![CDATA[if exist gen-delphi del gen-delphi\* /s /q
-thrift -r  -gen delphi ReservedKeywords.thrift
-thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
+			<PreBuildEvent><![CDATA[thrift.exe -r -gen delphi idl\skiptest_version_1.thrift]]></PreBuildEvent>
 		</PropertyGroup>
 		<ProjectExtensions>
 			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
-			<Borland.ProjectType/>
+			<Borland.ProjectType>VCLApplication</Borland.ProjectType>
 			<BorlandProject>
 				<Delphi.Personality>
+					<Source>
+						<Source Name="MainSource">skiptest_version1.dpr</Source>
+					</Source>
 					<VersionInfo>
 						<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
 						<VersionInfo Name="AutoIncBuild">False</VersionInfo>
@@ -101,9 +134,6 @@ thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
 						<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
 						<VersionInfoKeys Name="Comments"/>
 					</VersionInfoKeys>
-					<Source>
-						<Source Name="MainSource">ReservedKeywords.dpr</Source>
-					</Source>
 				</Delphi.Personality>
 				<Platforms>
 					<Platform value="Win32">True</Platform>
diff --git a/lib/delphi/test/skip/skiptest_version2.dpr b/lib/delphi/test/skip/skiptest_version2.dpr
index 478ea7c..b3a270d 100644
--- a/lib/delphi/test/skip/skiptest_version2.dpr
+++ b/lib/delphi/test/skip/skiptest_version2.dpr
@@ -23,7 +23,7 @@ program skiptest_version2;
 
 uses
   Classes, Windows, SysUtils,
-  Skiptest.Two,
+  Skiptest.Two in 'gen-delphi\Skiptest.Two.pas',
   Thrift in '..\..\src\Thrift.pas',
   Thrift.Exception in '..\..\src\Thrift.Exception.pas',
   Thrift.Socket in '..\..\src\Thrift.Socket.pas',
@@ -49,7 +49,7 @@ var list : IThriftList<IPong>;
     set_ : IHashSet<string>;
 begin
   result := TPingImpl.Create;
-  result.Version1  := Tskiptest_version_2Constants.SKIPTESTSERVICE_VERSION;
+  result.Version1  := TConstants.SKIPTESTSERVICE_VERSION;
   result.EnumTest  := TPingPongEnum.PingTwo;
 
   result.BoolVal   := TRUE;
@@ -219,7 +219,7 @@ const
   FILE_COMPACT = 'pingpong.compact';
 begin
   try
-    Writeln( 'Delphi SkipTest '+IntToStr(Tskiptest_version_2Constants.SKIPTESTSERVICE_VERSION)+' using '+Thrift.Version);
+    Writeln( 'Delphi SkipTest '+IntToStr(TConstants.SKIPTESTSERVICE_VERSION)+' using '+Thrift.Version);
 
     Writeln;
     Writeln('Binary protocol');
diff --git a/lib/delphi/test/keywords/ReservedKeywords.dproj b/lib/delphi/test/skip/skiptest_version2.dproj
similarity index 60%
copy from lib/delphi/test/keywords/ReservedKeywords.dproj
copy to lib/delphi/test/skip/skiptest_version2.dproj
index cc36988..3192d28 100644
--- a/lib/delphi/test/keywords/ReservedKeywords.dproj
+++ b/lib/delphi/test/skip/skiptest_version2.dproj
@@ -1,63 +1,95 @@
-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 		<PropertyGroup>
-			<ProjectGuid>{F2E9B6FC-A931-4271-8E30-5A4E402481B4}</ProjectGuid>
-			<MainSource>ReservedKeywords.dpr</MainSource>
-			<ProjectVersion>12.3</ProjectVersion>
+			<ProjectGuid>{DBB2D6D8-0FC6-4329-8408-28B1452B33AD}</ProjectGuid>
+			<MainSource>skiptest_version2.dpr</MainSource>
 			<Basis>True</Basis>
 			<Config Condition="'$(Config)'==''">Debug</Config>
 			<Platform>Win32</Platform>
 			<AppType>Console</AppType>
 			<FrameworkType>None</FrameworkType>
 			<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
+			<ProjectVersion>12.3</ProjectVersion>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Config)'=='Basis' or '$(Base)'!=''">
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
 			<Cfg_1>true</Cfg_1>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
 			<Cfg_2>true</Cfg_2>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Base)'!=''">
+			<DCC_DcuOutput>dcu\$(Project)\$(Config)\$(Platform)</DCC_DcuOutput>
+			<DCC_ExeOutput>bin\$(Config)\$(Platform)</DCC_ExeOutput>
+			<DCC_E>false</DCC_E>
 			<DCC_ImageBase>00400000</DCC_ImageBase>
-			<DCC_DcuOutput>.\$(Config)\$(Platform)</DCC_DcuOutput>
-			<DCC_UnitSearchPath>gen-delphi;..\..\src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
-			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;$(DCC_UnitAlias)</DCC_UnitAlias>
-			<DCC_ExeOutput>.\$(Config)\$(Platform)</DCC_ExeOutput>
-			<DCC_N>false</DCC_N>
+			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;WinTypes=Windows;WinProcs=Windows;$(DCC_UnitAlias)</DCC_UnitAlias>
+			<DCC_F>false</DCC_F>
 			<DCC_S>false</DCC_S>
+			<DCC_N>false</DCC_N>
 			<DCC_K>false</DCC_K>
-			<DCC_E>false</DCC_E>
-			<DCC_F>false</DCC_F>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Cfg_1)'!=''">
-			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
-			<DCC_Optimize>false</DCC_Optimize>
-			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Cfg_2)'!=''">
 			<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
 			<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
 			<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
 			<DCC_DebugInformation>false</DCC_DebugInformation>
 		</PropertyGroup>
+		<PropertyGroup Condition="'$(Cfg_2)'!=''">
+			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
+			<DCC_Optimize>false</DCC_Optimize>
+			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+		</PropertyGroup>
 		<ItemGroup>
-			<DelphiCompile Include="ReservedKeywords.dpr">
+			<DelphiCompile Include="skiptest_version2.dpr">
 				<MainSource>MainSource</MainSource>
 			</DelphiCompile>
-			<BuildConfiguration Include="Release">
+			<DCCReference Include="gen-delphi\Skiptest.Two.pas"/>
+			<DCCReference Include="..\..\src\Thrift.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Exception.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Socket.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Transport.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Protocol.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Protocol.JSON.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Protocol.Compact.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Collections.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Configuration.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Server.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Utils.pas"/>
+			<DCCReference Include="..\..\src\Thrift.WinHTTP.pas"/>
+			<DCCReference Include="..\..\src\Thrift.TypeRegistry.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Stream.pas"/>
+			<BuildConfiguration Include="Debug">
 				<Key>Cfg_2</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
 			<BuildConfiguration Include="Basis">
 				<Key>Base</Key>
 			</BuildConfiguration>
-			<BuildConfiguration Include="Debug">
+			<BuildConfiguration Include="Release">
 				<Key>Cfg_1</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
@@ -65,15 +97,16 @@
 		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
 		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
 		<PropertyGroup>
-			<PreBuildEvent><![CDATA[if exist gen-delphi del gen-delphi\* /s /q
-thrift -r  -gen delphi ReservedKeywords.thrift
-thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
+			<PreBuildEvent><![CDATA[thrift.exe -r -gen delphi idl\skiptest_version_2.thrift]]></PreBuildEvent>
 		</PropertyGroup>
 		<ProjectExtensions>
 			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
-			<Borland.ProjectType/>
+			<Borland.ProjectType>VCLApplication</Borland.ProjectType>
 			<BorlandProject>
 				<Delphi.Personality>
+					<Source>
+						<Source Name="MainSource">skiptest_version2.dpr</Source>
+					</Source>
 					<VersionInfo>
 						<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
 						<VersionInfo Name="AutoIncBuild">False</VersionInfo>
@@ -101,9 +134,6 @@ thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
 						<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
 						<VersionInfoKeys Name="Comments"/>
 					</VersionInfoKeys>
-					<Source>
-						<Source Name="MainSource">ReservedKeywords.dpr</Source>
-					</Source>
 				</Delphi.Personality>
 				<Platforms>
 					<Platform value="Win32">True</Platform>
diff --git a/lib/delphi/test/typeregistry/TestTypeRegistry.dpr b/lib/delphi/test/typeregistry/TestTypeRegistry.dpr
index 2896bbf..c7a9767 100644
--- a/lib/delphi/test/typeregistry/TestTypeRegistry.dpr
+++ b/lib/delphi/test/typeregistry/TestTypeRegistry.dpr
@@ -37,7 +37,8 @@ uses
   Thrift.Stream in '..\..\src\Thrift.Stream.pas',
   Thrift.WinHTTP in '..\..\src\Thrift.WinHTTP.pas',
   Thrift.TypeRegistry in '..\..\src\Thrift.TypeRegistry.pas',
-  Thrift.Test, // in 'gen-delphi\Thrift.Test.pas',
+  Thrift.Test in 'gen-delphi\Thrift.Test.pas',
+  DebugProtoTest in 'gen-delphi\DebugProtoTest.pas',
   Test.TypeRegistry,
   Test.EnumToString;
 
diff --git a/lib/delphi/test/keywords/ReservedKeywords.dproj b/lib/delphi/test/typeregistry/TestTypeRegistry.dproj
similarity index 59%
copy from lib/delphi/test/keywords/ReservedKeywords.dproj
copy to lib/delphi/test/typeregistry/TestTypeRegistry.dproj
index cc36988..814faf4 100644
--- a/lib/delphi/test/keywords/ReservedKeywords.dproj
+++ b/lib/delphi/test/typeregistry/TestTypeRegistry.dproj
@@ -1,63 +1,96 @@
-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 		<PropertyGroup>
-			<ProjectGuid>{F2E9B6FC-A931-4271-8E30-5A4E402481B4}</ProjectGuid>
-			<MainSource>ReservedKeywords.dpr</MainSource>
-			<ProjectVersion>12.3</ProjectVersion>
+			<ProjectGuid>{D6B3910D-CD64-449F-B7A6-404D5DF1DAC5}</ProjectGuid>
+			<MainSource>TestTypeRegistry.dpr</MainSource>
 			<Basis>True</Basis>
 			<Config Condition="'$(Config)'==''">Debug</Config>
 			<Platform>Win32</Platform>
 			<AppType>Console</AppType>
 			<FrameworkType>None</FrameworkType>
 			<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
+			<ProjectVersion>12.3</ProjectVersion>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Config)'=='Basis' or '$(Base)'!=''">
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
 			<Cfg_1>true</Cfg_1>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
-		<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
+		<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
 			<Cfg_2>true</Cfg_2>
 			<CfgParent>Base</CfgParent>
 			<Base>true</Base>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Base)'!=''">
+			<DCC_DcuOutput>dcu\$(Project)\$(Config)\$(Platform)</DCC_DcuOutput>
+			<DCC_ExeOutput>bin\$(Config)\$(Platform)</DCC_ExeOutput>
+			<DCC_E>false</DCC_E>
 			<DCC_ImageBase>00400000</DCC_ImageBase>
-			<DCC_DcuOutput>.\$(Config)\$(Platform)</DCC_DcuOutput>
-			<DCC_UnitSearchPath>gen-delphi;..\..\src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
-			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;$(DCC_UnitAlias)</DCC_UnitAlias>
-			<DCC_ExeOutput>.\$(Config)\$(Platform)</DCC_ExeOutput>
-			<DCC_N>false</DCC_N>
+			<DCC_UnitAlias>WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;WinTypes=Windows;WinProcs=Windows;$(DCC_UnitAlias)</DCC_UnitAlias>
+			<DCC_F>false</DCC_F>
 			<DCC_S>false</DCC_S>
+			<DCC_N>false</DCC_N>
 			<DCC_K>false</DCC_K>
-			<DCC_E>false</DCC_E>
-			<DCC_F>false</DCC_F>
 		</PropertyGroup>
 		<PropertyGroup Condition="'$(Cfg_1)'!=''">
-			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
-			<DCC_Optimize>false</DCC_Optimize>
-			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
-		</PropertyGroup>
-		<PropertyGroup Condition="'$(Cfg_2)'!=''">
 			<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
 			<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
 			<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
 			<DCC_DebugInformation>false</DCC_DebugInformation>
 		</PropertyGroup>
+		<PropertyGroup Condition="'$(Cfg_2)'!=''">
+			<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
+			<DCC_Optimize>false</DCC_Optimize>
+			<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
+		</PropertyGroup>
 		<ItemGroup>
-			<DelphiCompile Include="ReservedKeywords.dpr">
+			<DelphiCompile Include="TestTypeRegistry.dpr">
 				<MainSource>MainSource</MainSource>
 			</DelphiCompile>
-			<BuildConfiguration Include="Release">
+			<DCCReference Include="..\..\src\Thrift.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Transport.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Exception.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Socket.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Protocol.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Protocol.JSON.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Collections.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Configuration.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Server.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Utils.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Serializer.pas"/>
+			<DCCReference Include="..\..\src\Thrift.Stream.pas"/>
+			<DCCReference Include="..\..\src\Thrift.WinHTTP.pas"/>
+			<DCCReference Include="..\..\src\Thrift.TypeRegistry.pas"/>
+			<DCCReference Include="gen-delphi\Thrift.Test.pas"/>
+			<DCCReference Include="gen-delphi\DebugProtoTest.pas"/>
+			<BuildConfiguration Include="Debug">
 				<Key>Cfg_2</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
 			<BuildConfiguration Include="Basis">
 				<Key>Base</Key>
 			</BuildConfiguration>
-			<BuildConfiguration Include="Debug">
+			<BuildConfiguration Include="Release">
 				<Key>Cfg_1</Key>
 				<CfgParent>Base</CfgParent>
 			</BuildConfiguration>
@@ -65,15 +98,17 @@
 		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
 		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
 		<PropertyGroup>
-			<PreBuildEvent><![CDATA[if exist gen-delphi del gen-delphi\* /s /q
-thrift -r  -gen delphi ReservedKeywords.thrift
-thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
+			<PreBuildEvent><![CDATA[thrift.exe -r -gen delphi:register_types ..\..\..\..\test\ThriftTest.thrift
+thrift.exe -r -gen delphi:register_types ..\..\..\..\test\DebugProtoTest.thrift]]></PreBuildEvent>
 		</PropertyGroup>
 		<ProjectExtensions>
 			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
-			<Borland.ProjectType/>
+			<Borland.ProjectType>VCLApplication</Borland.ProjectType>
 			<BorlandProject>
 				<Delphi.Personality>
+					<Source>
+						<Source Name="MainSource">TestTypeRegistry.dpr</Source>
+					</Source>
 					<VersionInfo>
 						<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
 						<VersionInfo Name="AutoIncBuild">False</VersionInfo>
@@ -101,9 +136,6 @@ thrift -r  -gen delphi ..\..\..\..\test\AnnotationTest.thrift]]></PreBuildEvent>
 						<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
 						<VersionInfoKeys Name="Comments"/>
 					</VersionInfoKeys>
-					<Source>
-						<Source Name="MainSource">ReservedKeywords.dpr</Source>
-					</Source>
 				</Delphi.Personality>
 				<Platforms>
 					<Platform value="Win32">True</Platform>
diff --git a/tutorial/delphi/DelphiClient/DelphiClient.dpr b/tutorial/delphi/DelphiClient/DelphiClient.dpr
index 64d7d68..e44ae3b 100644
--- a/tutorial/delphi/DelphiClient/DelphiClient.dpr
+++ b/tutorial/delphi/DelphiClient/DelphiClient.dpr
@@ -36,8 +36,8 @@ uses
   Thrift.Transport.WinHTTP in '..\..\..\lib\delphi\src\Thrift.Transport.WinHTTP.pas',
   Thrift.Transport.MsxmlHTTP in '..\..\..\lib\delphi\src\Thrift.Transport.MsxmlHTTP.pas',
   Thrift.WinHTTP in '..\..\..\lib\delphi\src\Thrift.WinHTTP.pas',
-  Shared in '..\..\gen-delphi\Shared.pas',
-  Tutorial in '..\..\gen-delphi\Tutorial.pas';
+  Shared in '..\gen-delphi\Shared.pas',
+  Tutorial in '..\gen-delphi\Tutorial.pas';
 
 
 type
diff --git a/tutorial/delphi/DelphiClient/DelphiClient.dproj b/tutorial/delphi/DelphiClient/DelphiClient.dproj
index 47262e3..1e2ab3d 100644
--- a/tutorial/delphi/DelphiClient/DelphiClient.dproj
+++ b/tutorial/delphi/DelphiClient/DelphiClient.dproj
@@ -1,4 +1,22 @@
-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 		<PropertyGroup>
 			<ProjectGuid>{2B8FB3A1-2F9E-4883-8C53-0F56220B34F6}</ProjectGuid>
 			<MainSource>DelphiClient.dpr</MainSource>
@@ -62,8 +80,8 @@
 			<DCCReference Include="..\..\..\lib\delphi\src\Thrift.Transport.WinHTTP.pas"/>
 			<DCCReference Include="..\..\..\lib\delphi\src\Thrift.Transport.MsxmlHTTP.pas"/>
 			<DCCReference Include="..\..\..\lib\delphi\src\Thrift.WinHTTP.pas"/>
-			<DCCReference Include="..\..\gen-delphi\Shared.pas"/>
-			<DCCReference Include="..\..\gen-delphi\Tutorial.pas"/>
+			<DCCReference Include="..\gen-delphi\Shared.pas"/>
+			<DCCReference Include="..\gen-delphi\Tutorial.pas"/>
 			<BuildConfiguration Include="Release">
 				<Key>Cfg_2</Key>
 				<CfgParent>Base</CfgParent>
@@ -78,6 +96,11 @@
 		</ItemGroup>
 		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
 		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
+		<PropertyGroup>
+			<PreBuildEvent><![CDATA[pushd ..
+thrift.exe -r -gen delphi ..\tutorial.thrift
+popd]]></PreBuildEvent>
+		</PropertyGroup>
 		<ProjectExtensions>
 			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
 			<Borland.ProjectType/>
@@ -113,6 +136,9 @@
 					<Source>
 						<Source Name="MainSource">DelphiClient.dpr</Source>
 					</Source>
+					<Parameters>
+						<Parameters Name="RunParams">--transport framed --http http://example.org</Parameters>
+					</Parameters>
 				</Delphi.Personality>
 				<Platforms>
 					<Platform value="Win32">True</Platform>
diff --git a/tutorial/delphi/DelphiServer/DelphiServer.dpr b/tutorial/delphi/DelphiServer/DelphiServer.dpr
index 41a3514..5f2dc45 100644
--- a/tutorial/delphi/DelphiServer/DelphiServer.dpr
+++ b/tutorial/delphi/DelphiServer/DelphiServer.dpr
@@ -36,8 +36,8 @@ uses
   Thrift.Server in '..\..\..\lib\delphi\src\Thrift.Server.pas',
   Thrift.Transport in '..\..\..\lib\delphi\src\Thrift.Transport.pas',
   Thrift.WinHTTP in '..\..\..\lib\delphi\src\Thrift.WinHTTP.pas',
-  Shared in '..\..\gen-delphi\Shared.pas',
-  Tutorial in '..\..\gen-delphi\Tutorial.pas';
+  Shared in '..\gen-delphi\Shared.pas',
+  Tutorial in '..\gen-delphi\Tutorial.pas';
 
 
 type
diff --git a/tutorial/delphi/DelphiServer/DelphiServer.dproj b/tutorial/delphi/DelphiServer/DelphiServer.dproj
index 2624f92..b1b7f48 100644
--- a/tutorial/delphi/DelphiServer/DelphiServer.dproj
+++ b/tutorial/delphi/DelphiServer/DelphiServer.dproj
@@ -1,4 +1,22 @@
-	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+	<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 		<PropertyGroup>
 			<ProjectGuid>{2B8FB3A1-2F9E-4883-8C53-0F56220B34F6}</ProjectGuid>
 			<MainSource>DelphiServer.dpr</MainSource>
@@ -59,8 +77,8 @@
 			<DCCReference Include="..\..\..\lib\delphi\src\Thrift.Server.pas"/>
 			<DCCReference Include="..\..\..\lib\delphi\src\Thrift.Transport.pas"/>
 			<DCCReference Include="..\..\..\lib\delphi\src\Thrift.WinHTTP.pas"/>
-			<DCCReference Include="..\..\gen-delphi\Shared.pas"/>
-			<DCCReference Include="..\..\gen-delphi\Tutorial.pas"/>
+			<DCCReference Include="..\gen-delphi\Shared.pas"/>
+			<DCCReference Include="..\gen-delphi\Tutorial.pas"/>
 			<BuildConfiguration Include="Release">
 				<Key>Cfg_2</Key>
 				<CfgParent>Base</CfgParent>
@@ -75,6 +93,11 @@
 		</ItemGroup>
 		<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
 		<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
+		<PropertyGroup>
+			<PreBuildEvent><![CDATA[pushd ..
+thrift.exe -r -gen delphi ..\tutorial.thrift
+popd]]></PreBuildEvent>
+		</PropertyGroup>
 		<ProjectExtensions>
 			<Borland.Personality>Delphi.Personality.12</Borland.Personality>
 			<Borland.ProjectType/>