xref: /netbsd-src/external/gpl3/gdb.old/dist/gdb/testsuite/gdb.pascal/case-insensitive-symbols.pas (revision 8b657b0747480f8989760d71343d6dd33f8d4cf9)
1 {
2  Copyright 2015-2023 Free Software Foundation, Inc.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 }
17 
18 
19 program test_gdb_17815;
20 
21 
22 type
23   TA = class
24   public
25   x, y : integer;
26   constructor Create;
27   function check(b : TA) : boolean;
28   destructor Done; virtual;
29 end;
30 
31 constructor TA.Create;
32 begin
33   x:=-1;
34   y:=-1;
35 end;
36 
37 destructor TA.Done;
38 begin
39 end;
40 
41 function TA.check (b : TA) : boolean;
42 begin
43   check:=(x < b.x); { set breakpoint here }
44 end;
45 
46 
47 
48 var
49   a, b : TA;
50 
51 begin
52   a:=TA.Create;
53   b:=TA.Create;
54   a.x := 67;
55   a.y := 33;
56   b.x := 11;
57   b.y := 35;
58   if a.check (b) then
59     writeln('Error in check')
60   else
61     writeln('check OK');
62 end.
63 
64