Testing: Increase coverage

This commit is contained in:
shahramn 2024-08-25 16:33:52 +01:00
parent 8bf440d850
commit 525bfb520e
2 changed files with 12 additions and 2 deletions

View File

@ -860,7 +860,7 @@ int main(int argc, char* argv[])
geometry_len = 128;
GRIB_CHECK(grib_get_string(h, "gridType", geometry, &geometry_len), 0);
if (strcmp(geometry, grids[igrid])) {
printf("Geometry is incorrect\n");
fprintf(stderr, "Geometry is incorrect\n");
return 1;
}

View File

@ -225,7 +225,6 @@ static void test_assertion_catching()
char empty[] = "";
char** list = NULL;
int i = 0;
Assert(assertion_caught == 0);
codes_set_codes_assertion_failed_proc(&my_assertion_proc);
@ -265,6 +264,16 @@ static void test_logging_proc()
Assert(logging_caught == 0);
}
static void my_print_proc(const grib_context* c, void* descriptor, const char* mesg)
{
}
static void test_print_proc()
{
grib_context* context = grib_context_get_default();
grib_context_set_print_proc(context, my_print_proc);
grib_context_set_print_proc(context, NULL);
}
static void test_concept_condition_strings()
{
printf("Running %s ...\n", __func__);
@ -788,6 +797,7 @@ int main(int argc, char** argv)
test_scale_factor_scaled_values();
test_dates();
test_logging_proc();
test_print_proc();
test_grib_binary_search();
test_parse_keyval_string();