diff --git a/tests/test/cg/tvecsimplify1.pp b/tests/test/cg/tvecsimplify1.pp new file mode 100644 index 0000000000..e2a9ab6058 --- /dev/null +++ b/tests/test/cg/tvecsimplify1.pp @@ -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. \ No newline at end of file diff --git a/tests/test/cg/tvecsimplify1a.pp b/tests/test/cg/tvecsimplify1a.pp new file mode 100644 index 0000000000..bce6506e21 --- /dev/null +++ b/tests/test/cg/tvecsimplify1a.pp @@ -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. \ No newline at end of file diff --git a/tests/test/cg/tvecsimplify2.pp b/tests/test/cg/tvecsimplify2.pp new file mode 100644 index 0000000000..7e5e736335 --- /dev/null +++ b/tests/test/cg/tvecsimplify2.pp @@ -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. \ No newline at end of file diff --git a/tests/test/cg/tvecsimplify2a.pp b/tests/test/cg/tvecsimplify2a.pp new file mode 100644 index 0000000000..182d75fa74 --- /dev/null +++ b/tests/test/cg/tvecsimplify2a.pp @@ -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. \ No newline at end of file diff --git a/tests/test/cg/tvecsimplify3.pp b/tests/test/cg/tvecsimplify3.pp new file mode 100644 index 0000000000..7238d66af3 --- /dev/null +++ b/tests/test/cg/tvecsimplify3.pp @@ -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. \ No newline at end of file diff --git a/tests/test/cg/tvecsimplify4.pp b/tests/test/cg/tvecsimplify4.pp new file mode 100644 index 0000000000..de8a472094 --- /dev/null +++ b/tests/test/cg/tvecsimplify4.pp @@ -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. \ No newline at end of file