Skip to content
Snippets Groups Projects
Commit 4b2c74b8 authored by Moritz Hanke's avatar Moritz Hanke
Browse files

adds test for routine yac_read_fesom_basic_grid

parent 13b1c4ba
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "tests.h"
#include "read_fesom_grid.h"
......@@ -20,19 +21,27 @@ int main(void) {
write_dummy_grid_file("fesom_grid.nc");
struct yac_basic_grid_data fesom_grid =
struct yac_basic_grid_data fesom_grid_data =
yac_read_fesom_basic_grid_data("fesom_grid.nc");
struct yac_basic_grid * fesom_grid =
yac_read_fesom_basic_grid("fesom_grid.nc", "fesom_grid");
if (strcmp(yac_basic_grid_get_name(fesom_grid), "fesom_grid"))
PUT_ERR("ERROR: wrong name\n");
unlink("fesom_grid.nc");
check_grid(fesom_grid);
check_grid(fesom_grid_data);
check_grid(*yac_basic_grid_get_data(fesom_grid));
// #define WRITE_VTK_GRID_FILE
#ifdef WRITE_VTK_GRID_FILE
yac_write_basic_grid_data_to_file(&fesom_grid, "fesom");
yac_write_basic_grid_data_to_file(&fesom_grid_data, "fesom");
#endif // WRITE_VTK_GRID_FILE
yac_basic_grid_data_free(fesom_grid);
yac_basic_grid_delete(fesom_grid);
yac_basic_grid_data_free(fesom_grid_data);
return TEST_EXIT_CODE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment