diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-18 16:10:46 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-18 16:10:46 (GMT) |
commit | b0eb42058c02bff41cacae11880b4fbf174821db (patch) | |
tree | c389ee389c680cccbd2a5c5f11107b588f4bcfa0 /test | |
parent | dcf8866b6af90aa0bf50ebeceda6b0f184a07c17 (diff) | |
download | hdf5-b0eb42058c02bff41cacae11880b4fbf174821db.zip hdf5-b0eb42058c02bff41cacae11880b4fbf174821db.tar.gz hdf5-b0eb42058c02bff41cacae11880b4fbf174821db.tar.bz2 |
[svn-r14208] Description:
Make H5Pget_filter_by_id() API versioned and switch internal usage
to H5Pget_filter_by_id2().
Add simple regression test for H5Pget_filter_by_id1().
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'test')
-rw-r--r-- | test/dsets.c | 25 | ||||
-rw-r--r-- | test/tmisc.c | 4 |
2 files changed, 18 insertions, 11 deletions
diff --git a/test/dsets.c b/test/dsets.c index 68fe47f..ccfb6ca 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -1071,13 +1071,7 @@ set_local_bogus2(hid_t dcpl_id, hid_t type_id, hid_t UNUSED space_id) add_on=(unsigned)H5Tget_size(type_id); /* Get the filter's current parameters */ -#ifdef H5_WANT_H5_V1_6_COMPAT - if(H5Pget_filter_by_id(dcpl_id, H5Z_FILTER_BOGUS2, &flags, &cd_nelmts, - cd_values, (size_t)0, NULL) < 0) -#else - if(H5Pget_filter_by_id(dcpl_id, H5Z_FILTER_BOGUS2, &flags, &cd_nelmts, - cd_values, (size_t)0, NULL, NULL) < 0) -#endif + if(H5Pget_filter_by_id2(dcpl_id, H5Z_FILTER_BOGUS2, &flags, &cd_nelmts, cd_values, (size_t)0, NULL, NULL) < 0) return(FAIL); /* Check that the parameter values were passed along correctly */ @@ -6281,12 +6275,25 @@ test_deprec(hid_t file) #if defined H5_HAVE_FILTER_DEFLATE { H5Z_filter_t filtn; /* filter identification number */ + size_t cd_nelmts = 1; /* Number of filter parameters */ + unsigned cd_value; /* Filter parameter */ if(H5Pset_deflate(create_parms, 6) < 0) goto error; /* Check for the deflate filter */ - filtn = H5Pget_filter1(create_parms, (unsigned)0, NULL, NULL, NULL, (size_t)0, NULL); - if(H5Z_FILTER_DEFLATE!=filtn) + filtn = H5Pget_filter1(create_parms, (unsigned)0, NULL, &cd_nelmts, &cd_value, (size_t)0, NULL); + if(H5Z_FILTER_DEFLATE != filtn) + goto error; + if(1 != cd_nelmts) + goto error; + if(6 != cd_value) + goto error; + + /* Check for the deflate filter */ + if(H5Pget_filter_by_id1(create_parms, H5Z_FILTER_DEFLATE, NULL, &cd_nelmts, &cd_value, (size_t)0, NULL) < 0) goto error; + if(1 != cd_nelmts) + goto error; + if(6 != cd_value) goto error; } #endif /* H5_HAVE_FILTER_DEFLATE */ diff --git a/test/tmisc.c b/test/tmisc.c index 88c73b4..efc38c3 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -3722,9 +3722,9 @@ test_misc22(void) dcpl2 = H5Dget_create_plist(dsid); CHECK(dcpl2, FAIL, "H5Dget_create_plist"); - ret = H5Pget_filter_by_id(dcpl2, H5Z_FILTER_SZIP, &flags, + ret = H5Pget_filter_by_id2(dcpl2, H5Z_FILTER_SZIP, &flags, &cd_nelmts, cd_values, 0, NULL , NULL); - CHECK(ret, FAIL, "H5Pget_filter_by_id"); + CHECK(ret, FAIL, "H5Pget_filter_by_id2"); VERIFY(cd_values[2], correct, "SZIP filter returned value for precision"); |