|
@@ -58,6 +58,7 @@ type
|
|
procedure TestWJ_IntfFunction_ArrayBufferArg;
|
|
procedure TestWJ_IntfFunction_ArrayBufferArg;
|
|
procedure TestWJ_IntfFunction_ArrayBufferViewArg;
|
|
procedure TestWJ_IntfFunction_ArrayBufferViewArg;
|
|
procedure TestWJ_IntfFunction_SequenceResult;
|
|
procedure TestWJ_IntfFunction_SequenceResult;
|
|
|
|
+ procedure TestWJ_IntfFunction_GlobalSequenceResult;
|
|
// Namespace attribute
|
|
// Namespace attribute
|
|
procedure TestWJ_NamespaceAttribute_Boolean;
|
|
procedure TestWJ_NamespaceAttribute_Boolean;
|
|
// maplike
|
|
// maplike
|
|
@@ -1177,6 +1178,55 @@ begin
|
|
]);
|
|
]);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TTestWebIDL2WasmJob.TestWJ_IntfFunction_GlobalSequenceResult;
|
|
|
|
+begin
|
|
|
|
+ TestWebIDL([
|
|
|
|
+ 'typedef sequence <long> LongSeq;',
|
|
|
|
+ 'interface Attr {',
|
|
|
|
+ ' LongSeq vibrate();',
|
|
|
|
+ '};',
|
|
|
|
+ ''],
|
|
|
|
+ [
|
|
|
|
+ 'Type',
|
|
|
|
+ '',
|
|
|
|
+ ' // Forward class definitions',
|
|
|
|
+ ' IJSAttr = interface;',
|
|
|
|
+ ' TJSAttr = class;',
|
|
|
|
+ ' TIntegerDynArray = IJSArray; // array of Integer',
|
|
|
|
+ '',
|
|
|
|
+ ' { --------------------------------------------------------------------',
|
|
|
|
+ ' TJSAttr',
|
|
|
|
+ ' --------------------------------------------------------------------}',
|
|
|
|
+ '',
|
|
|
|
+ ' IJSAttr = interface(IJSObject)',
|
|
|
|
+ ' [''{AA94F48A-2BFB-3877-82A6-208CA4B2AF2A}'']',
|
|
|
|
+ ' function vibrate: TIntegerDynArray;',
|
|
|
|
+ ' end;',
|
|
|
|
+ '',
|
|
|
|
+ ' TJSAttr = class(TJSObject,IJSAttr)',
|
|
|
|
+ ' Private',
|
|
|
|
+ ' Public',
|
|
|
|
+ ' function vibrate: TIntegerDynArray;',
|
|
|
|
+ ' class function Cast(const Intf: IJSObject): IJSAttr;',
|
|
|
|
+ ' end;',
|
|
|
|
+ '',
|
|
|
|
+ 'implementation',
|
|
|
|
+ '',
|
|
|
|
+ 'function TJSAttr.vibrate: TIntegerDynArray;',
|
|
|
|
+ 'begin',
|
|
|
|
+ ' Result:=InvokeJSObjectResult(''vibrate'',[],TJSArray) as TIntegerDynArray;',
|
|
|
|
+ 'end;',
|
|
|
|
+ '',
|
|
|
|
+ 'class function TJSAttr.Cast(const Intf: IJSObject): IJSAttr;',
|
|
|
|
+ 'begin',
|
|
|
|
+ ' Result:=TJSAttr.JOBCast(Intf);',
|
|
|
|
+ 'end;',
|
|
|
|
+ '',
|
|
|
|
+ 'end.'
|
|
|
|
+ ]);
|
|
|
|
+
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
|
|
procedure TTestWebIDL2WasmJob.TestWJ_NamespaceAttribute_Boolean;
|
|
procedure TTestWebIDL2WasmJob.TestWJ_NamespaceAttribute_Boolean;
|
|
begin
|
|
begin
|