Testcase fixed
diff --git a/lib/delphi/test/serializer/TestSerializer.dpr b/lib/delphi/test/serializer/TestSerializer.dpr
index 60e55c1..3d9a453 100644
--- a/lib/delphi/test/serializer/TestSerializer.dpr
+++ b/lib/delphi/test/serializer/TestSerializer.dpr
@@ -17,7 +17,7 @@
* under the License.
*)
-program skiptest_version1;
+program TestSerializer;
{$APPTYPE CONSOLE}
@@ -33,6 +33,7 @@
Thrift.Utils in '..\..\src\Thrift.Utils.pas',
Thrift.Serializer in '..\..\src\Thrift.Serializer.pas',
Thrift.Stream in '..\..\src\Thrift.Stream.pas',
+ Thrift.TypeRegistry in '..\..\src\Thrift.TypeRegistry.pas',
DebugProtoTest,
TestSerializer.Data;
@@ -48,11 +49,13 @@
class procedure Deserialize( const input : TBytes; const target : IBase; const factory : IProtocolFactory); overload;
class procedure Deserialize( const input : TStream; const target : IBase; const factory : IProtocolFactory); overload;
+ procedure Test_Serializer_Deserializer;
+
public
constructor Create;
destructor Destroy; override;
- procedure TestDeserialize;
+ procedure RunTests;
end;
@@ -78,9 +81,10 @@
end;
end;
-
-procedure TTestSerializer.TestDeserialize;
type TMethod = (mt_Bytes, mt_Stream);
+
+
+procedure TTestSerializer.Test_Serializer_Deserializer;
var level3ooe, correct : IOneOfEach;
factory : IProtocolFactory;
bytes : TBytes;
@@ -153,6 +157,19 @@
end;
+procedure TTestSerializer.RunTests;
+begin
+ try
+ Test_Serializer_Deserializer;
+ except
+ on e:Exception do begin
+ Writeln( e.Message);
+ Write('Hit ENTER to close ... '); Readln;
+ end;
+ end;
+end;
+
+
class function TTestSerializer.Serialize(const input : IBase; const factory : IProtocolFactory) : TBytes;
var serial : TSerializer;
begin
@@ -204,7 +221,7 @@
begin
test := TTestSerializer.Create;
try
- test.TestDeserialize;
+ test.RunTests;
finally
test.Free;
end;