mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 14:58:26 +02:00
* added new test for interface to tguid or shortstring constants
git-svn-id: trunk@12693 -
This commit is contained in:
parent
0f519439b5
commit
76694f6ec8
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -7824,6 +7824,7 @@ tests/test/tinterface2.pp svneol=native#text/plain
|
||||
tests/test/tinterface3.pp svneol=native#text/plain
|
||||
tests/test/tinterface4.pp svneol=native#text/plain
|
||||
tests/test/tinterface5.pp svneol=native#text/plain
|
||||
tests/test/tinterface6.pp svneol=native#text/plain
|
||||
tests/test/tinterrupt.pp svneol=native#text/plain
|
||||
tests/test/tintfdef.pp svneol=native#text/plain
|
||||
tests/test/tintuint.pp svneol=native#text/plain
|
||||
|
36
tests/test/tinterface6.pp
Normal file
36
tests/test/tinterface6.pp
Normal file
@ -0,0 +1,36 @@
|
||||
{$mode objfpc}
|
||||
|
||||
uses
|
||||
sysutils;
|
||||
|
||||
type
|
||||
{$interfaces corba}
|
||||
icorbainterface1 = interface
|
||||
['STRING_UID']
|
||||
end;
|
||||
|
||||
icorbainterface2 = interface
|
||||
['{95B5633F-38A8-4D5F-A7FA-A2EA2664C670}']
|
||||
end;
|
||||
|
||||
{$interfaces com}
|
||||
icominterface = interface
|
||||
['{04B6AB72-8F86-45F8-8D49-393E799F51A8}']
|
||||
end;
|
||||
|
||||
const
|
||||
iid_corba1: shortstring = icorbainterface1;
|
||||
iid_corba2: shortstring = icorbainterface2;
|
||||
iid_com: tguid = icominterface;
|
||||
iid_comref: tguid = '{04B6AB72-8F86-45F8-8D49-393E799F51A8}';
|
||||
|
||||
begin
|
||||
if iid_corba1 <> 'STRING_UID' then
|
||||
halt(1);
|
||||
|
||||
if iid_corba2 <> '{95B5633F-38A8-4D5F-A7FA-A2EA2664C670}' then
|
||||
halt(1);
|
||||
|
||||
if not IsEqualGUID(iid_com, iid_comref) then
|
||||
halt(1);
|
||||
end.
|
@ -62,6 +62,13 @@ begin
|
||||
writeln('getinterface icorbainterface1 not found');
|
||||
end;
|
||||
|
||||
if testclass1.getinterface(icorbainterface2,po1) then begin
|
||||
writeln('getinterface icorbainterface2 found');
|
||||
end
|
||||
else begin
|
||||
writeln('getinterface icorbainterface2 not found');
|
||||
end;
|
||||
|
||||
if testclass2.getinterface(icominterface,po1) then begin
|
||||
writeln('getinterface icominterface found');
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user