diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-10-29 20:01:38 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-10-29 20:01:38 (GMT) |
commit | 61af8db951144e0795165df6a198a6ba4bbafef3 (patch) | |
tree | be6714c86f1165d2fdec237796cfd4c61e84ec09 | |
parent | 840c6e34d3aa5d6069da7a8525fb60d0c2dbcfa4 (diff) | |
download | hdf5-61af8db951144e0795165df6a198a6ba4bbafef3.zip hdf5-61af8db951144e0795165df6a198a6ba4bbafef3.tar.gz hdf5-61af8db951144e0795165df6a198a6ba4bbafef3.tar.bz2 |
[svn-r15990] Merge with 1.8 rev 15967
regarding the return value of h5diff (0, no difference in files, 1 difference )
objects with the same name must be of the same type
tested: linux
-rw-r--r-- | tools/lib/h5diff.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index 8876a24..60d97b0 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -450,10 +450,12 @@ hsize_t diff_match(hid_t file1_id, /*------------------------------------------------------------------------- - * the number of objects - * in file1 must be the same as in file2 + * regarding the return value of h5diff (0, no difference in files, 1 difference ) + * 1) the number of objects in file1 must be the same as in file2 + * 2) the graph must match, i.e same names (absolute path) + * 3) objects with the same name must be of the same type *------------------------------------------------------------------------- - */ + */ /* number of different objects */ if ( info1->nused != info2->nused ) @@ -461,7 +463,7 @@ hsize_t diff_match(hid_t file1_id, options->contents = 0; } - + /* objects in one file and not the other */ for( i = 0; i < table->nobjs; i++) { if( table->objs[i].flags[0] != table->objs[i].flags[1] ) @@ -470,6 +472,18 @@ hsize_t diff_match(hid_t file1_id, } } + /* objects with the same name but different HDF5 types */ + for( i = 0; i < table->nobjs; i++) + { + if ( table->objs[i].flags[0] && table->objs[i].flags[1] ) + { + if ( table->objs[i].type != table->objs[i].type ) + { + options->contents = 0; + } + } + } + /*------------------------------------------------------------------------- |