diff --git a/nc_test/CMakeLists.txt b/nc_test/CMakeLists.txt index fcb20cee9..08b709068 100644 --- a/nc_test/CMakeLists.txt +++ b/nc_test/CMakeLists.txt @@ -38,7 +38,7 @@ TARGET_LINK_LIBRARIES(nc_test2 ) # Some extra stand-alone tests -SET(TESTS t_nc tst_small tst_misc tst_norm tst_names tst_nofill tst_nofill2 tst_nofill3 tst_meta) +SET(TESTS t_nc tst_small tst_misc tst_norm tst_names tst_nofill tst_nofill2 tst_nofill3 tst_meta cdf5_gh159_test) IF(NOT HAVE_BASH) SET(TESTS ${TESTS} tst_atts3) diff --git a/nc_test/cdf5_gh159_test.c b/nc_test/cdf5_gh159_test.c index 19985cff7..a1f8a8970 100644 --- a/nc_test/cdf5_gh159_test.c +++ b/nc_test/cdf5_gh159_test.c @@ -2,6 +2,8 @@ #include #include +#define RANK_y3 1 +#define FILENAME "cdf5_test.nc" void check_err(const int stat, const int line, const char *file) { @@ -26,12 +28,12 @@ main() {/* create cdf5_test */ /* variable ids */ int y3_id; -# define RANK_y3 1 + int y3_dims[RANK_y3]; /* enter define mode */ - stat = nc_create("cdf5_test", NC_CLOBBER | NC_64BIT_DATA, &ncid); + stat = nc_create(FILENAME, NC_CLOBBER | NC_64BIT_DATA, &ncid); check_err(stat,__LINE__,__FILE__); stat = nc_def_dim(ncid, "D3", D3_len, &D3_dim);