Browse Source

* new negative test cases for interface to TGuid/Shortstring assign

git-svn-id: trunk@12724 -
ivost 16 years ago
parent
commit
b2235eb873
5 changed files with 70 additions and 0 deletions
  1. 4 0
      .gitattributes
  2. 16 0
      tests/tbf/tb0215a.pp
  3. 18 0
      tests/tbf/tb0215b.pp
  4. 16 0
      tests/tbf/tb0215c.pp
  5. 16 0
      tests/tbf/tb0215d.pp

+ 4 - 0
.gitattributes

@@ -6663,6 +6663,10 @@ tests/tbf/tb0212.pp svneol=native#text/plain
 tests/tbf/tb0213.pp svneol=native#text/plain
 tests/tbf/tb0213.pp svneol=native#text/plain
 tests/tbf/tb0214.pp svneol=native#text/plain
 tests/tbf/tb0214.pp svneol=native#text/plain
 tests/tbf/tb0215.pp svneol=native#text/plain
 tests/tbf/tb0215.pp svneol=native#text/plain
+tests/tbf/tb0215a.pp svneol=native#text/plain
+tests/tbf/tb0215b.pp svneol=native#text/plain
+tests/tbf/tb0215c.pp svneol=native#text/plain
+tests/tbf/tb0215d.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

+ 16 - 0
tests/tbf/tb0215a.pp

@@ -0,0 +1,16 @@
+{ %FAIL }
+// it's not allowed to assign a corbainterface to TGuid
+
+{$mode objfpc}
+
+{$INTERFACES CORBA}
+type
+  ITest = interface
+    ['{0374223C-E460-4CC2-ABFD-7723AAB80CFE}']
+  end;
+
+const
+  Test_IID: TGuid = ITest;
+
+begin
+end.

+ 18 - 0
tests/tbf/tb0215b.pp

@@ -0,0 +1,18 @@
+{ %FAIL }
+// it's not allowed to assign a corbainterface to TGuid
+
+{$mode objfpc}
+
+{$INTERFACES CORBA}
+type
+  ITest = interface
+    ['{0374223C-E460-4CC2-ABFD-7723AAB80CFE}']
+  end;
+
+procedure foo(iid: tguid);
+begin
+end;
+
+begin
+  foo(ITest);
+end.

+ 16 - 0
tests/tbf/tb0215c.pp

@@ -0,0 +1,16 @@
+{ %FAIL }
+// it's not allowed to assign a corbainterface to TGuid
+
+{$mode objfpc}
+
+{$INTERFACES COM}
+type
+  ITest = interface
+    ['{0374223C-E460-4CC2-ABFD-7723AAB80CFE}']
+  end;
+
+const
+  Test_IID: Shortstring = ITest;
+
+begin
+end.

+ 16 - 0
tests/tbf/tb0215d.pp

@@ -0,0 +1,16 @@
+{ %FAIL }
+// it's not allowed to assign a corbainterface to TGuid
+
+{$mode objfpc}
+
+{$INTERFACES COM}
+type
+  ITest = interface
+    ['{0374223C-E460-4CC2-ABFD-7723AAB80CFE}']
+  end;
+
+const
+  Test_IID: Shortstring = ITest;
+
+begin
+end.