You've already forked lazarus-ccr
Parser : map xsd:string to UnicodeString (fix tests).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3056 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<schema xmlns:tns="class_extent_native_type" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="class_extent_native_type">
|
||||
<schema xmlns:tns="class_extent_native_type" xmlns:wst="urn:wst_base" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="class_extent_native_type">
|
||||
|
||||
<xsd:complexType name="TExtendString">
|
||||
<xsd:simpleContent>
|
||||
@ -12,7 +12,7 @@
|
||||
<xsd:complexType name="TExtendBase64String">
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:base64Binary">
|
||||
<xsd:attribute use="required" name="strAtt" type="xsd:string"/>
|
||||
<xsd:attribute use="required" name="strAtt" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
|
@ -6,10 +6,10 @@
|
||||
<xsd:complexType name="TSampleHeader" wst:wst_headerBlock="true">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="intField" type="xsd:int"/>
|
||||
<xsd:element name="strField" type="xsd:string"/>
|
||||
<xsd:element name="strField" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:element name="floatField" type="xsd:float"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute use="required" name="strAtt" type="xsd:string"/>
|
||||
<xsd:attribute use="required" name="strAtt" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:attribute use="required" name="intAtt" type="xsd:int"/>
|
||||
</xsd:complexType>
|
||||
</schema>
|
||||
|
@ -5,7 +5,7 @@
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
targetNamespace="class_headerblock_simplecontent_derived">
|
||||
<xsd:complexType name="TSampleHeader" wst:wst_headerBlockSimpleContent="true">
|
||||
<xsd:attribute use="required" name="strAtt" type="xsd:string"/>
|
||||
<xsd:attribute use="required" name="strAtt" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:attribute use="required" name="intAtt" type="xsd:int"/>
|
||||
</xsd:complexType>
|
||||
</schema>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0"?>
|
||||
<schema targetNamespace="class_properties_default" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="class_properties_default">
|
||||
<xsd:complexType name="TClassSampleType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="intField" type="xsd:int" default="1210"/>
|
||||
<xsd:element name="strField" type="xsd:string" default="azerty"/>
|
||||
<xsd:element name="floatField" type="xsd:float" default="1234"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="strAtt" type="xsd:string" default="attribute azerty" use="required"/>
|
||||
<xsd:attribute name="intAtt" type="xsd:int" default="789" use="required"/>
|
||||
</xsd:complexType>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<schema xmlns:tns="class_properties_default" xmlns:wst="urn:wst_base" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="class_properties_default">
|
||||
<xsd:complexType name="TClassSampleType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="intField" type="xsd:int" default="1210"/>
|
||||
<xsd:element name="strField" type="xsd:string" default="azerty" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:element name="floatField" type="xsd:float" default="1234"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute use="required" name="strAtt" type="xsd:string" default="attribute azerty" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:attribute use="required" name="intAtt" type="xsd:int" default="789"/>
|
||||
</xsd:complexType>
|
||||
</schema>
|
||||
|
@ -1,18 +1,12 @@
|
||||
<schema targetNamespace="urn:wst-test"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:tns="urn:wst-test"
|
||||
xmlns:ns3="uri-4"
|
||||
xmlns:ns4="uri-5"
|
||||
>
|
||||
|
||||
<xsd:complexType name="TClassSampleType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="intField" type="xsd:int" ns3:a="1210" ns3:b="ns4:xx"/>
|
||||
<xsd:element name="strField" type="xsd:string" default="azerty" ns3:a="xsd:int"/>
|
||||
<xsd:element name="floatField" type="xsd:float"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="strAtt" type="xsd:string" default="attribute azerty" use="required" ns3:a="optional"/>
|
||||
<xsd:attribute name="intAtt" type="xsd:int" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<schema xmlns:ns3="uri-4" xmlns:ns4="uri-5" xmlns:tns="urn:wst-test" xmlns:wst="urn:wst_base" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:wst-test">
|
||||
<xsd:complexType name="TClassSampleType">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="intField" type="xsd:int" ns3:a="1210" ns3:b="ns4:xx"/>
|
||||
<xsd:element name="strField" type="xsd:string" ns3:a="xsd:int" default="azerty" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:element name="floatField" type="xsd:float"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute use="required" name="strAtt" type="xsd:string" ns3:a="optional" default="attribute azerty" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:attribute use="required" name="intAtt" type="xsd:int"/>
|
||||
</xsd:complexType>
|
||||
</schema>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<schema xmlns:tns="urn:wst-test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:wst-test">
|
||||
<schema xmlns:tns="urn:wst-test" xmlns:wst="urn:wst_base" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:wst-test">
|
||||
<xsd:complexType name="TComplexType">
|
||||
<xsd:sequence>
|
||||
<xsd:any maxOccurs="unbounded" minOccurs="0" processContents="lax"/>
|
||||
@ -7,19 +7,19 @@
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TComplexType2">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="strField" type="xsd:string"/>
|
||||
<xsd:element name="strField" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:any maxOccurs="unbounded" minOccurs="0" processContents="lax"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TComplexTypeParent">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="strFieldParent" type="xsd:string"/>
|
||||
<xsd:element name="strFieldParent" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TComplexTypeChild">
|
||||
<xsd:extension base="tns:TComplexTypeParent">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="strFieldChild" type="xsd:string"/>
|
||||
<xsd:element name="strFieldChild" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:any maxOccurs="10" minOccurs="2" processContents="skip"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<schema xmlns:tns="urn:wst-test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:wst-test">
|
||||
<schema xmlns:tns="urn:wst-test" xmlns:wst="urn:wst_base" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:wst-test">
|
||||
<xsd:complexType name="TComplexType">
|
||||
<xsd:sequence>
|
||||
<xsd:any maxOccurs="unbounded" minOccurs="0" processContents="lax"/>
|
||||
@ -8,23 +8,23 @@
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TComplexType2">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="strField" type="xsd:string"/>
|
||||
<xsd:element name="strFieldAtt" type="xsd:string"/>
|
||||
<xsd:element name="strField" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:element name="strFieldAtt" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:any maxOccurs="unbounded" minOccurs="0" processContents="lax"/>
|
||||
</xsd:sequence>
|
||||
<xsd:anyAttribute processContents="strict"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TComplexTypeParent">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="strFieldParent" type="xsd:string"/>
|
||||
<xsd:element name="strFieldParentAtt" type="xsd:string"/>
|
||||
<xsd:element name="strFieldParent" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:element name="strFieldParentAtt" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TComplexTypeChild">
|
||||
<xsd:extension base="tns:TComplexTypeParent">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="strFieldChild" type="xsd:string"/>
|
||||
<xsd:element name="strFieldChildAtt" type="xsd:string"/>
|
||||
<xsd:element name="strFieldChild" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:element name="strFieldChildAtt" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:any maxOccurs="10" minOccurs="2" processContents="skip"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
|
@ -1,26 +1,26 @@
|
||||
<?xml version="1.0"?>
|
||||
<schema xmlns:tns="urn:wst-test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:wst-test">
|
||||
<schema xmlns:tns="urn:wst-test" xmlns:wst="urn:wst_base" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:wst-test">
|
||||
<xsd:complexType name="TComplexType">
|
||||
<xsd:anyAttribute processContents="lax"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TComplexType2">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="strField" type="xsd:string"/>
|
||||
<xsd:element name="strFieldAtt" type="xsd:string"/>
|
||||
<xsd:element name="strField" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:element name="strFieldAtt" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
</xsd:sequence>
|
||||
<xsd:anyAttribute processContents="strict"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TComplexTypeParent">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="strFieldParent" type="xsd:string"/>
|
||||
<xsd:element name="strFieldParentAtt" type="xsd:string"/>
|
||||
<xsd:element name="strFieldParent" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:element name="strFieldParentAtt" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="TComplexTypeChild">
|
||||
<xsd:extension base="tns:TComplexTypeParent">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="strFieldChild" type="xsd:string"/>
|
||||
<xsd:element name="strFieldChildAtt" type="xsd:string"/>
|
||||
<xsd:element name="strFieldChild" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
<xsd:element name="strFieldChildAtt" type="xsd:string" wst:TypeHint="UnicodeString"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
<xsd:anyAttribute processContents="skip"/>
|
||||
|
@ -23,6 +23,13 @@ uses
|
||||
{$ENDIF}
|
||||
pastree, pascal_parser_intf, xsd_parser, wsdl_parser, test_suite_utils, wst_types;
|
||||
|
||||
const
|
||||
STRING_TYPE_NAME =
|
||||
{$IFDEF WST_UNICODESTRING}
|
||||
'UnicodeString';
|
||||
{$ELSE WST_UNICODESTRING}
|
||||
'string';
|
||||
{$ENDIF WST_UNICODESTRING}
|
||||
type
|
||||
|
||||
{ TTest_CustomXsdParser }
|
||||
@ -787,7 +794,7 @@ begin
|
||||
CheckIs(elt,TPasClassType);
|
||||
clsType := elt as TPasClassType;
|
||||
CheckNotNull(clsType.AncestorType,'AncestorType is null');
|
||||
CheckSame(tr.FindElementNS('TComplexStringContentRemotable',sXSD_NS),clsType.AncestorType,clsType.AncestorType.Name);
|
||||
CheckSame(tr.FindElementNS('TComplexUnicodeStringContentRemotable',sXSD_NS),clsType.AncestorType,clsType.AncestorType.Name);
|
||||
|
||||
prpLs.Clear();
|
||||
for i := 0 to Pred(clsType.Members.Count) do begin
|
||||
@ -2256,8 +2263,8 @@ begin
|
||||
CheckNotNull(elt,s_class_name);
|
||||
CheckIs(elt,TPasClassType);
|
||||
clsType := elt as TPasClassType;
|
||||
CheckProperty('one_prop','one-prop','string',ptField);
|
||||
CheckProperty('one_two_prop','one-two-prop','string',ptAttribute);
|
||||
CheckProperty('one_prop','one-prop',STRING_TYPE_NAME,ptField);
|
||||
CheckProperty('one_two_prop','one-two-prop',STRING_TYPE_NAME,ptAttribute);
|
||||
finally
|
||||
tr.Free();
|
||||
end;
|
||||
@ -2490,7 +2497,7 @@ begin
|
||||
CheckEquals(x_targetNamespace,tr.GetNameSpace(elt as TPasType));
|
||||
CheckIs(elt,TPasAliasType);
|
||||
CheckNotNull(TPasAliasType(elt).DestType,'Date.DestType');
|
||||
CheckEquals('string',TPasAliasType(elt).DestType.Name);
|
||||
CheckEquals(STRING_TYPE_NAME,TPasAliasType(elt).DestType.Name);
|
||||
|
||||
elt := tr.FindElement('String');
|
||||
CheckNotNull(elt,'String');
|
||||
@ -2498,7 +2505,7 @@ begin
|
||||
CheckEquals(x_targetNamespace,tr.GetNameSpace(elt as TPasType));
|
||||
CheckIs(elt,TPasAliasType);
|
||||
CheckNotNull(TPasAliasType(elt).DestType,'String.DestType');
|
||||
CheckEquals('string',TPasAliasType(elt).DestType.Name);
|
||||
CheckEquals(STRING_TYPE_NAME,TPasAliasType(elt).DestType.Name);
|
||||
|
||||
elt := tr.FindElement('Boolean');
|
||||
CheckNotNull(elt,'Boolean');
|
||||
@ -2506,7 +2513,7 @@ begin
|
||||
CheckEquals(x_targetNamespace,tr.GetNameSpace(elt as TPasType));
|
||||
CheckIs(elt,TPasAliasType);
|
||||
CheckNotNull(TPasAliasType(elt).DestType,'Boolean.DestType');
|
||||
CheckEquals('string',TPasAliasType(elt).DestType.Name);
|
||||
CheckEquals(STRING_TYPE_NAME,TPasAliasType(elt).DestType.Name);
|
||||
|
||||
elt := tr.FindElement(x_complexType_SampleClassType);
|
||||
CheckNotNull(elt,x_complexType_SampleClassType);
|
||||
@ -2579,7 +2586,7 @@ begin
|
||||
CheckEquals(x_targetNamespace,tr.GetNameSpace(elt as TPasType));
|
||||
CheckIs(elt,TPasAliasType);
|
||||
CheckNotNull(TPasAliasType(elt).DestType,'SampleType.DestType');
|
||||
CheckEquals('string',TPasAliasType(elt).DestType.Name);
|
||||
CheckEquals(STRING_TYPE_NAME,TPasAliasType(elt).DestType.Name);
|
||||
|
||||
elt := tr.FindElement('SAMPLETYPE');
|
||||
CheckNotNull(elt,'SAMPLETYPE');
|
||||
@ -2587,7 +2594,7 @@ begin
|
||||
CheckEquals(x_targetNamespace,tr.GetNameSpace(elt as TPasType));
|
||||
CheckIs(elt,TPasAliasType);
|
||||
CheckNotNull(TPasAliasType(elt).DestType,'SAMPLETYPE.DestType');
|
||||
CheckEquals('string',TPasAliasType(elt).DestType.Name);
|
||||
CheckEquals(STRING_TYPE_NAME,TPasAliasType(elt).DestType.Name);
|
||||
|
||||
elt := tr.FindElement(x_complexType_SampleClassType);
|
||||
CheckNotNull(elt,x_complexType_SampleClassType);
|
||||
@ -2655,7 +2662,7 @@ begin
|
||||
CheckEquals('urn:wst-test',tr.GetNameSpace(elt as TPasType));
|
||||
CheckIs(elt,TPasAliasType);
|
||||
CheckNotNull(TPasAliasType(elt).DestType,'SampleType.DestType');
|
||||
CheckEquals('string',TPasAliasType(elt).DestType.Name);
|
||||
CheckEquals(STRING_TYPE_NAME,TPasAliasType(elt).DestType.Name);
|
||||
|
||||
elt := tr.FindElement('SAMPLETYPE');
|
||||
CheckNotNull(elt,'SAMPLETYPE');
|
||||
@ -2663,7 +2670,7 @@ begin
|
||||
CheckEquals('urn:wst-test',tr.GetNameSpace(elt as TPasType));
|
||||
CheckIs(elt,TPasAliasType);
|
||||
CheckNotNull(TPasAliasType(elt).DestType,'SAMPLETYPE.DestType');
|
||||
CheckEquals('string',TPasAliasType(elt).DestType.Name);
|
||||
CheckEquals(STRING_TYPE_NAME,TPasAliasType(elt).DestType.Name);
|
||||
|
||||
//-----------------------------------------
|
||||
mdl := tr.FindModule(CONST_NS);
|
||||
@ -2679,7 +2686,7 @@ begin
|
||||
CheckEquals(CONST_NS,tr.GetNameSpace(elt as TPasType));
|
||||
CheckIs(elt,TPasAliasType);
|
||||
CheckNotNull(TPasAliasType(elt).DestType,'TypeA.DestType');
|
||||
CheckEquals('string',TPasAliasType(elt).DestType.Name);
|
||||
CheckEquals(STRING_TYPE_NAME,TPasAliasType(elt).DestType.Name);
|
||||
|
||||
elt := tr.FindElement('TYPEA');
|
||||
CheckNotNull(elt,'TYPEA');
|
||||
@ -2687,7 +2694,7 @@ begin
|
||||
CheckEquals(CONST_NS,tr.GetNameSpace(elt as TPasType));
|
||||
CheckIs(elt,TPasAliasType);
|
||||
CheckNotNull(TPasAliasType(elt).DestType,'TYPEA.DestType');
|
||||
CheckEquals('string',TPasAliasType(elt).DestType.Name);
|
||||
CheckEquals(STRING_TYPE_NAME,TPasAliasType(elt).DestType.Name);
|
||||
|
||||
elt := tr.FindElement('CompoundType');
|
||||
CheckNotNull(elt,'CompoundType');
|
||||
@ -3192,7 +3199,7 @@ begin
|
||||
arg := TPasArgument(mthType.Args[0]);
|
||||
CheckNotNull(arg);
|
||||
CheckEquals(LowerCase('AConstParam'), LowerCase(arg.Name));
|
||||
CheckEquals(LowerCase('string'), LowerCase(arg.ArgType.Name));
|
||||
CheckEquals(LowerCase(STRING_TYPE_NAME), LowerCase(arg.ArgType.Name));
|
||||
arg := TPasArgument(mthType.Args[1]);
|
||||
CheckNotNull(arg);
|
||||
CheckEquals(LowerCase('AOutParam'), LowerCase(arg.Name));
|
||||
@ -3245,7 +3252,7 @@ begin
|
||||
arg := TPasArgument(mthType.Args[0]);
|
||||
CheckNotNull(arg);
|
||||
CheckEquals(LowerCase('AConstParam'), LowerCase(arg.Name));
|
||||
CheckEquals(LowerCase('string'), LowerCase(arg.ArgType.Name));
|
||||
CheckEquals(LowerCase(STRING_TYPE_NAME), LowerCase(arg.ArgType.Name));
|
||||
arg := TPasArgument(mthType.Args[1]);
|
||||
CheckNotNull(arg);
|
||||
CheckEquals(LowerCase('AOutParam'), LowerCase(arg.Name));
|
||||
@ -3258,7 +3265,7 @@ begin
|
||||
CheckIs(mthType,TPasFunctionType);
|
||||
res := TPasFunctionType(mthType).ResultEl;
|
||||
CheckNotNull(res, 'Result');
|
||||
CheckEquals(LowerCase('string'), LowerCase(res.ResultType.Name));
|
||||
CheckEquals(LowerCase(STRING_TYPE_NAME), LowerCase(res.ResultType.Name));
|
||||
CheckEquals(2, mthType.Args.Count, 'Parameter count');
|
||||
arg := TPasArgument(mthType.Args[0]);
|
||||
CheckNotNull(arg);
|
||||
@ -3281,7 +3288,7 @@ begin
|
||||
arg := TPasArgument(mthType.Args[0]);
|
||||
CheckNotNull(arg);
|
||||
CheckEquals(LowerCase('AConstParam'), LowerCase(arg.Name));
|
||||
CheckEquals(LowerCase('string'), LowerCase(arg.ArgType.Name));
|
||||
CheckEquals(LowerCase(STRING_TYPE_NAME), LowerCase(arg.ArgType.Name));
|
||||
arg := TPasArgument(mthType.Args[1]);
|
||||
CheckNotNull(arg);
|
||||
CheckEquals(LowerCase('AOutParam'), LowerCase(arg.Name));
|
||||
@ -3334,7 +3341,7 @@ begin
|
||||
arg := TPasArgument(mthType.Args[0]);
|
||||
CheckNotNull(arg);
|
||||
CheckEquals(LowerCase('AConstParam'), LowerCase(arg.Name));
|
||||
CheckEquals(LowerCase('string'), LowerCase(arg.ArgType.Name));
|
||||
CheckEquals(LowerCase(STRING_TYPE_NAME), LowerCase(arg.ArgType.Name));
|
||||
arg := TPasArgument(mthType.Args[1]);
|
||||
CheckNotNull(arg);
|
||||
CheckEquals(LowerCase('AOutParam'), LowerCase(arg.Name));
|
||||
@ -3347,7 +3354,7 @@ begin
|
||||
CheckIs(mthType,TPasFunctionType);
|
||||
res := TPasFunctionType(mthType).ResultEl;
|
||||
CheckNotNull(res, 'Result');
|
||||
CheckEquals(LowerCase('string'), LowerCase(res.ResultType.Name));
|
||||
CheckEquals(LowerCase(STRING_TYPE_NAME), LowerCase(res.ResultType.Name));
|
||||
CheckEquals(2, mthType.Args.Count, 'Parameter count');
|
||||
arg := TPasArgument(mthType.Args[0]);
|
||||
CheckNotNull(arg);
|
||||
@ -3370,7 +3377,7 @@ begin
|
||||
arg := TPasArgument(mthType.Args[0]);
|
||||
CheckNotNull(arg);
|
||||
CheckEquals(LowerCase('AConstParam'), LowerCase(arg.Name));
|
||||
CheckEquals(LowerCase('string'), LowerCase(arg.ArgType.Name));
|
||||
CheckEquals(LowerCase(STRING_TYPE_NAME), LowerCase(arg.ArgType.Name));
|
||||
arg := TPasArgument(mthType.Args[1]);
|
||||
CheckNotNull(arg);
|
||||
CheckEquals(LowerCase('AOutParam'), LowerCase(arg.Name));
|
||||
@ -3479,7 +3486,7 @@ begin
|
||||
arg := TPasArgument(mthType.Args[0]);
|
||||
CheckNotNull(arg);
|
||||
CheckEquals(LowerCase('AInParam'), LowerCase(arg.Name));
|
||||
CheckEquals(LowerCase('string'), LowerCase(arg.ArgType.Name));
|
||||
CheckEquals(LowerCase(STRING_TYPE_NAME), LowerCase(arg.ArgType.Name));
|
||||
arg := TPasArgument(mthType.Args[1]);
|
||||
CheckNotNull(arg);
|
||||
CheckEquals(LowerCase('AInOutParam'), LowerCase(arg.Name));
|
||||
@ -3498,7 +3505,7 @@ begin
|
||||
arg := TPasArgument(mthType.Args[0]);
|
||||
CheckNotNull(arg);
|
||||
CheckEquals(LowerCase('AInParam'), LowerCase(arg.Name));
|
||||
CheckEquals(LowerCase('string'), LowerCase(arg.ArgType.Name));
|
||||
CheckEquals(LowerCase(STRING_TYPE_NAME), LowerCase(arg.ArgType.Name));
|
||||
arg := TPasArgument(mthType.Args[1]);
|
||||
CheckNotNull(arg);
|
||||
CheckEquals(LowerCase('AInOutParam'), LowerCase(arg.Name));
|
||||
@ -3549,7 +3556,7 @@ begin
|
||||
arg := TPasArgument(mthType.Args[0]);
|
||||
CheckNotNull(arg);
|
||||
CheckEquals(LowerCase('AConstParam'), LowerCase(arg.Name));
|
||||
CheckEquals(LowerCase('string'), LowerCase(arg.ArgType.Name));
|
||||
CheckEquals(LowerCase(STRING_TYPE_NAME), LowerCase(arg.ArgType.Name));
|
||||
CheckEquals('argConst',GetEnumName(TypeInfo(TArgumentAccess),Ord(arg.Access)),'AConstParam');
|
||||
arg := TPasArgument(mthType.Args[1]);
|
||||
CheckNotNull(arg);
|
||||
@ -3663,7 +3670,7 @@ begin
|
||||
CheckEquals('one-two-param',tr.GetExternalName(arg),'Param External Name');
|
||||
res := TPasFunctionType(mthType).ResultEl;
|
||||
CheckNotNull(res, 'Result');
|
||||
CheckEquals(LowerCase('string'), LowerCase(res.ResultType.Name));
|
||||
CheckEquals(LowerCase(STRING_TYPE_NAME), LowerCase(res.ResultType.Name));
|
||||
finally
|
||||
tr.Free();
|
||||
end;
|
||||
|
Reference in New Issue
Block a user