This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC - g77 tests using dg-output


I want to write some tests for Fortran formatted output.  The following
example, when placed in gcc/testsuite/g77.dg, does what I want.  My only
concern is that I don't see any other tests using dg-output.  Is this
style of test OK, or are there better ways?


C Test I format descriptor
C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
C
C { dg-do run }
C { dg-output "^" }
      write(*,'(I1)')   1  ! { dg-output "1\n" }
      write(*,'(I2)')   2  ! { dg-output " 2\n" }
      write(*,'(I3)')   3  ! { dg-output "  3\n" }
      write(*,'(I1.1)') 4  ! { dg-output "4\n" }
      write(*,'(I2.1)') 5  ! { dg-output " 5\n" }
      write(*,'(I2.2)') 6  ! { dg-output "06\n" }
      write(*,'(I2.0)') 0  ! { dg-output "  \n" }
C { dg-output "$" }
      end


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]