mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 05:30:57 +02:00
* added two small tests
iocheck inside iocheck enums inside objects
This commit is contained in:
parent
b0bc7490ef
commit
38664fd7d3
@ -25,6 +25,8 @@ ts010005.pp tests method overriding
|
||||
ts010006.pp tests libraries
|
||||
ts010015.pp tests typed files.
|
||||
ts010016.pp tests conversion of smallsets in normsets in consts
|
||||
ts010017.pp tests the problem of iocheck inside iocheck routines
|
||||
ts010018.pp tests the problem of enums inside objects
|
||||
|
||||
ts10100.pp tests for delphi object model
|
||||
-
|
||||
|
@ -149,13 +149,22 @@ alltf : $(patsubst %.pp,%.ref,$(wildcard tf*.pp))
|
||||
|
||||
allto : $(patsubst %.pp,%.res,$(wildcard to*.pp))
|
||||
|
||||
allexec: $(patsubst %.pp,%.elg,$(wildcard test*.pp)) $(patsubst %.pp,%.elg,$(wildcard ts*.pp))
|
||||
allexec : alltsexec alltestexec
|
||||
|
||||
alltestexec: $(patsubst %.pp,%.elg,$(wildcard test*.pp))
|
||||
|
||||
alltsexec: $(patsubst %.pp,%.elg,$(wildcard ts*.pp))
|
||||
|
||||
clean :
|
||||
-rm *.re* *.o *.ppu ts*.exe tf*.exe log faillist
|
||||
|
||||
# $Log$
|
||||
# Revision 1.6 1998-10-22 14:35:40 pierre
|
||||
# Revision 1.7 1998-10-22 16:41:11 pierre
|
||||
# * added two small tests
|
||||
# iocheck inside iocheck
|
||||
# enums inside objects
|
||||
#
|
||||
# Revision 1.6 1998/10/22 14:35:40 pierre
|
||||
# + added allexec tests if executables compiled
|
||||
# don't return with an error code
|
||||
# * some changes in test files for dos
|
||||
|
14
tests/th010018.pp
Normal file
14
tests/th010018.pp
Normal file
@ -0,0 +1,14 @@
|
||||
unit th010018;
|
||||
|
||||
interface
|
||||
type
|
||||
rec=object
|
||||
i : longint;
|
||||
nrs : (one,two,three);
|
||||
end;
|
||||
var
|
||||
brec : rec;
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
33
tests/ts010017.pp
Normal file
33
tests/ts010017.pp
Normal file
@ -0,0 +1,33 @@
|
||||
{ show a problem with IOCHECK !!
|
||||
inside reset(file)
|
||||
we call reset(file,longint)
|
||||
but we also emit a call to iocheck after and this is wrong !! PM }
|
||||
|
||||
program getret;
|
||||
|
||||
uses dos;
|
||||
|
||||
var
|
||||
ppfile : file;
|
||||
|
||||
begin
|
||||
assign(ppfile,'this_file_probably_does_not_exist&~"#');
|
||||
{$I-}
|
||||
reset(ppfile,1);
|
||||
if ioresult=0 then
|
||||
begin
|
||||
{$I+}
|
||||
close(ppfile);
|
||||
end
|
||||
else
|
||||
writeln('the file does not exist') ;
|
||||
{$I-}
|
||||
reset(ppfile);
|
||||
if ioresult=0 then
|
||||
begin
|
||||
{$I+}
|
||||
close(ppfile);
|
||||
end
|
||||
else
|
||||
writeln('the file does not exist') ;
|
||||
end.
|
13
tests/ts010018.pp
Normal file
13
tests/ts010018.pp
Normal file
@ -0,0 +1,13 @@
|
||||
uses th010018;
|
||||
|
||||
var
|
||||
arec : rec;
|
||||
|
||||
begin
|
||||
arec.nrs:=one;
|
||||
if arec.nrs<>one then
|
||||
begin
|
||||
Writeln('Error with enums inside objects');
|
||||
Halt(1);
|
||||
end;
|
||||
end.
|
Loading…
Reference in New Issue
Block a user