netcdf-c/unit_test/tst_nclist.c

43 lines
1.1 KiB
C
Raw Normal View History

2019-08-09 23:31:24 +08:00
/* This is part of the netCDF package. Copyright 2005-2019 University
Corporation for Atmospheric Research/Unidata. See COPYRIGHT file
for conditions of use.
Test list functions in nclistmgr.c.
Ed Hartnett, 8/10/19
*/
#include "config.h"
#include <nc_tests.h>
2019-08-09 23:38:40 +08:00
#include "nc.h"
2019-08-09 23:31:24 +08:00
#include "err_macros.h"
int
main(int argc, char **argv)
{
2019-08-10 01:13:55 +08:00
printf("\n*** Testing netcdf internal NC list functions.\n");
printf("Testing NC list functions with no open files...");
{
/* These are cases where there are no files, or NULL
* params. */
if (count_NCList()) ERR;
free_NCList();
if (find_in_NCList_by_name("nope")) ERR;
if (iterate_NCList(0, NULL)) ERR;
}
SUMMARIZE_ERR;
printf("Testing adding to NC list...");
{
/* NC *ncp; */
/* int ret; */
2019-08-09 23:31:24 +08:00
2019-08-10 01:13:55 +08:00
/* /\* Create the NC* instance and insert its dispatcher and model. *\/ */
/* if ((ret = new_NC(dispatcher, path, cmode, &model, &ncp))) ERR; */
/* /\* Add to list of known open files and define ext_ncid. *\/ */
/* add_to_NCList(ncp); */
}
SUMMARIZE_ERR;
FINAL_RESULTS;
2019-08-09 23:31:24 +08:00
}