From ee7ff843aef7465f56ef350f566032d8deb31fb1 Mon Sep 17 00:00:00 2001 From: florian Date: Fri, 18 Feb 2000 21:22:35 +0000 Subject: [PATCH] + testcritical added --- tests/test/testi642.pp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/test/testi642.pp b/tests/test/testi642.pp index 76aaffab28..c7e9518afb 100644 --- a/tests/test/testi642.pp +++ b/tests/test/testi642.pp @@ -1024,6 +1024,30 @@ procedure testintqword; do_error(2606); end; +procedure testcritical; + + var + a : array[0..10,0..10,0..10] of qword; + i,j,k : longint; + + begin + i:=1; + j:=3; + k:=5; + { check if it is handled correct if a register is used } + { in a reference as well as temp. reg } + a[i,j,k]:=1234; + a[i,j,k]:=a[i,j,k]+a[i,j,k]; + if a[i,j,k]<>2468 then + do_error(2700); + if not(not(a[i,j,k]))<>a[i,j,k] then + do_error(2701); + if -(-(a[i,j,k]))<>a[i,j,k] then + do_error(2702); + if (a[i,j,k] shl (i-i))<>a[i,j,k] then + do_error(2703); + end; + var q : qword; @@ -1132,6 +1156,10 @@ begin writeln('Testing QWord input/output was successful'); writeln; + writeln('Some extra tests for critical things'); + testcritical; + writeln('Extra tests for critical things were successful'); + writeln('------------------------------------------------------'); writeln(' QWord test successful'); writeln('------------------------------------------------------');