Make unit tests for GetTypeSize more completes
Issue #15
wontfix
Document the RTTI TTypeKind anomalies.
Then research to see if these checks can be actually implemented:
//{$IFOPT REALCOMPATIBILITY}
//procedure TTestSpringEventsMethods.Test_GetTypeSize_Real48();
//begin
// MatchType(TypeInfo(Real48), tkFloat, 6);
//end;
//{$ENDIF REALCOMPATIBILITY}
procedure TTestSpringEventsMethods.Test_GetTypeSize_File();
begin
// MatchType(TypeInfo(File), tkFloat, 0);
FailUnsupportedTypeForTypeInfo('File');
end;
procedure TTestSpringEventsMethods.Test_GetTypeSize_OpenString();
begin
// http://www.codexterity.com/delphistrings.htm
// MatchType(TypeInfo(OpenString), tkInteger, 4);
FailUnsupportedTypeForTypeInfo('OpenString');
end;
procedure TTestSpringEventsMethods.Test_GetTypeSize_Text();
begin
// MatchType(TypeInfo(Text), tkFloat, 0);
FailUnsupportedTypeForTypeInfo('Text');
end;
procedure TTestSpringEventsMethods.Test_GetTypeSize_TextFile();
begin
// MatchType(TypeInfo(TextFile), tkFloat, 0);
FailUnsupportedTypeForTypeInfo('TextFile');
end;
Comments (3)
-
repo owner -
reporter - edited description
-
repo owner - changed status to wontfix
Types without type info are not supported. by the RTTI. They will raise an exception inside the TEvent<T> (which is where the GetTypeSize routine is used)
- Log in to comment
All these types have no typeinfo and thus are not supported by Spring4D.