mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-10 09:49:27 +02:00
* test the (previously) working parts of this test
git-svn-id: trunk@6905 -
This commit is contained in:
parent
2f12e94947
commit
887fe0dd9c
@ -1,5 +1,4 @@
|
|||||||
{ %KNOWNRUNERROR=1 Known array of char problems }
|
{$j+}
|
||||||
|
|
||||||
{$P+}
|
{$P+}
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -62,7 +61,8 @@ const
|
|||||||
Error('string length too big in calling var arg');
|
Error('string length too big in calling var arg');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$P-}
|
{ is global switch, can't turn off here }
|
||||||
|
{P-}
|
||||||
procedure testvarconv2(var st : string4);
|
procedure testvarconv2(var st : string4);
|
||||||
begin
|
begin
|
||||||
Writeln('st=',st);
|
Writeln('st=',st);
|
||||||
@ -95,8 +95,10 @@ begin
|
|||||||
Writeln('Testing if "',car4_1,'" is equal to "',cst4_1,'"');
|
Writeln('Testing if "',car4_1,'" is equal to "',cst4_1,'"');
|
||||||
if car4_1<>cst4_1 then
|
if car4_1<>cst4_1 then
|
||||||
error('Comparison of array of char and string don''t work');
|
error('Comparison of array of char and string don''t work');
|
||||||
|
{$ifdef test_known_problems}
|
||||||
if string4(car6_2)<>'efgh' then
|
if string4(car6_2)<>'efgh' then
|
||||||
error('typcasting to shorter strings leads to problems');
|
error('typcasting to shorter strings leads to problems');
|
||||||
|
{$endif}
|
||||||
ar4_2:='Test';
|
ar4_2:='Test';
|
||||||
ar4_1:=cst6_2;
|
ar4_1:=cst6_2;
|
||||||
if ar4_2<>'Test' then
|
if ar4_2<>'Test' then
|
||||||
@ -109,7 +111,7 @@ begin
|
|||||||
if ar6_1='AB'#0't'#0'T' then
|
if ar6_1='AB'#0't'#0'T' then
|
||||||
Error('assigning strings to array of char does not zero end of array if string is shorter');
|
Error('assigning strings to array of char does not zero end of array if string is shorter');
|
||||||
if ar6_1='AB'#0#0#0#0 then
|
if ar6_1='AB'#0#0#0#0 then
|
||||||
writeln('assigning shorter strings to array of char does zero fo tserarray')
|
writeln('assigning shorter strings to array of char does zero rest of array')
|
||||||
else
|
else
|
||||||
error('assigning "AB" to ar6_1 gives '+ar6_1);
|
error('assigning "AB" to ar6_1 gives '+ar6_1);
|
||||||
{$endif}
|
{$endif}
|
||||||
@ -132,24 +134,34 @@ begin
|
|||||||
testvalueconv(pc);
|
testvalueconv(pc);
|
||||||
{$endif def FPC this is not allowed in BP !}
|
{$endif def FPC this is not allowed in BP !}
|
||||||
testconstconv('AB');
|
testconstconv('AB');
|
||||||
|
{$ifdef test_known_problems}
|
||||||
testconstconv('ABCDEFG');
|
testconstconv('ABCDEFG');
|
||||||
|
{$endif}
|
||||||
testconstconv(st4_1);
|
testconstconv(st4_1);
|
||||||
|
{$ifdef test_known_problems}
|
||||||
testconstconv(cst6_2);
|
testconstconv(cst6_2);
|
||||||
|
{$endif}
|
||||||
{$ifdef FPC this is not allowed in BP !}
|
{$ifdef FPC this is not allowed in BP !}
|
||||||
|
{$ifdef test_known_problems}
|
||||||
testconstconv(pc);
|
testconstconv(pc);
|
||||||
|
{$endif}
|
||||||
{$endif def FPC this is not allowed in BP !}
|
{$endif def FPC this is not allowed in BP !}
|
||||||
testvarconv(st4_2);
|
testvarconv(st4_2);
|
||||||
testvarconv(cst4_1);
|
testvarconv(cst4_1);
|
||||||
{$ifdef FPC this is not allowed in BP !}
|
{$ifdef FPC this is not allowed in BP !}
|
||||||
|
{$ifdef test_known_problems}
|
||||||
testvarconv(st6_1);
|
testvarconv(st6_1);
|
||||||
testvarconv(cst8_1);
|
testvarconv(cst8_1);
|
||||||
|
{$endif}
|
||||||
{$endif def FPC this is not allowed in BP !}
|
{$endif def FPC this is not allowed in BP !}
|
||||||
{ testvarconv(pc); this one fails at compilation }
|
{ testvarconv(pc); this one fails at compilation }
|
||||||
testvarconv2(st4_2);
|
testvarconv2(st4_2);
|
||||||
testvarconv2(cst4_1);
|
testvarconv2(cst4_1);
|
||||||
{$ifdef FPC this is not allowed in BP !}
|
{$ifdef FPC this is not allowed in BP !}
|
||||||
|
{$ifdef test_known_problems}
|
||||||
testvarconv2(st6_1);
|
testvarconv2(st6_1);
|
||||||
testvarconv2(cst8_1);
|
testvarconv2(cst8_1);
|
||||||
|
{$endif}
|
||||||
{$endif def FPC this is not allowed in BP !}
|
{$endif def FPC this is not allowed in BP !}
|
||||||
if has_errors then
|
if has_errors then
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user