Prechádzať zdrojové kódy

* 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 rokov pred
rodič
commit
924a48d440
1 zmenil súbory, kde vykonal 7 pridanie a 2 odobranie
  1. 7 2
      tests/tbs/tb0212.pp

+ 7 - 2
tests/tbs/tb0212.pp

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