瀏覽代碼

+ test output_format dir

pierre 24 年之前
父節點
當前提交
e68656205c
共有 3 個文件被更改,包括 57 次插入1 次删除
  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 32-bit value on 32-bit architectures.
 'Natural type' is a signed 64-bit value on 64-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/taddcard.pp      Cardinal arithmetic operations
 secondadd() ........... /cg/taddreal.pp      Real arithmetic operations
 secondadd() ........... /cg/taddreal.pp      Real arithmetic operations
 secondadd() ........... /cg/taddlong.pp      Longint arithmetic operations
 secondadd() ........... /cg/taddlong.pp      Longint arithmetic operations
@@ -111,6 +111,7 @@ Floating Point ........ tfpu1.pp
                         tfpu2.pp
                         tfpu2.pp
 Assembler readers.......tasmread.pp    tests for support of unit or program specifier
 Assembler readers.......tasmread.pp    tests for support of unit or program specifier
                         testmovd.pp    testspecial issues about MOVD instruction
                         testmovd.pp    testspecial issues about MOVD instruction
+                        tasout.pp      tests a problem if a unit is compiled with nasm
 
 
 --------------------------------------------------------------------
 --------------------------------------------------------------------
                             RTL
                             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.