Browse Source

* fixed test tb0212.pp to check for 2-byte alignment instead of 4-byte on 16-bit
CPUs

git-svn-id: trunk@28037 -

nickysn 11 years ago
parent
commit
924a48d440
1 changed files with 7 additions and 2 deletions
  1. 7 2
      tests/tbs/tb0212.pp

+ 7 - 2
tests/tbs/tb0212.pp

@@ -7,6 +7,11 @@ uses erroru;
 const
 const
   c : byte = 5;
   c : byte = 5;
   r : real = 3.4;
   r : real = 3.4;
+{$ifdef cpu16}
+  alignment = 2;
+{$else cpu16}
+  alignment = 4;
+{$endif cpu16}
 var
 var
   l : longint;
   l : longint;
   cc : char;
   cc : char;
@@ -14,14 +19,14 @@ var
 
 
 begin
 begin
   l:=longint(@r);
   l:=longint(@r);
-  if (l mod 4)<>0 then
+  if (l mod alignment)<>0 then
     begin
     begin
        Writeln('static const are not aligned properly !');
        Writeln('static const are not aligned properly !');
        error;
        error;
     end;
     end;
   cc:='d';
   cc:='d';
   l:=longint(@rr);
   l:=longint(@rr);
-  if (l mod 4)<>0 then
+  if (l mod alignment)<>0 then
     begin
     begin
        Writeln('static var are not aligned properly !');
        Writeln('static var are not aligned properly !');
        error;
        error;