Sfoglia il codice sorgente

+ test output_format dir

pierre 23 anni fa
parent
commit
e68656205c
3 ha cambiato i file con 57 aggiunte e 1 eliminazioni
  1. 2 1
      tests/test/README
  2. 28 0
      tests/test/tasout.pp
  3. 27 0
      tests/test/utasout.pp

+ 2 - 1
tests/test/README

@@ -12,7 +12,7 @@ valid for that node.
 'Natural type' is a signed 32-bit value on 32-bit architectures.
 'Natural type' is a signed 64-bit value on 64-bit architectures.
 
-secondadd() ........... /cg/taddbool.pp      Boolean arithmetic operations     
+secondadd() ........... /cg/taddbool.pp      Boolean arithmetic operations
 secondadd() ........... /cg/taddcard.pp      Cardinal arithmetic operations
 secondadd() ........... /cg/taddreal.pp      Real arithmetic operations
 secondadd() ........... /cg/taddlong.pp      Longint arithmetic operations
@@ -111,6 +111,7 @@ Floating Point ........ tfpu1.pp
                         tfpu2.pp
 Assembler readers.......tasmread.pp    tests for support of unit or program specifier
                         testmovd.pp    testspecial issues about MOVD instruction
+                        tasout.pp      tests a problem if a unit is compiled with nasm
 
 --------------------------------------------------------------------
                             RTL

+ 28 - 0
tests/test/tasout.pp

@@ -0,0 +1,28 @@
+{ %CPU=i386 }
+
+{$define dummy}
+{$ifdef win32}
+{$output_format asw}
+{$undef dummy}
+{$endif win32}
+
+{$ifdef go32v2}
+{$output_format as}
+{$undef dummy}
+{$endif go32v2}
+
+{$ifdef linux}
+{$output_format as}
+{$undef dummy}
+{$endif linux}
+
+{$ifdef dummy}
+const
+  x = ' this is a dummy test';
+{$else}
+uses utasout;
+{$endif}
+
+begin
+  Writeln('x = ',x);
+end.

+ 27 - 0
tests/test/utasout.pp

@@ -0,0 +1,27 @@
+{ requires nasm }
+
+{$ifdef win32}
+{$output_format nasmwin32}
+{$endif win32}
+
+{$ifdef go32v2}
+{$output_format nasmcoff}
+{$endif go32v2}
+
+{$ifdef linux}
+{$output_format nasmelf}
+{$endif linux}
+
+
+unit utasout;
+
+interface
+
+var
+  x : longint;
+
+implementation
+
+begin
+  x:=2;
+end.