mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-07 16:10:41 +02:00
* New CG tests for verifying tvecnode.simplify correctness
This commit is contained in:
parent
74625648cf
commit
038c163717
16
tests/test/cg/tvecsimplify1.pp
Normal file
16
tests/test/cg/tvecsimplify1.pp
Normal file
@ -0,0 +1,16 @@
|
||||
program tvecsimplify1;
|
||||
|
||||
const
|
||||
SPangram = 'The quick brown fox jumps over the lazy dog';
|
||||
|
||||
function GetChar: AnsiChar;
|
||||
begin
|
||||
GetChar := SPangram[39];
|
||||
end;
|
||||
|
||||
begin
|
||||
if GetChar() <> 'y' then
|
||||
Halt(1);
|
||||
|
||||
WriteLn('ok');
|
||||
end.
|
17
tests/test/cg/tvecsimplify1a.pp
Normal file
17
tests/test/cg/tvecsimplify1a.pp
Normal file
@ -0,0 +1,17 @@
|
||||
program tvecsimplify1a;
|
||||
{$H+}
|
||||
|
||||
const
|
||||
SPangram = 'The quick brown fox jumps over the lazy dog';
|
||||
|
||||
function GetChar: AnsiChar;
|
||||
begin
|
||||
GetChar := SPangram[39];
|
||||
end;
|
||||
|
||||
begin
|
||||
if GetChar() <> 'y' then
|
||||
Halt(1);
|
||||
|
||||
WriteLn('ok');
|
||||
end.
|
30
tests/test/cg/tvecsimplify2.pp
Normal file
30
tests/test/cg/tvecsimplify2.pp
Normal file
@ -0,0 +1,30 @@
|
||||
program tvecsimplify2;
|
||||
{$H+}
|
||||
|
||||
const
|
||||
SSonnet: AnsiString = 'When forty winters shall besiege thy brow,'#10+
|
||||
'And dig deep trenches in thy beauty''s field,'#10+
|
||||
'Thy youth''s proud livery, so gazed on now,'#10+
|
||||
'Will be a tattered weed of small worth held.'#10+
|
||||
'Then being asked where all thy beauty lies,'#10+
|
||||
'Where all the treasure of thy lusty days,'#10+
|
||||
'To say within thine own deep-sunken eyes'#10+
|
||||
'Were an all-eating shame and thriftless praise.'#10+
|
||||
'How much more praise deserved thy beauty''s use'#10+
|
||||
'If thou couldst answer ''This fair child of mine'#10+
|
||||
'Shall sum my count, and make my old excuse'','#10+
|
||||
'Proving his beauty by succession thine.'#10+
|
||||
'This were to be new made when thou art old,'#10+
|
||||
'And see thy blood warm when thou feel''st it cold.';
|
||||
|
||||
function GetChar: AnsiChar;
|
||||
begin
|
||||
GetChar := SSonnet[300];
|
||||
end;
|
||||
|
||||
begin
|
||||
if GetChar() <> 'y' then
|
||||
Halt(1);
|
||||
|
||||
WriteLn('ok');
|
||||
end.
|
30
tests/test/cg/tvecsimplify2a.pp
Normal file
30
tests/test/cg/tvecsimplify2a.pp
Normal file
@ -0,0 +1,30 @@
|
||||
program tvecsimplify2a;
|
||||
{$H+}
|
||||
|
||||
const
|
||||
SSonnet = 'When forty winters shall besiege thy brow,'#10+
|
||||
'And dig deep trenches in thy beauty''s field,'#10+
|
||||
'Thy youth''s proud livery, so gazed on now,'#10+
|
||||
'Will be a tattered weed of small worth held.'#10+
|
||||
'Then being asked where all thy beauty lies,'#10+
|
||||
'Where all the treasure of thy lusty days,'#10+
|
||||
'To say within thine own deep-sunken eyes'#10+
|
||||
'Were an all-eating shame and thriftless praise.'#10+
|
||||
'How much more praise deserved thy beauty''s use'#10+
|
||||
'If thou couldst answer ''This fair child of mine'#10+
|
||||
'Shall sum my count, and make my old excuse'','#10+
|
||||
'Proving his beauty by succession thine.'#10+
|
||||
'This were to be new made when thou art old,'#10+
|
||||
'And see thy blood warm when thou feel''st it cold.';
|
||||
|
||||
function GetChar: AnsiChar;
|
||||
begin
|
||||
GetChar := SSonnet[300];
|
||||
end;
|
||||
|
||||
begin
|
||||
if GetChar() <> 'y' then
|
||||
Halt(1);
|
||||
|
||||
WriteLn('ok');
|
||||
end.
|
30
tests/test/cg/tvecsimplify3.pp
Normal file
30
tests/test/cg/tvecsimplify3.pp
Normal file
@ -0,0 +1,30 @@
|
||||
program tvecsimplify3;
|
||||
{$H+}
|
||||
|
||||
const
|
||||
SSonnet: WideString = 'When forty winters shall besiege thy brow,'#10+
|
||||
'And dig deep trenches in thy beauty''s field,'#10+
|
||||
'Thy youth''s proud livery, so gazed on now,'#10+
|
||||
'Will be a tattered weed of small worth held.'#10+
|
||||
'Then being asked where all thy beauty lies,'#10+
|
||||
'Where all the treasure of thy lusty days,'#10+
|
||||
'To say within thine own deep-sunken eyes'#10+
|
||||
'Were an all-eating shame and thriftless praise.'#10+
|
||||
'How much more praise deserved thy beauty''s use'#10+
|
||||
'If thou couldst answer ''This fair child of mine'#10+
|
||||
'Shall sum my count, and make my old excuse'','#10+
|
||||
'Proving his beauty by succession thine.'#10+
|
||||
'This were to be new made when thou art old,'#10+
|
||||
'And see thy blood warm when thou feel''st it cold.';
|
||||
|
||||
function GetChar: WideChar;
|
||||
begin
|
||||
GetChar := SSonnet[300];
|
||||
end;
|
||||
|
||||
begin
|
||||
if GetChar() <> 'y' then
|
||||
Halt(1);
|
||||
|
||||
WriteLn('ok');
|
||||
end.
|
30
tests/test/cg/tvecsimplify4.pp
Normal file
30
tests/test/cg/tvecsimplify4.pp
Normal file
@ -0,0 +1,30 @@
|
||||
program tvecsimplify4;
|
||||
{$H+}
|
||||
|
||||
const
|
||||
SSonnet: UnicodeString = 'When forty winters shall besiege thy brow,'#10+
|
||||
'And dig deep trenches in thy beauty''s field,'#10+
|
||||
'Thy youth''s proud livery, so gazed on now,'#10+
|
||||
'Will be a tattered weed of small worth held.'#10+
|
||||
'Then being asked where all thy beauty lies,'#10+
|
||||
'Where all the treasure of thy lusty days,'#10+
|
||||
'To say within thine own deep-sunken eyes'#10+
|
||||
'Were an all-eating shame and thriftless praise.'#10+
|
||||
'How much more praise deserved thy beauty''s use'#10+
|
||||
'If thou couldst answer ''This fair child of mine'#10+
|
||||
'Shall sum my count, and make my old excuse'','#10+
|
||||
'Proving his beauty by succession thine.'#10+
|
||||
'This were to be new made when thou art old,'#10+
|
||||
'And see thy blood warm when thou feel''st it cold.';
|
||||
|
||||
function GetChar: UnicodeChar;
|
||||
begin
|
||||
GetChar := SSonnet[300];
|
||||
end;
|
||||
|
||||
begin
|
||||
if GetChar() <> 'y' then
|
||||
Halt(1);
|
||||
|
||||
WriteLn('ok');
|
||||
end.
|
Loading…
Reference in New Issue
Block a user