Commit b38b42d2 by Dave Love

Call abort where appropriate.

From-SVN: r19742
parent 1a057f3b
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
z0 = cmplx(3.,4.) z0 = cmplx(3.,4.)
r0 = cabs(z0) r0 = cabs(z0)
if (r0 .ne. 5.) call exit(1) if (r0 .ne. 5.) call abort
z1 = dcmplx(3.d0,4.d0) z1 = dcmplx(3.d0,4.d0)
r1 = zabs(z1) r1 = zabs(z1)
if (r1 .ne. 5.d0) call exit(1) if (r1 .ne. 5.d0) call abort
end end
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
k=1 k=1
n=2 n=2
ind=k-n+2 ind=k-n+2
if (ind /= 1) call exit(1) if (ind /= 1) call abort
if (ab(ind) /= 1) call exit(1) if (ab(ind) /= 1) call abort
if (k-n+2 /= 1) call exit(1) if (k-n+2 /= 1) call abort
if (ab(k-n+2) /= 1) call exit(1) if (ab(k-n+2) /= 1) call abort
END END
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
z0 = cmplx(0.,.5) z0 = cmplx(0.,.5)
z1 = 1./z0 z1 = 1./z0
if (z1 .ne. cmplx(0.,-2)) call exit(1) if (z1 .ne. cmplx(0.,-2)) call abort
z0 = 10.*z0 z0 = 10.*z0
if (z0 .ne. cmplx(0.,5.)) call exit(1) if (z0 .ne. cmplx(0.,5.)) call abort
z2 = cmplx(1.,2.) z2 = cmplx(1.,2.)
z1 = z0/z2 z1 = z0/z2
if (z1 .ne. cmplx(2.,1.)) call exit(1) if (z1 .ne. cmplx(2.,1.)) call abort
z1 = z0*z2 z1 = z0*z2
if (z1 .ne. cmplx(-10.,5.)) call exit(1) if (z1 .ne. cmplx(-10.,5.)) call abort
end end
! Some versions of cpp will delete "//'World' as a C++ comment. ! Some versions of cpp will delete "//'World' as a C++ comment.
character*40 title character*40 title
title = 'Hello '//'World' title = 'Hello '//'World'
if (title .ne. 'Hello World') stop 1 if (title .ne. 'Hello World') call abort
end end
...@@ -3,16 +3,16 @@ ...@@ -3,16 +3,16 @@
z0 = dcmplx(0.,.5) z0 = dcmplx(0.,.5)
z1 = 1./z0 z1 = 1./z0
if (z1 .ne. dcmplx(0.,-2)) call exit(1) if (z1 .ne. dcmplx(0.,-2)) call abort
z0 = 10.*z0 z0 = 10.*z0
if (z0 .ne. dcmplx(0.,5.)) call exit(1) if (z0 .ne. dcmplx(0.,5.)) call abort
z2 = cmplx(1.,2.) z2 = cmplx(1.,2.)
z1 = z0/z2 z1 = z0/z2
if (z1 .ne. dcmplx(2.,1.)) call exit(1) if (z1 .ne. dcmplx(2.,1.)) call abort
z1 = z0*z2 z1 = z0*z2
if (z1 .ne. dcmplx(-10.,5.)) call exit(1) if (z1 .ne. dcmplx(-10.,5.)) call abort
end end
...@@ -19,7 +19,7 @@ c current Netlib BLAS.) ...@@ -19,7 +19,7 @@ c current Netlib BLAS.)
do i=1,100 do i=1,100
a(i)=0.D0 a(i)=0.D0
enddo enddo
if (dnrm2(100,a,1) .ne. 0.0) call exit(1) if (dnrm2(100,a,1) .ne. 0.0) call abort
end end
double precision function dnrm2 ( n, dx, incx) double precision function dnrm2 ( n, dx, incx)
......
...@@ -3,27 +3,27 @@ c============================================== test.f ...@@ -3,27 +3,27 @@ c============================================== test.f
real*8 x1, y1 real*8 x1, y1
x=0. x=0.
y = erfc(x) y = erfc(x)
if (y .ne. 1.) call exit(1) if (y .ne. 1.) call abort
x=1.1 x=1.1
y = erfc(x) y = erfc(x)
if (abs(y - .1197949) .ge. 1.e-6) call exit(1) if (abs(y - .1197949) .ge. 1.e-6) call abort
x=10 x=10
y = erfc(x) y = erfc(x)
if (y .gt. 1.5e-44) call exit(1) if (y .gt. 1.5e-44) call abort
x1=0. x1=0.
y1 = erfc(x1) y1 = erfc(x1)
if (y1 .ne. 1.) call exit(1) if (y1 .ne. 1.) call abort
x1=1.1d0 x1=1.1d0
y1 = erfc(x1) y1 = erfc(x1)
if (abs(y1 - .1197949d0) .ge. 1.d-6) call exit(1) if (abs(y1 - .1197949d0) .ge. 1.d-6) call abort
x1=10 x1=10
y1 = erfc(x1) y1 = erfc(x1)
if (y1 .gt. 1.5d-44) call exit(1) if (y1 .gt. 1.5d-44) call abort
end end
c================================================= c=================================================
!output: !output:
......
a = 2**-2*1. a = 2**-2*1.
if (a .ne. .25) call exit(1) if (a .ne. .25) call abort
end end
...@@ -8,22 +8,22 @@ ...@@ -8,22 +8,22 @@
n = 5 n = 5
t = (n > foo) t = (n > foo)
if (t .neqv. .true.) call exit(1) if (t .neqv. .true.) call abort
t = (n >= foo) t = (n >= foo)
if (t .neqv. .true.) call exit(1) if (t .neqv. .true.) call abort
t = (n < foo) t = (n < foo)
if (t .neqv. .false.) call exit(1) if (t .neqv. .false.) call abort
t = (n <= 5) t = (n <= 5)
if (t .neqv. .true.) call exit(1) if (t .neqv. .true.) call abort
t = (n >= 5 ) t = (n >= 5 )
if (t .neqv. .true.) call exit(1) if (t .neqv. .true.) call abort
t = (n == 5) t = (n == 5)
if (t .neqv. .true.) call exit(1) if (t .neqv. .true.) call abort
t = (n /= 5) t = (n /= 5)
if (t .neqv. .false.) call exit(1) if (t .neqv. .false.) call abort
t = (n /= foo) t = (n /= foo)
if (t .neqv. .true.) call exit(1) if (t .neqv. .true.) call abort
t = (n == foo) t = (n == foo)
if (t .neqv. .false.) call exit(1) if (t .neqv. .false.) call abort
end end
...@@ -46,11 +46,11 @@ c another four-way average of rhobar ...@@ -46,11 +46,11 @@ c another four-way average of rhobar
270 continue 270 continue
do k=0,N do k=0,N
if (yzin1(k) .ne. yzin2(k)) call exit(1) if (yzin1(k) .ne. yzin2(k)) call abort
enddo enddo
if (yzin1(0) .ne. -1371.) call exit(1) if (yzin1(0) .ne. -1371.) call abort
if (yzin1(1) .ne. -685.5) call exit(1) if (yzin1(1) .ne. -685.5) call abort
if (yzin1(2) .ne. 0.) call exit(1) if (yzin1(2) .ne. 0.) call abort
return return
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment