mirror of https://github.com/ecmwf/eccodes.git
Testing: Increase coverage
This commit is contained in:
parent
8bf440d850
commit
525bfb520e
|
@ -860,7 +860,7 @@ int main(int argc, char* argv[])
|
||||||
geometry_len = 128;
|
geometry_len = 128;
|
||||||
GRIB_CHECK(grib_get_string(h, "gridType", geometry, &geometry_len), 0);
|
GRIB_CHECK(grib_get_string(h, "gridType", geometry, &geometry_len), 0);
|
||||||
if (strcmp(geometry, grids[igrid])) {
|
if (strcmp(geometry, grids[igrid])) {
|
||||||
printf("Geometry is incorrect\n");
|
fprintf(stderr, "Geometry is incorrect\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -225,7 +225,6 @@ static void test_assertion_catching()
|
||||||
|
|
||||||
char empty[] = "";
|
char empty[] = "";
|
||||||
char** list = NULL;
|
char** list = NULL;
|
||||||
int i = 0;
|
|
||||||
Assert(assertion_caught == 0);
|
Assert(assertion_caught == 0);
|
||||||
codes_set_codes_assertion_failed_proc(&my_assertion_proc);
|
codes_set_codes_assertion_failed_proc(&my_assertion_proc);
|
||||||
|
|
||||||
|
@ -265,6 +264,16 @@ static void test_logging_proc()
|
||||||
Assert(logging_caught == 0);
|
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()
|
static void test_concept_condition_strings()
|
||||||
{
|
{
|
||||||
printf("Running %s ...\n", __func__);
|
printf("Running %s ...\n", __func__);
|
||||||
|
@ -788,6 +797,7 @@ int main(int argc, char** argv)
|
||||||
test_scale_factor_scaled_values();
|
test_scale_factor_scaled_values();
|
||||||
test_dates();
|
test_dates();
|
||||||
test_logging_proc();
|
test_logging_proc();
|
||||||
|
test_print_proc();
|
||||||
test_grib_binary_search();
|
test_grib_binary_search();
|
||||||
test_parse_keyval_string();
|
test_parse_keyval_string();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue