diff options
author | Thomas White <taw@physics.org> | 2020-06-26 12:06:20 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-07-29 18:53:44 +0200 |
commit | bb4070ecc7d92cb8ce3211ca7f637e07756eaae8 (patch) | |
tree | 33d0890cc13ce35e984f8bc6ac1a150cfdf3d17d /tests/ev_enum1.c | |
parent | bed1e11f220c315e1a01b917abf200e927a1621a (diff) |
Implement dimension part of event expansion, and clean up tests
Diffstat (limited to 'tests/ev_enum1.c')
-rw-r--r-- | tests/ev_enum1.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/tests/ev_enum1.c b/tests/ev_enum1.c index 9c414dc5..c1a93320 100644 --- a/tests/ev_enum1.c +++ b/tests/ev_enum1.c @@ -33,9 +33,11 @@ #include <stdio.h> #include <stdarg.h> +#include <string.h> +#include <stdlib.h> #include <hdf5.h> -#include "../libcrystfel/src/image-hdf5.c" +extern char **expand_paths(hid_t fh, char *pattern, int *n_evs); int main(int argc, char *argv[]) { @@ -46,7 +48,7 @@ int main(int argc, char *argv[]) fh = H5Fopen(argv[1], H5F_ACC_RDONLY, H5P_DEFAULT); if ( fh < 0 ) { - ERROR("Couldn't open file\n"); + printf("Couldn't open file\n"); return 1; } @@ -55,32 +57,32 @@ int main(int argc, char *argv[]) &n_event_ids); if ( event_ids == NULL ) { - STATUS("event_ids = NULL\n"); + printf("event_ids = NULL\n"); return 1; } if ( n_event_ids != 4 ) { - STATUS("Number of event IDs = %i\n", n_event_ids); + printf("Number of event IDs = %i\n", n_event_ids); return 1; } - if ( strcmp(event_ids[0], "/ev_1/dataABCset") != 0 ) { - STATUS("Wrong event id '%s'\n", event_ids[0]); + if ( strcmp(event_ids[0], "ev_1/dataABCset//") != 0 ) { + printf("Wrong event id '%s'\n", event_ids[0]); return 1; } - if ( strcmp(event_ids[1], "/ev_2/dataDEFset") != 0 ) { - STATUS("Wrong event id '%s'\n", event_ids[1]); + if ( strcmp(event_ids[1], "ev_2/dataDEFset//") != 0 ) { + printf("Wrong event id '%s'\n", event_ids[1]); return 1; } - if ( strcmp(event_ids[2], "/ev_3/dataGHIset") != 0 ) { - STATUS("Wrong event id '%s'\n", event_ids[2]); + if ( strcmp(event_ids[2], "ev_3/dataGHIset//") != 0 ) { + printf("Wrong event id '%s'\n", event_ids[2]); return 1; } - if ( strcmp(event_ids[3], "/ev_5/dataNOPset") != 0 ) { - STATUS("Wrong event id '%s'\n", event_ids[3]); + if ( strcmp(event_ids[3], "ev_5/dataNOPset//") != 0 ) { + printf("Wrong event id '%s'\n", event_ids[3]); return 1; } |