mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 08:09:26 +02:00
codetools: added tests for dotted units
git-svn-id: trunk@50120 -
This commit is contained in:
parent
5c15224a08
commit
1900575f1b
6
.gitattributes
vendored
6
.gitattributes
vendored
@ -1012,6 +1012,12 @@ components/codetools/tests/fpctests/tchlp52.pp svneol=native#text/plain
|
||||
components/codetools/tests/fpctests/tchlp53.pp svneol=native#text/plain
|
||||
components/codetools/tests/fpctests/tchlp6.pp svneol=native#text/plain
|
||||
components/codetools/tests/fpctests/tchlp7.pp svneol=native#text/plain
|
||||
components/codetools/tests/fpctests/tudots.dot.next.pp svneol=native#text/plain
|
||||
components/codetools/tests/fpctests/tudots.dot.pp svneol=native#text/plain
|
||||
components/codetools/tests/fpctests/tudots.dot.prog.pp svneol=native#text/plain
|
||||
components/codetools/tests/fpctests/tudots.pp svneol=native#text/plain
|
||||
components/codetools/tests/fpctests/tudots.prog.pp svneol=native#text/plain
|
||||
components/codetools/tests/fpctests/tudots.test.pp svneol=native#text/plain
|
||||
components/codetools/tests/fpctests/uchlp12.pp svneol=native#text/plain
|
||||
components/codetools/tests/laztests/README.txt svneol=native#text/plain
|
||||
components/codetools/tests/laztests/bug28861_unit1.pas svneol=native#text/plain
|
||||
|
14
components/codetools/tests/fpctests/tudots.dot.next.pp
Normal file
14
components/codetools/tests/fpctests/tudots.dot.next.pp
Normal file
@ -0,0 +1,14 @@
|
||||
unit tudots.dot.next;
|
||||
|
||||
interface
|
||||
|
||||
type
|
||||
ttest=byte;
|
||||
|
||||
var
|
||||
test: integer;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
26
components/codetools/tests/fpctests/tudots.dot.pp
Normal file
26
components/codetools/tests/fpctests/tudots.dot.pp
Normal file
@ -0,0 +1,26 @@
|
||||
unit tudots.dot;
|
||||
|
||||
interface
|
||||
|
||||
var
|
||||
test: char;
|
||||
|
||||
procedure t;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
tudots{ todo declaration:tudots}, tudots.dot.next{ todo declaration:tudots.dot.next};
|
||||
|
||||
// test that type is resolved
|
||||
var
|
||||
test1: tudots.dot.next.ttest{ todo declaration:tudots.dot.next.ttest};
|
||||
|
||||
procedure t;
|
||||
begin
|
||||
// test that we resolved the next identifier to the local variable test
|
||||
tudots.dot.test{ todo declaration:tudots.dot.test} := 'c';
|
||||
end;
|
||||
|
||||
end.
|
||||
|
15
components/codetools/tests/fpctests/tudots.dot.prog.pp
Normal file
15
components/codetools/tests/fpctests/tudots.dot.prog.pp
Normal file
@ -0,0 +1,15 @@
|
||||
{%fail}
|
||||
{%norun}
|
||||
program tudots.dot.prog;
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
uses
|
||||
tudots{ todo declaration:tudots};
|
||||
|
||||
begin
|
||||
// this must fail because we have a namespace tudots.dot and it has no unit test
|
||||
tudots.dot.test{ todo } := 1;
|
||||
end.
|
||||
|
||||
|
13
components/codetools/tests/fpctests/tudots.pp
Normal file
13
components/codetools/tests/fpctests/tudots.pp
Normal file
@ -0,0 +1,13 @@
|
||||
unit tudots;
|
||||
|
||||
interface
|
||||
|
||||
var
|
||||
dot: record
|
||||
test: integer;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
14
components/codetools/tests/fpctests/tudots.prog.pp
Normal file
14
components/codetools/tests/fpctests/tudots.prog.pp
Normal file
@ -0,0 +1,14 @@
|
||||
{%norun}
|
||||
program tudots.prog;
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
uses
|
||||
tudots;
|
||||
|
||||
begin
|
||||
// this should not fail although we have a namespace tudots and a unit tudots
|
||||
tudots.dot.test{ todo declaration:tudots.dot.test} := 1;
|
||||
end.
|
||||
|
||||
|
16
components/codetools/tests/fpctests/tudots.test.pp
Normal file
16
components/codetools/tests/fpctests/tudots.test.pp
Normal file
@ -0,0 +1,16 @@
|
||||
{ %fail }
|
||||
unit tudots.test;
|
||||
|
||||
interface
|
||||
|
||||
// this must fail
|
||||
var
|
||||
test: tudots.dot.next.ttest{ todo };
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
tudots.dot.next{ todo declaration:tudots.dot.next};
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user