Skip to content

Commit

Permalink
Separate check of singleton id from check that accesses the axis array
Browse files Browse the repository at this point in the history
  • Loading branch information
mauzey1 committed Aug 14, 2024
1 parent 1a551f8 commit 1e32b83
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Test/test_singletons.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ int test_bs550aer(const int *axes_ids, int num_axes, int zfactor_id, double base
// Find singleton dimension for bs550aer
for(i = 0; i < cmor_vars[var_id].ndims; ++i){
singleton_id = cmor_vars[var_id].singleton_ids[i];
if(singleton_id != -1 && strcmp(cmor_axes[singleton_id].id, "wavelength") == 0)
wavelength_found++;
if(singleton_id != -1) {
if(strcmp(cmor_axes[singleton_id].id, "wavelength") == 0)
wavelength_found++;
}
}
if(wavelength_found != 1)
fail("error in singleton dimension");
Expand Down

0 comments on commit 1e32b83

Please sign in to comment.