diff --git a/examples/C/grib_multi.c b/examples/C/grib_multi.c index 617c30a71..58f19086a 100644 --- a/examples/C/grib_multi.c +++ b/examples/C/grib_multi.c @@ -42,14 +42,14 @@ int main(int argc, char** argv) return 1; } - CODES_CHECK(grib_count_in_file(NULL, in, &mcount), 0); + CODES_CHECK(codes_count_in_file(NULL, in, &mcount), 0); assert(mcount == 56); - printf("grib_count_in_file counted %d messages\n", mcount); + printf("count_in_file counted %d messages\n", mcount); mcount = 0; - CODES_CHECK(grib_count_in_filename(NULL, filename, &mcount), 0); + CODES_CHECK(codes_count_in_filename(NULL, filename, &mcount), 0); assert(mcount == 56); - printf("grib_count_in_filename counted %d messages\n", mcount); + printf("count_in_filename counted %d messages\n", mcount); mcount = 0; while ((h = codes_handle_new_from_file(0, in, PRODUCT_GRIB, &err)) != NULL) { diff --git a/tests/codes_set_samples_path.cc b/tests/codes_set_samples_path.cc index dbcff4ed7..9204560d2 100644 --- a/tests/codes_set_samples_path.cc +++ b/tests/codes_set_samples_path.cc @@ -9,6 +9,7 @@ */ #include "grib_api_internal.h" +#include "eccodes.h" /* Windows always has a colon in pathnames e.g. C:\temp\file. So instead we use semi-colons as delimiter */ /* in order to have multiple definitions/samples directories */ @@ -32,6 +33,7 @@ int main(int argc, char** argv) sample_name = argv[1]; new_dir = argv[2]; /* The directory containing the given sample */ + codes_context_set_debug(c, -1); printf("Initial samples path = %s\n", grib_samples_path(c)); /* Should fail - default samples path does not include ifs_samples dirs */ @@ -40,7 +42,9 @@ int main(int argc, char** argv) snprintf(full_path, 2048, "%s%c%s", new_dir, ECC_PATH_DELIMITER_CHAR, grib_samples_path(c)); printf("Change samples_path to: %s\n", full_path); - grib_context_set_samples_path(c, full_path); + codes_context_set_samples_path(c, full_path); + + codes_context_set_debug(c, 0); h = grib_handle_new_from_samples(c, sample_name); Assert(h); diff --git a/tests/unit_tests.cc b/tests/unit_tests.cc index d1575301a..85505d2a6 100644 --- a/tests/unit_tests.cc +++ b/tests/unit_tests.cc @@ -770,6 +770,9 @@ void test_codes_context_set_debug() int main(int argc, char** argv) { printf("Doing unit tests. ecCodes version = %ld\n", grib_get_api_version()); + printf("codes_print_api_version gives: "); + codes_print_api_version(stdout); + printf("\n"); test_codes_context_set_debug(); test_codes_get_error_message();