nan_inf_fmt.f90: Revise test to include case of field width of zero.

2005-07-23  Jerry DeLisle  <jvdelisle@verizon.net>

        * gfortran.fortran-torture/execute/nan_inf_fmt.f90: Revise test to
        include case of field width of zero.

From-SVN: r102325
This commit is contained in:
Jerry DeLisle 2005-07-24 02:30:27 +00:00 committed by Jerry DeLisle
parent 35fd722b61
commit 4cf507fc16
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2005-07-23 Jerry DeLisle <jvdelisle@verizon.net>
* gfortran.fortran-torture/execute/nan_inf_fmt.f90: Revise test to
include case of field width of zero.
2005-07-23 Jerry DeLisle <jvdelisle@verizon.net>
PR libgfortran/21875

View File

@ -12,6 +12,14 @@
neg_inf = -1.0/zero
nan = zero/zero
! check a field width = 0
fmt = '(F0.0)'
write(l,fmt=fmt)pos_inf
if (l.ne.'+Inf') call abort
write(l,fmt=fmt)neg_inf
if (l.ne.'-Inf') call abort
write(l,fmt=fmt)nan
if (l.ne.' NaN') call abort
! check a field width < 3
fmt = '(F2.0)'
@ -27,7 +35,7 @@
write(l,fmt=fmt)pos_inf
if (l.ne.'Inf') call abort
write(l,fmt=fmt)neg_inf
if (l.ne.'Inf') call abort
if (l.ne.'***') call abort
write(l,fmt=fmt)nan
if (l.ne.'NaN') call abort