diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-10-27 16:18:06 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-10-27 16:18:06 (GMT) |
commit | 64e96385de36e41834c7d7de23083ee8b250a579 (patch) | |
tree | f943aa64df692df0f8cec56535cf6b968d1c2318 | |
parent | 30675b0c4ac878f4e0238b188958ac7865b25ba4 (diff) | |
download | hdf5-64e96385de36e41834c7d7de23083ee8b250a579.zip hdf5-64e96385de36e41834c7d7de23083ee8b250a579.tar.gz hdf5-64e96385de36e41834c7d7de23083ee8b250a579.tar.bz2 |
[svn-r15967] 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: windows, 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 5669945..b1f9c40 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -442,10 +442,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 ) @@ -453,7 +455,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] ) @@ -462,6 +464,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; + } + } + } + /*------------------------------------------------------------------------- |