make test subroutine return nok, add comments on X_CHAR_MIN and X_CHAR_MAX

This commit is contained in:
Wei-keng Liao 2016-10-09 22:18:46 -05:00
parent 9cf01256cf
commit 835ff7cd1e
4 changed files with 209 additions and 193 deletions

View File

@ -31,3 +31,4 @@ print_n_size_t(size_t nelems, const size_t *array);
#endif #endif
#define IF(EXPR) if (ifFail(EXPR, __LINE__, __FILE__)) #define IF(EXPR) if (ifFail(EXPR, __LINE__, __FILE__))
#define ELSE_NOK else {nok++;}

View File

@ -830,7 +830,7 @@ test_nc_inq_vartype(void)
/* /*
* Test nc_put_var1 * Test nc_put_var1
*/ */
void int
test_nc_get_var1(void) test_nc_get_var1(void)
{ {
int ncid; int ncid;
@ -877,7 +877,8 @@ test_nc_get_var1(void)
IF (err) IF (err)
error("error in nc2dbl"); error("error in nc2dbl");
if (inRange(expect,var_type[i])) { if (inRange(expect,var_type[i])) {
IF (!equal(value,expect,var_type[i],NCT_DOUBLE)) { IF (!equal2(value,expect,var_type[i])) {
error("getting var %s of type %s\n", var_name[i], s_nc_type(var_type[i]));
error("expected: %G, got: %G", expect, value); error("expected: %G, got: %G", expect, value);
} else { } else {
nok++; nok++;
@ -889,6 +890,7 @@ test_nc_get_var1(void)
IF (err) IF (err)
error("nc_close: %s", nc_strerror(err)); error("nc_close: %s", nc_strerror(err));
print_nok(nok); print_nok(nok);
return nok;
} }
/* /*
@ -897,7 +899,7 @@ test_nc_get_var1(void)
* Get 2^rank (nslabs) slabs so defined * Get 2^rank (nslabs) slabs so defined
* Each get overwrites buffer, so check after each get. * Each get overwrites buffer, so check after each get.
*/ */
void int
test_nc_get_vara(void) test_nc_get_vara(void)
{ {
int ncid; int ncid;
@ -986,7 +988,7 @@ test_nc_get_vara(void)
index[d] += start[d]; index[d] += start[d];
expect = hash(var_type[i], var_rank[i], index); expect = hash(var_type[i], var_rank[i], index);
if (inRange(expect,var_type[i])) { if (inRange(expect,var_type[i])) {
IF (!equal(got,expect,var_type[i],NCT_DOUBLE)) { IF (!equal2(got,expect,var_type[i])) {
error("value read not that expected"); error("value read not that expected");
if (verbose) { if (verbose) {
error("\n"); error("\n");
@ -1008,6 +1010,7 @@ test_nc_get_vara(void)
IF (err) IF (err)
error("nc_close: %s", nc_strerror(err)); error("nc_close: %s", nc_strerror(err));
print_nok(nok); print_nok(nok);
return nok;
} }
@ -1017,7 +1020,7 @@ test_nc_get_vara(void)
* Get 2^rank (nslabs) slabs so defined * Get 2^rank (nslabs) slabs so defined
* Each get overwrites buffer, so check after each get. * Each get overwrites buffer, so check after each get.
*/ */
void int
test_nc_get_vars(void) test_nc_get_vars(void)
{ {
int ncid; int ncid;
@ -1141,7 +1144,7 @@ test_nc_get_vars(void)
index2[d] = index[d] + index2[d] * stride[d]; index2[d] = index[d] + index2[d] * stride[d];
expect = hash(var_type[i], var_rank[i], index2); expect = hash(var_type[i], var_rank[i], index2);
if (inRange(expect,var_type[i])) { if (inRange(expect,var_type[i])) {
IF (!equal(got,expect,var_type[i],NCT_DOUBLE)) { IF (!equal2(got,expect,var_type[i])) {
error("value read not that expected"); error("value read not that expected");
if (verbose) { if (verbose) {
error("\n"); error("\n");
@ -1175,6 +1178,7 @@ test_nc_get_vars(void)
IF (err) IF (err)
error("nc_close: %s", nc_strerror(err)); error("nc_close: %s", nc_strerror(err));
print_nok(nok); print_nok(nok);
return nok;
} }
@ -1186,7 +1190,7 @@ test_nc_get_vars(void)
* Buffer should end up being bit image of external variable. * Buffer should end up being bit image of external variable.
* So all gets for a variable store in different elements of buffer * So all gets for a variable store in different elements of buffer
*/ */
void int
test_nc_get_varm(void) test_nc_get_varm(void)
{ {
int ncid; int ncid;
@ -1314,7 +1318,7 @@ test_nc_get_varm(void)
IF (err) IF (err)
error("error in nc2dbl"); error("error in nc2dbl");
if (inRange(expect,var_type[i])) { if (inRange(expect,var_type[i])) {
IF (!equal(got,expect,var_type[i],NCT_DOUBLE)) { IF (!equal2(got,expect,var_type[i])) {
error("value read not that expected"); error("value read not that expected");
if (verbose) { if (verbose) {
error("\n"); error("\n");
@ -1335,10 +1339,11 @@ test_nc_get_varm(void)
IF (err) IF (err)
error("nc_close: %s", nc_strerror(err)); error("nc_close: %s", nc_strerror(err));
print_nok(nok); print_nok(nok);
return nok;
} }
void int
test_nc_get_att(void) test_nc_get_att(void)
{ {
int ncid; int ncid;
@ -1379,7 +1384,7 @@ test_nc_get_att(void)
IF (err) IF (err)
error("error in nc2dbl"); error("error in nc2dbl");
if (inRange(expect,ATT_TYPE(i,j))) { if (inRange(expect,ATT_TYPE(i,j))) {
IF (!equal(got,expect,ATT_TYPE(i,j),NCT_DOUBLE)) { IF (!equal2(got,expect,ATT_TYPE(i,j))) {
error("value read not that expected"); error("value read not that expected");
if (verbose) { if (verbose) {
error("\n"); error("\n");
@ -1404,6 +1409,7 @@ test_nc_get_att(void)
IF (err) IF (err)
error("nc_close: %s", nc_strerror(err)); error("nc_close: %s", nc_strerror(err));
print_nok(nok); print_nok(nok);
return nok;
} }

View File

@ -706,10 +706,10 @@ test_nc_def_var(void)
/* /*
* Test nc_put_var1 * Test nc_put_var1
*/ */
void int
test_nc_put_var1(void) test_nc_put_var1(void)
{ {
int ncid; int ncid, nok=0;
int i; int i;
int j; int j;
int err; int err;
@ -720,7 +720,7 @@ test_nc_put_var1(void)
err = file_create(scratch, NC_NOCLOBBER, &ncid); err = file_create(scratch, NC_NOCLOBBER, &ncid);
IF (err) { IF (err) {
error("nc_create: %s", nc_strerror(err)); error("nc_create: %s", nc_strerror(err));
return; return nok;
} }
def_dims(ncid); def_dims(ncid);
def_vars(ncid); def_vars(ncid);
@ -754,7 +754,8 @@ test_nc_put_var1(void)
if (inRange(value, var_type[i])) { if (inRange(value, var_type[i])) {
err = dbl2nc(value, var_type[i], buf); err = dbl2nc(value, var_type[i], buf);
IF (err) IF (err)
error("error in dbl2nc"); error("error in dbl2nc var:%s type:%s",
var_name[i],s_nc_type(var_type[i]));
if (var_rank[i] == 0 && i%2 == 0) if (var_rank[i] == 0 && i%2 == 0)
err = nc_put_var1(ncid, i, NULL, buf); err = nc_put_var1(ncid, i, NULL, buf);
else else
@ -773,6 +774,7 @@ test_nc_put_var1(void)
err = remove(scratch); err = remove(scratch);
IF (err) IF (err)
error("remove of %s failed", scratch); error("remove of %s failed", scratch);
return nok;
} }
@ -783,10 +785,10 @@ test_nc_put_var1(void)
* Redefine buffer for each put. * Redefine buffer for each put.
* At end check all variables using check_vars * At end check all variables using check_vars
*/ */
void int
test_nc_put_vara(void) test_nc_put_vara(void)
{ {
int ncid; int ncid, nok=0;
int d; int d;
int i; int i;
int j; int j;
@ -805,7 +807,7 @@ test_nc_put_vara(void)
err = file_create(scratch, NC_NOCLOBBER, &ncid); err = file_create(scratch, NC_NOCLOBBER, &ncid);
IF (err) { IF (err) {
error("nc_create: %s", nc_strerror(err)); error("nc_create: %s", nc_strerror(err));
return; return nok;
} }
def_dims(ncid); def_dims(ncid);
def_vars(ncid); def_vars(ncid);
@ -893,6 +895,7 @@ test_nc_put_vara(void)
err = remove(scratch); err = remove(scratch);
IF (err) IF (err)
error("remove of %s failed", scratch); error("remove of %s failed", scratch);
return nok;
} }
@ -904,10 +907,10 @@ test_nc_put_vara(void)
* Redefine buffer for each put. * Redefine buffer for each put.
* At end check all variables using check_vars * At end check all variables using check_vars
*/ */
void int
test_nc_put_vars(void) test_nc_put_vars(void)
{ {
int ncid; int ncid, nok=0;
int d; int d;
int i; int i;
int j; int j;
@ -932,7 +935,7 @@ test_nc_put_vars(void)
err = file_create(scratch, NC_NOCLOBBER, &ncid); err = file_create(scratch, NC_NOCLOBBER, &ncid);
IF (err) { IF (err) {
error("nc_create: %s", nc_strerror(err)); error("nc_create: %s", nc_strerror(err));
return; return nok;
} }
def_dims(ncid); def_dims(ncid);
def_vars(ncid); def_vars(ncid);
@ -1048,6 +1051,7 @@ test_nc_put_vars(void)
err = remove(scratch); err = remove(scratch);
IF (err) IF (err)
error("remove of %s failed", scratch); error("remove of %s failed", scratch);
return nok;
} }
@ -1060,10 +1064,10 @@ test_nc_put_vars(void)
* So all puts for a variable put different elements of buffer * So all puts for a variable put different elements of buffer
* At end check all variables using check_vars * At end check all variables using check_vars
*/ */
void int
test_nc_put_varm(void) test_nc_put_varm(void)
{ {
int ncid; int ncid, nok=0;
int i; int i;
int j; int j;
int k; int k;
@ -1087,7 +1091,7 @@ test_nc_put_varm(void)
err = file_create(scratch, NC_NOCLOBBER, &ncid); err = file_create(scratch, NC_NOCLOBBER, &ncid);
IF (err) { IF (err) {
error("nc_create: %s", nc_strerror(err)); error("nc_create: %s", nc_strerror(err));
return; return nok;
} }
def_dims(ncid); def_dims(ncid);
def_vars(ncid); def_vars(ncid);
@ -1210,6 +1214,7 @@ test_nc_put_varm(void)
err = remove(scratch); err = remove(scratch);
IF (err) IF (err)
error("remove of %s failed", scratch); error("remove of %s failed", scratch);
return nok;
} }
@ -1295,10 +1300,10 @@ test_nc_rename_var(void)
} }
void int
test_nc_put_att(void) test_nc_put_att(void)
{ {
int ncid; int ncid, nok=0;
int varid; int varid;
int i; int i;
int j; int j;
@ -1314,7 +1319,7 @@ test_nc_put_att(void)
err = file_create(scratch, NC_NOCLOBBER, &ncid); err = file_create(scratch, NC_NOCLOBBER, &ncid);
IF (err) { IF (err) {
error("nc_create: %s", nc_strerror(err)); error("nc_create: %s", nc_strerror(err));
return; return nok;
} }
def_dims(ncid); def_dims(ncid);
def_vars(ncid); def_vars(ncid);
@ -1362,6 +1367,7 @@ test_nc_put_att(void)
err = remove(scratch); err = remove(scratch);
IF (err) IF (err)
error("remove of %s failed", scratch); error("remove of %s failed", scratch);
return nok;
} }
@ -1537,7 +1543,7 @@ test_nc_rename_att(void)
nc_type atttype; nc_type atttype;
size_t length; size_t length;
size_t attlength; size_t attlength;
signed char text[MAX_NELS]; char text[MAX_NELS];
double value[MAX_NELS]; double value[MAX_NELS];
double expect; double expect;

View File

@ -26,13 +26,12 @@
/* Limits of external types (based on those in ncx.h) */ /* Limits of external types (based on those in ncx.h) */
#ifdef __CHAR_UNSIGNED__ /* Note: In CDF format specification, NC_CHAR is for text characters, which
#define X_CHAR_MIN SCHAR_MIN * is considered an 8-bit unsigned integer. Since it is for printable text
#define X_CHAR_MAX SCHAR_MAX * characters, its values should range from 0 (X_CHAR_MIN) to 255 (X_CHAR_MAX).
#else */
#define X_CHAR_MIN CHAR_MIN #define X_CHAR_MIN 0
#define X_CHAR_MAX CHAR_MAX #define X_CHAR_MAX 255
#endif //__unsigned_char__
#define X_BYTE_MIN (-128) #define X_BYTE_MIN (-128)
#define X_BYTE_MAX 127 #define X_BYTE_MAX 127
@ -205,7 +204,7 @@ extern "C" {
# include <sys/types.h> # include <sys/types.h>
#endif #endif
typedef signed char text; typedef char text;
typedef signed char schar; typedef signed char schar;
#ifndef HAVE_USHORT #ifndef HAVE_USHORT
@ -290,175 +289,175 @@ extern void test_nc_inq_varndims(void);
extern void test_nc_inq_vartype(void); extern void test_nc_inq_vartype(void);
extern void test_nc_inq_var(void); extern void test_nc_inq_var(void);
extern void test_nc_get_var_double(void); extern int test_nc_get_var_double(void);
extern void test_nc_get_var_float(void); extern int test_nc_get_var_float(void);
extern void test_nc_get_var_int(void); extern int test_nc_get_var_int(void);
extern void test_nc_get_var_long(void); extern int test_nc_get_var_long(void);
extern void test_nc_get_var_schar(void); extern int test_nc_get_var_schar(void);
extern void test_nc_get_var_short(void); extern int test_nc_get_var_short(void);
extern void test_nc_get_var_text(void); extern int test_nc_get_var_text(void);
extern void test_nc_get_var_uchar(void); extern int test_nc_get_var_uchar(void);
extern void test_nc_get_var(void); extern int test_nc_get_var(void);
extern void test_nc_get_var_ushort(void); extern int test_nc_get_var_ushort(void);
extern void test_nc_get_var_uint(void); extern int test_nc_get_var_uint(void);
extern void test_nc_get_var_longlong(void); extern int test_nc_get_var_longlong(void);
extern void test_nc_get_var_ulonglong(void); extern int test_nc_get_var_ulonglong(void);
extern void test_nc_get_var1_double(void); extern int test_nc_get_var1_double(void);
extern void test_nc_get_var1_float(void); extern int test_nc_get_var1_float(void);
extern void test_nc_get_var1_int(void); extern int test_nc_get_var1_int(void);
extern void test_nc_get_var1_long(void); extern int test_nc_get_var1_long(void);
extern void test_nc_get_var1_schar(void); extern int test_nc_get_var1_schar(void);
extern void test_nc_get_var1_short(void); extern int test_nc_get_var1_short(void);
extern void test_nc_get_var1_text(void); extern int test_nc_get_var1_text(void);
extern void test_nc_get_var1_uchar(void); extern int test_nc_get_var1_uchar(void);
extern void test_nc_get_var1(void); extern int test_nc_get_var1(void);
extern void test_nc_get_var1_ushort(void); extern int test_nc_get_var1_ushort(void);
extern void test_nc_get_var1_uint(void); extern int test_nc_get_var1_uint(void);
extern void test_nc_get_var1_longlong(void); extern int test_nc_get_var1_longlong(void);
extern void test_nc_get_var1_ulonglong(void); extern int test_nc_get_var1_ulonglong(void);
extern void test_nc_get_vara_double(void); extern int test_nc_get_vara_double(void);
extern void test_nc_get_vara_float(void); extern int test_nc_get_vara_float(void);
extern void test_nc_get_vara_int(void); extern int test_nc_get_vara_int(void);
extern void test_nc_get_vara_long(void); extern int test_nc_get_vara_long(void);
extern void test_nc_get_vara_schar(void); extern int test_nc_get_vara_schar(void);
extern void test_nc_get_vara_short(void); extern int test_nc_get_vara_short(void);
extern void test_nc_get_vara_text(void); extern int test_nc_get_vara_text(void);
extern void test_nc_get_vara_uchar(void); extern int test_nc_get_vara_uchar(void);
extern void test_nc_get_vara(void); extern int test_nc_get_vara(void);
extern void test_nc_get_vara_ushort(void); extern int test_nc_get_vara_ushort(void);
extern void test_nc_get_vara_uint(void); extern int test_nc_get_vara_uint(void);
extern void test_nc_get_vara_longlong(void); extern int test_nc_get_vara_longlong(void);
extern void test_nc_get_vara_ulonglong(void); extern int test_nc_get_vara_ulonglong(void);
extern void test_nc_get_vars(void); extern int test_nc_get_vars(void);
extern void test_nc_get_vars_double(void); extern int test_nc_get_vars_double(void);
extern void test_nc_get_vars_float(void); extern int test_nc_get_vars_float(void);
extern void test_nc_get_vars_int(void); extern int test_nc_get_vars_int(void);
extern void test_nc_get_vars_long(void); extern int test_nc_get_vars_long(void);
extern void test_nc_get_vars_schar(void); extern int test_nc_get_vars_schar(void);
extern void test_nc_get_vars_short(void); extern int test_nc_get_vars_short(void);
extern void test_nc_get_vars_text(void); extern int test_nc_get_vars_text(void);
extern void test_nc_get_vars_uchar(void); extern int test_nc_get_vars_uchar(void);
extern void test_nc_get_vars(void); extern int test_nc_get_vars(void);
extern void test_nc_get_vars_ushort(void); extern int test_nc_get_vars_ushort(void);
extern void test_nc_get_vars_uint(void); extern int test_nc_get_vars_uint(void);
extern void test_nc_get_vars_longlong(void); extern int test_nc_get_vars_longlong(void);
extern void test_nc_get_vars_ulonglong(void); extern int test_nc_get_vars_ulonglong(void);
extern void test_nc_get_varm(void); extern int test_nc_get_varm(void);
extern void test_nc_get_varm_double(void); extern int test_nc_get_varm_double(void);
extern void test_nc_get_varm_float(void); extern int test_nc_get_varm_float(void);
extern void test_nc_get_varm_int(void); extern int test_nc_get_varm_int(void);
extern void test_nc_get_varm_long(void); extern int test_nc_get_varm_long(void);
extern void test_nc_get_varm_schar(void); extern int test_nc_get_varm_schar(void);
extern void test_nc_get_varm_short(void); extern int test_nc_get_varm_short(void);
extern void test_nc_get_varm_text(void); extern int test_nc_get_varm_text(void);
extern void test_nc_get_varm_uchar(void); extern int test_nc_get_varm_uchar(void);
extern void test_nc_get_varm(void); extern int test_nc_get_varm(void);
extern void test_nc_get_varm_ushort(void); extern int test_nc_get_varm_ushort(void);
extern void test_nc_get_varm_uint(void); extern int test_nc_get_varm_uint(void);
extern void test_nc_get_varm_longlong(void); extern int test_nc_get_varm_longlong(void);
extern void test_nc_get_varm_ulonglong(void); extern int test_nc_get_varm_ulonglong(void);
extern void test_nc_get_att(void); extern int test_nc_get_att(void);
extern void test_nc_get_att_double(void); extern int test_nc_get_att_double(void);
extern void test_nc_get_att_float(void); extern int test_nc_get_att_float(void);
extern void test_nc_get_att_int(void); extern int test_nc_get_att_int(void);
extern void test_nc_get_att_long(void); extern int test_nc_get_att_long(void);
extern void test_nc_get_att_schar(void); extern int test_nc_get_att_schar(void);
extern void test_nc_get_att_short(void); extern int test_nc_get_att_short(void);
extern void test_nc_get_att_text(void); extern int test_nc_get_att_text(void);
extern void test_nc_get_att_uchar(void); extern int test_nc_get_att_uchar(void);
extern void test_nc_get_att_ushort(void); extern int test_nc_get_att_ushort(void);
extern void test_nc_get_att_uint(void); extern int test_nc_get_att_uint(void);
extern void test_nc_get_att_longlong(void); extern int test_nc_get_att_longlong(void);
extern void test_nc_get_att_ulonglong(void); extern int test_nc_get_att_ulonglong(void);
extern void test_nc_put_att(void); extern int test_nc_put_att(void);
extern void test_nc_put_var_double(void); extern int test_nc_put_var_double(void);
extern void test_nc_put_var_float(void); extern int test_nc_put_var_float(void);
extern void test_nc_put_var_int(void); extern int test_nc_put_var_int(void);
extern void test_nc_put_var_long(void); extern int test_nc_put_var_long(void);
extern void test_nc_put_var_schar(void); extern int test_nc_put_var_schar(void);
extern void test_nc_put_var_short(void); extern int test_nc_put_var_short(void);
extern void test_nc_put_var_text(void); extern int test_nc_put_var_text(void);
extern void test_nc_put_var_uchar(void); extern int test_nc_put_var_uchar(void);
extern void test_nc_put_var(void); extern int test_nc_put_var(void);
extern void test_nc_put_var_ushort(void); extern int test_nc_put_var_ushort(void);
extern void test_nc_put_var_uint(void); extern int test_nc_put_var_uint(void);
extern void test_nc_put_var_longlong(void); extern int test_nc_put_var_longlong(void);
extern void test_nc_put_var_ulonglong(void); extern int test_nc_put_var_ulonglong(void);
extern void test_nc_put_var1_double(void); extern int test_nc_put_var1_double(void);
extern void test_nc_put_var1_float(void); extern int test_nc_put_var1_float(void);
extern void test_nc_put_var1_int(void); extern int test_nc_put_var1_int(void);
extern void test_nc_put_var1_long(void); extern int test_nc_put_var1_long(void);
extern void test_nc_put_var1_schar(void); extern int test_nc_put_var1_schar(void);
extern void test_nc_put_var1_short(void); extern int test_nc_put_var1_short(void);
extern void test_nc_put_var1_text(void); extern int test_nc_put_var1_text(void);
extern void test_nc_put_var1_uchar(void); extern int test_nc_put_var1_uchar(void);
extern void test_nc_put_var1(void); extern int test_nc_put_var1(void);
extern void test_nc_put_var1_ushort(void); extern int test_nc_put_var1_ushort(void);
extern void test_nc_put_var1_uint(void); extern int test_nc_put_var1_uint(void);
extern void test_nc_put_var1_longlong(void); extern int test_nc_put_var1_longlong(void);
extern void test_nc_put_var1_ulonglong(void); extern int test_nc_put_var1_ulonglong(void);
extern void test_nc_put_vara_double(void); extern int test_nc_put_vara_double(void);
extern void test_nc_put_vara_float(void); extern int test_nc_put_vara_float(void);
extern void test_nc_put_vara_int(void); extern int test_nc_put_vara_int(void);
extern void test_nc_put_vara_long(void); extern int test_nc_put_vara_long(void);
extern void test_nc_put_vara_schar(void); extern int test_nc_put_vara_schar(void);
extern void test_nc_put_vara_short(void); extern int test_nc_put_vara_short(void);
extern void test_nc_put_vara_text(void); extern int test_nc_put_vara_text(void);
extern void test_nc_put_vara_uchar(void); extern int test_nc_put_vara_uchar(void);
extern void test_nc_put_vara(void); extern int test_nc_put_vara(void);
extern void test_nc_put_vara_ushort(void); extern int test_nc_put_vara_ushort(void);
extern void test_nc_put_vara_uint(void); extern int test_nc_put_vara_uint(void);
extern void test_nc_put_vara_longlong(void); extern int test_nc_put_vara_longlong(void);
extern void test_nc_put_vara_ulonglong(void); extern int test_nc_put_vara_ulonglong(void);
extern void test_nc_put_vars_double(void); extern int test_nc_put_vars_double(void);
extern void test_nc_put_vars_float(void); extern int test_nc_put_vars_float(void);
extern void test_nc_put_vars_int(void); extern int test_nc_put_vars_int(void);
extern void test_nc_put_vars_long(void); extern int test_nc_put_vars_long(void);
extern void test_nc_put_vars_schar(void); extern int test_nc_put_vars_schar(void);
extern void test_nc_put_vars_short(void); extern int test_nc_put_vars_short(void);
extern void test_nc_put_vars_text(void); extern int test_nc_put_vars_text(void);
extern void test_nc_put_vars_uchar(void); extern int test_nc_put_vars_uchar(void);
extern void test_nc_put_vars(void); extern int test_nc_put_vars(void);
extern void test_nc_put_vars_ushort(void); extern int test_nc_put_vars_ushort(void);
extern void test_nc_put_vars_uint(void); extern int test_nc_put_vars_uint(void);
extern void test_nc_put_vars_longlong(void); extern int test_nc_put_vars_longlong(void);
extern void test_nc_put_vars_ulonglong(void); extern int test_nc_put_vars_ulonglong(void);
extern void test_nc_put_varm_double(void); extern int test_nc_put_varm_double(void);
extern void test_nc_put_varm_float(void); extern int test_nc_put_varm_float(void);
extern void test_nc_put_varm_int(void); extern int test_nc_put_varm_int(void);
extern void test_nc_put_varm_long(void); extern int test_nc_put_varm_long(void);
extern void test_nc_put_varm_schar(void); extern int test_nc_put_varm_schar(void);
extern void test_nc_put_varm_short(void); extern int test_nc_put_varm_short(void);
extern void test_nc_put_varm_text(void); extern int test_nc_put_varm_text(void);
extern void test_nc_put_varm_uchar(void); extern int test_nc_put_varm_uchar(void);
extern void test_nc_put_varm(void); extern int test_nc_put_varm(void);
extern void test_nc_put_varm_ushort(void); extern int test_nc_put_varm_ushort(void);
extern void test_nc_put_varm_uint(void); extern int test_nc_put_varm_uint(void);
extern void test_nc_put_varm_longlong(void); extern int test_nc_put_varm_longlong(void);
extern void test_nc_put_varm_ulonglong(void); extern int test_nc_put_varm_ulonglong(void);
extern void test_nc_put_att_double(void); extern int test_nc_put_att_double(void);
extern void test_nc_put_att_float(void); extern int test_nc_put_att_float(void);
extern void test_nc_put_att_int(void); extern int test_nc_put_att_int(void);
extern void test_nc_put_att_long(void); extern int test_nc_put_att_long(void);
extern void test_nc_put_att_schar(void); extern int test_nc_put_att_schar(void);
extern void test_nc_put_att_short(void); extern int test_nc_put_att_short(void);
extern void test_nc_put_att_text(void); extern int test_nc_put_att_text(void);
extern void test_nc_put_att_uchar(void); extern int test_nc_put_att_uchar(void);
extern void test_nc_put_att_ushort(void); extern int test_nc_put_att_ushort(void);
extern void test_nc_put_att_uint(void); extern int test_nc_put_att_uint(void);
extern void test_nc_put_att_longlong(void); extern int test_nc_put_att_longlong(void);
extern void test_nc_put_att_ulonglong(void); extern int test_nc_put_att_ulonglong(void);
extern void test_nc_create(void); extern void test_nc_create(void);
extern void test_nc_redef(void); extern void test_nc_redef(void);
@ -512,6 +511,8 @@ int inRange3(const int cdf_format, const double value, const nc_type datatype, c
int equal(const double x, const double y, nc_type extType, nct_itype itype); int equal(const double x, const double y, nc_type extType, nct_itype itype);
int equal2(const double x, const double y, nc_type extType);
int int_vec_eq(const int *v1, const int *v2, const int n); int int_vec_eq(const int *v1, const int *v2, const int n);
int roll( int n ); int roll( int n );
@ -566,6 +567,8 @@ int file_create(const char *filename, int cmode, int *ncid);
int file_open(const char *filename, int omode, int *ncid); int file_open(const char *filename, int omode, int *ncid);
char* nc_err_code_name(int err);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif