Преглед изворни кода

* additional negative testcase for interfaces

git-svn-id: trunk@12726 -
ivost пре 16 година
родитељ
комит
cf7b755dc0
3 измењених фајлова са 20 додато и 2 уклоњено
  1. 1 0
      .gitattributes
  2. 5 2
      tests/tbf/tb0215d.pp
  3. 14 0
      tests/tbf/tb0215e.pp

+ 1 - 0
.gitattributes

@@ -6667,6 +6667,7 @@ tests/tbf/tb0215a.pp svneol=native#text/plain
 tests/tbf/tb0215b.pp svneol=native#text/plain
 tests/tbf/tb0215b.pp svneol=native#text/plain
 tests/tbf/tb0215c.pp svneol=native#text/plain
 tests/tbf/tb0215c.pp svneol=native#text/plain
 tests/tbf/tb0215d.pp svneol=native#text/plain
 tests/tbf/tb0215d.pp svneol=native#text/plain
+tests/tbf/tb0215e.pp svneol=native#text/plain
 tests/tbf/ub0115.pp svneol=native#text/plain
 tests/tbf/ub0115.pp svneol=native#text/plain
 tests/tbf/ub0149.pp svneol=native#text/plain
 tests/tbf/ub0149.pp svneol=native#text/plain
 tests/tbf/ub0158a.pp svneol=native#text/plain
 tests/tbf/ub0158a.pp svneol=native#text/plain

+ 5 - 2
tests/tbf/tb0215d.pp

@@ -9,8 +9,11 @@ type
     ['{0374223C-E460-4CC2-ABFD-7723AAB80CFE}']
     ['{0374223C-E460-4CC2-ABFD-7723AAB80CFE}']
   end;
   end;
 
 
-const
-  Test_IID: Shortstring = ITest;
+procedure foo(iid: shortstring);
+begin
+end;
 
 
 begin
 begin
+  foo(ITest);
 end.
 end.
+

+ 14 - 0
tests/tbf/tb0215e.pp

@@ -0,0 +1,14 @@
+{ %FAIL }
+// it's not allowed to assign a corbainterface to TGuid
+
+{$mode objfpc}
+
+{$INTERFACES COM}
+
+procedure test(iid: tguid);
+begin
+end;
+
+begin
+  test('{0374223C-E460-4CC2-ABFD-7723AAB80CFE}');
+end.