diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-05-15 17:33:58 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-05-15 17:33:58 (GMT) |
commit | 56c3ec98207bb6c4b3e6a7b9523c2a1e849879c3 (patch) | |
tree | 6d76921d8b37e6286c1a8432588dc2336468a7d8 /tools/test | |
parent | 7078993d63aab4e239e4ae9c970b4b19d38352fa (diff) | |
download | hdf5-56c3ec98207bb6c4b3e6a7b9523c2a1e849879c3.zip hdf5-56c3ec98207bb6c4b3e6a7b9523c2a1e849879c3.tar.gz hdf5-56c3ec98207bb6c4b3e6a7b9523c2a1e849879c3.tar.bz2 |
HDFFV-10128 add test to check null term
Test is another dataset
Diffstat (limited to 'tools/test')
-rw-r--r-- | tools/test/h5diff/CMakeTests.cmake | 2 | ||||
-rw-r--r-- | tools/test/h5diff/h5diffgentest.c | 28 | ||||
-rw-r--r-- | tools/test/h5diff/testfiles/diff_strings1.h5 | bin | 4464 -> 4640 bytes | |||
-rw-r--r-- | tools/test/h5diff/testfiles/diff_strings2.h5 | bin | 4464 -> 4640 bytes | |||
-rw-r--r-- | tools/test/h5diff/testfiles/h5diff_tmp1.txt | 14 |
5 files changed, 42 insertions, 2 deletions
diff --git a/tools/test/h5diff/CMakeTests.cmake b/tools/test/h5diff/CMakeTests.cmake index f6cd2dd..5759c2b 100644 --- a/tools/test/h5diff/CMakeTests.cmake +++ b/tools/test/h5diff/CMakeTests.cmake @@ -1130,7 +1130,7 @@ ADD_H5_TEST (h5diff_631 0 -v --use-system-epsilon ${FILE1} ${FILE1} g1/fp18 g1/f # ############################################################################## ADD_H5_TEST (h5diff_70 1 -v ${FILE5} ${FILE6}) # temporary test to verify HDF5-8625 -ADD_H5_TEST (h5diff_tmp1 0 tmptest2.he5 tmptest.he5) +ADD_H5_TEST (h5diff_tmp1 1 tmptest2.he5 tmptest.he5) # temporary test to verify HDF5-8639 ADD_H5_TEST (h5diff_tmp2 1 tmpSingleSiteBethe.output.h5 tmpSingleSiteBethe.reference.h5) diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index cc7b057..4a929ae 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -5466,6 +5466,34 @@ static void test_objs_strings(const char *fname1, const char *fname2) H5Sclose(space); H5Dclose(dataset); + /* string 5 : early term long string */ + string4A[0][10] = 0; + string4A[0][11] = 0; + string4B[0][10] = 0; + + string4A[1][10] = 0; + string4A[1][11] = 'Z'; + string4B[1][10] = 0; + string4B[1][11] = 'x'; + + string4A[2][10] = 0; + string4B[2][10] = 0; + string4B[2][11] = 'a'; + string4B[2][12] = 'B'; + string4B[2][13] = 'c'; + space = H5Screate_simple(1, dims4, NULL); + f_type = mkstr(168, H5T_STR_NULLTERM); + m_type = mkstr(21, H5T_STR_NULLTERM); + dataset = H5Dcreate2(fid1, "/string5", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string4A); + H5Dclose(dataset); + dataset = H5Dcreate2(fid2, "/string5", f_type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); + H5Dwrite(dataset, m_type, H5S_ALL, H5S_ALL, H5P_DEFAULT, string4B); + H5Tclose(m_type); + H5Tclose(f_type); + H5Sclose(space); + H5Dclose(dataset); + out: /*----------------------------------------------------------------------- * Close IDs diff --git a/tools/test/h5diff/testfiles/diff_strings1.h5 b/tools/test/h5diff/testfiles/diff_strings1.h5 Binary files differindex 8839f5a..0f8b380 100644 --- a/tools/test/h5diff/testfiles/diff_strings1.h5 +++ b/tools/test/h5diff/testfiles/diff_strings1.h5 diff --git a/tools/test/h5diff/testfiles/diff_strings2.h5 b/tools/test/h5diff/testfiles/diff_strings2.h5 Binary files differindex 810278c..e8520ae 100644 --- a/tools/test/h5diff/testfiles/diff_strings2.h5 +++ b/tools/test/h5diff/testfiles/diff_strings2.h5 diff --git a/tools/test/h5diff/testfiles/h5diff_tmp1.txt b/tools/test/h5diff/testfiles/h5diff_tmp1.txt index 40e3fb6..e2bb247 100644 --- a/tools/test/h5diff/testfiles/h5diff_tmp1.txt +++ b/tools/test/h5diff/testfiles/h5diff_tmp1.txt @@ -1,5 +1,17 @@ +attribute: <EndDate of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>> and <EndDate of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>> +3 differences found +attribute: <Set2eqSet1 of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>> and <Set2eqSet1 of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>> +1 differences found +attribute: <VersionID of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>> and <VersionID of </HDFEOS/ADDITIONAL/FILE_ATTRIBUTES>> +1 differences found +attribute: <LongName of </HDFEOS/GRIDS/SET1/Data Fields/STv>> and <LongName of </HDFEOS/GRIDS/SET1/Data Fields/STv>> +1 differences found +attribute: <LongName of </HDFEOS/GRIDS/SET1/Data Fields/Tot_Precip_Water>> and <LongName of </HDFEOS/GRIDS/SET1/Data Fields/Tot_Precip_Water>> +1 differences found +attribute: <LongName of </HDFEOS/GRIDS/SET2/Data Fields/STv>> and <LongName of </HDFEOS/GRIDS/SET2/Data Fields/STv>> +1 differences found -------------------------------- Some objects are not comparable -------------------------------- Use -c for a list of objects. -EXIT CODE: 0 +EXIT CODE: 1 |