nf_test.F (netcdf-fortran-4.4.4) | : | nf_test.F (netcdf-fortran-4.4.5) | ||
---|---|---|---|---|
skipping to change at line 25 | skipping to change at line 25 | |||
write(*, 1) name | write(*, 1) name | |||
1 format(' *** testing ', a, ' ... ') | 1 format(' *** testing ', a, ' ... ') | |||
nfails = 0 | nfails = 0 | |||
call func() | call func() | |||
nfailsTotal = nfailsTotal + nfails | nfailsTotal = nfailsTotal + nfails | |||
if ( nfails .ne. 0) then | if ( nfails .ne. 0) then | |||
print *, ' ' | print *, ' ' | |||
print *, ' ### ', nfails, ' FAILURES TESTING ', name, | print *, ' ### ', nfails, ' FAILURES TESTING ', name, | |||
+ '! ###' | + '! ###' | |||
call EXIT | C continue the remaining tests, uncomment below to stop now | |||
C stop 2 | ||||
end if | end if | |||
end | end | |||
program nf_test | program nf_test | |||
implicit none | implicit none | |||
#include "tests.inc" | #include "tests.inc" | |||
integer status | integer status | |||
integer i, num_cmode, err, dft_fmt | ||||
integer cmode(3) | ||||
external test_nf_strerror | external test_nf_strerror | |||
external test_nf_open | external test_nf_open | |||
external test_nf_close | external test_nf_close | |||
external test_nf_inq | external test_nf_inq | |||
external test_nf_inq_dimid | external test_nf_inq_dimid | |||
external test_nf_inq_dim | external test_nf_inq_dim | |||
external test_nf_inq_dimlen | external test_nf_inq_dimlen | |||
external test_nf_inq_dimname | external test_nf_inq_dimname | |||
external test_nf_inq_varid | external test_nf_inq_varid | |||
skipping to change at line 211 | skipping to change at line 214 | |||
testfile = 'test.nc' | testfile = 'test.nc' | |||
scratch = 'scratch.nc' | scratch = 'scratch.nc' | |||
nfailsTotal = 0 | nfailsTotal = 0 | |||
progname = 'nf_test' | progname = 'nf_test' | |||
max_nmpt = 8 | max_nmpt = 8 | |||
write(*, *) 'NetCDF version: ', nf_inq_libvers() | write(*, *) 'NetCDF version: ', nf_inq_libvers() | |||
num_cmode = 1 | ||||
cmode(1) = 0 | ||||
#ifdef ENABLE_CDF5 | ||||
num_cmode = num_cmode + 1 | ||||
cmode(num_cmode) = nf_cdf5 | ||||
#endif | ||||
#ifdef USE_NETCDF4 | ||||
num_cmode = num_cmode + 1 | ||||
cmode(num_cmode) = nf_netcdf4 | ||||
#endif | ||||
do i = 1, num_cmode | ||||
if (cmode(i) .EQ. 0) then | ||||
print*,"testing classic CDF-1 format" | ||||
#ifdef ENABLE_CDF5 | ||||
elseif (cmode(i) .EQ. nf_cdf5) then | ||||
print*,"testing CDF-5 format" | ||||
#endif | ||||
#ifdef USE_NETCDF4 | ||||
elseif (cmode(i) .EQ. nf_netcdf4) then | ||||
print*,"testing NetCDF-4 format" | ||||
#endif | ||||
endif | ||||
FILE_CMODE = cmode(i) | ||||
C /* Initialize global variables defining test file */ | C /* Initialize global variables defining test file */ | |||
call init_gvars | call init_gvars | |||
call write_file(testfile) | call write_file(testfile) | |||
if (nfailsTotal .gt. 0) call udexit(1) | if (nfailsTotal .gt. 0) call udexit(1) | |||
C /* delete any existing scratch netCDF file */ | C /* delete any existing scratch netCDF file */ | |||
status = nf_delete(scratch) | status = nf_delete(scratch) | |||
C /* Test read-only functions, using pregenerated test-file */ | C /* Test read-only functions, using pregenerated test-file */ | |||
skipping to change at line 384 | skipping to change at line 413 | |||
call test('nf_put_att_int', test_nf_put_att_int) | call test('nf_put_att_int', test_nf_put_att_int) | |||
call test('nf_put_att_real', test_nf_put_att_real) | call test('nf_put_att_real', test_nf_put_att_real) | |||
call test('nf_put_att_double', test_nf_put_att_double) | call test('nf_put_att_double', test_nf_put_att_double) | |||
call test('nf_copy_att', test_nf_copy_att) | call test('nf_copy_att', test_nf_copy_att) | |||
call test('nf_rename_att', test_nf_rename_att) | call test('nf_rename_att', test_nf_rename_att) | |||
call test('nf_del_att', test_nf_del_att) | call test('nf_del_att', test_nf_del_att) | |||
call test('nf_set_fill', test_nf_set_fill) | call test('nf_set_fill', test_nf_set_fill) | |||
call test('nf_set_default_format', | call test('nf_set_default_format', | |||
+ test_nf_set_default_format) | + test_nf_set_default_format) | |||
! reset default format, otherwise the remaining tests will use | ||||
! the one set in the last test | ||||
err = nf_set_default_format(NF_FORMAT_CLASSIC, dft_fmt) | ||||
enddo | ||||
print *,'Total number of failures: ', nfailsTotal | print *,'Total number of failures: ', nfailsTotal | |||
if (nfailsTotal .ne. 0) stop 2 | if (nfailsTotal .ne. 0) stop 2 | |||
print *,'*** SUCCESS!' | print *,'*** SUCCESS!' | |||
end | end | |||
End of changes. 4 change blocks. | ||||
1 lines changed or deleted | 35 lines changed or added |