#include <float.h>
#include <math.h>
#include <stdio.h>
|
| #define | TESTING(WHAT) |
| #define | PASSED() |
| #define | H4_FAILED() |
| #define | H4_WARNING() |
| #define | SKIPPED() |
| #define | CHECK(status, fail_val, name) |
| #define | CHECK_IND(status, fail_val, name, index) |
| #define | VERIFY(val, x, test_name) |
| #define | VERIFY_FLOAT(val, x, test_name) |
| #define | VERIFY_DOUBLE(val, x, test_name) |
| #define | VERIFY_CHAR(val, x, test_name) |
| #define | CHECK_ALLOC(buffer, buf_name, func_name) |
| #define | H4_FLT_ABS_EQUAL(X, Y) |
| #define | H4_DBL_ABS_EQUAL(X, Y) |
| #define | H4_LDBL_ABS_EQUAL(X, Y) |
| #define | ENDSDS(sds_id, msg) |
| #define | ENDSD(sd_id, msg) |
|
| const char * | get_srcdir (void) |
| const char * | get_srcdir_filename (const char *filename) |
| int | make_sourcepath (char *src_path, unsigned int size) |
| int32 | make_SDS (int32 sd_id, const char *sds_name, int32 type, int32 rank, int32 *dim_sizes, int32 unlim_dim, void *written_data) |
| int32 | make_CompSDS (int32 sd_id, char *sds_name, int32 type, int32 rank, int32 *dim_sizes, void *written_data) |
| int32 | make_Ext3D_SDS (int32 sd_id, char *sds_name, int32 type, int32 rank, int32 *dim_sizes, void *written_data, int32 offset, char *ext_file_name) |
| int32 | append_Data2SDS (int32 sd_id, char *sds_name, int32 *start, int32 *edges, void *ap_data) |
| int | verify_datasize (int32 sds_id, int32 data_size, const char *sds_name) |
| int | verify_info_data (int32 sds_id, int32 expected_dimsize, int16 *result) |
| int32 | get_SDSbyName (int32 sd_id, const char *sds_name) |
◆ CHECK
| #define CHECK |
( |
| status, |
|
|
| fail_val, |
|
|
| name ) |
Value:do { \
if (status == fail_val) { \
fprintf(stderr,
"*** Routine %s FAILED at line %d ***\n",
name, __LINE__); \
goto done; \
} \
} while (0)
intf _fcd name
Definition hproto_fortran.h:762
◆ CHECK_ALLOC
| #define CHECK_ALLOC |
( |
| buffer, |
|
|
| buf_name, |
|
|
| func_name ) |
Value:do { \
fprintf(stderr, "in %s: space allocation for %s failed. Terminated!\n", func_name, buf_name); \
exit(1); \
} \
} while (0)
intf intf intf intf intf void * buffer
Definition hproto_fortran.h:314
◆ CHECK_IND
| #define CHECK_IND |
( |
| status, |
|
|
| fail_val, |
|
|
| name, |
|
|
| index ) |
Value:do { \
if (status == fail_val) { \
fprintf(stderr,
"*** Routine %s FAILED at line %d for SDS index %d ***\n",
name, __LINE__, \
goto done; \
} \
} while (0)
HDFFCLIBAPI intf intf * index
Definition mfsdf.h:136
◆ ENDSD
| #define ENDSD |
( |
| sd_id, |
|
|
| msg ) |
Value:do { \
CHECK(status,
FAIL, msg); \
} while (0)
#define FAIL
Definition hdf.h:141
HDFLIBAPI int SDend(int32 fid)
◆ ENDSDS
| #define ENDSDS |
( |
| sds_id, |
|
|
| msg ) |
Value:do { \
CHECK(status,
FAIL, msg); \
} while (0)
HDFLIBAPI int SDendaccess(int32 id)
◆ H4_DBL_ABS_EQUAL
| #define H4_DBL_ABS_EQUAL |
( |
| X, |
|
|
| Y ) |
Value:(fabs((X) - (Y)) < DBL_EPSILON)
◆ H4_FAILED
Value:do { \
puts("*FAILED*"); \
fflush(stdout); \
} while (0)
◆ H4_FLT_ABS_EQUAL
| #define H4_FLT_ABS_EQUAL |
( |
| X, |
|
|
| Y ) |
Value:(fabsf((X) - (Y)) < FLT_EPSILON)
◆ H4_LDBL_ABS_EQUAL
| #define H4_LDBL_ABS_EQUAL |
( |
| X, |
|
|
| Y ) |
Value:(fabsl((X) - (Y)) < LDBL_EPSILON)
◆ H4_WARNING
Value:do { \
puts("*WARNING*"); \
fflush(stdout); \
} while (0)
◆ PASSED
Value:do { \
puts(" PASSED"); \
fflush(stdout); \
} while (0)
◆ SKIPPED
Value:do { \
puts(" -SKIP-"); \
fflush(stdout); \
} while (0)
◆ TESTING
Value:do { \
printf("Testing %-62s", WHAT); \
fflush(stdout); \
} while (0)
◆ VERIFY
| #define VERIFY |
( |
| val, |
|
|
| x, |
|
|
| test_name ) |
Value:do { \
fprintf(stderr, "*** UNEXPECTED VALUE from %s is %ld (expected %ld) at line %4d in %s\n", \
test_name, (
long)
val, (
long)x, (
int)__LINE__, __FILE__); \
goto done; \
} \
} while (0)
HDFFCLIBAPI intf _fcd val
Definition mfsdf.h:142
◆ VERIFY_CHAR
| #define VERIFY_CHAR |
( |
| val, |
|
|
| x, |
|
|
| test_name ) |
Value:do { \
if (strcmp(x,
val) != 0) { \
fprintf(stderr, "*** UNEXPECTED VALUE from %s is <%s> (expected <%s>) at line %4d in %s\n", \
test_name,
val, x, (
int)__LINE__, __FILE__); \
goto done; \
} \
} while (0)
◆ VERIFY_DOUBLE
| #define VERIFY_DOUBLE |
( |
| val, |
|
|
| x, |
|
|
| test_name ) |
Value:do { \
fprintf(stderr, "*** UNEXPECTED VALUE from %s is %f (expected %f) at line %4d in %s\n", \
test_name,
val, x, (
int)__LINE__, __FILE__); \
goto done; \
} \
} while (0)
#define H4_DBL_ABS_EQUAL(X, Y)
Definition tutils.h:219
◆ VERIFY_FLOAT
| #define VERIFY_FLOAT |
( |
| val, |
|
|
| x, |
|
|
| test_name ) |
Value:do { \
fprintf(stderr, "*** UNEXPECTED VALUE from %s is %f (expected %f) at line %4d in %s\n", \
test_name, (
double)
val, (
double)x, (
int)__LINE__, __FILE__); \
goto done; \
} \
} while (0)
#define H4_FLT_ABS_EQUAL(X, Y)
Definition tutils.h:218
◆ append_Data2SDS()
| int32 append_Data2SDS |
( |
int32 | sd_id, |
|
|
char * | sds_name, |
|
|
int32 * | start, |
|
|
int32 * | edges, |
|
|
void * | ap_data ) |
◆ get_SDSbyName()
| int32 get_SDSbyName |
( |
int32 | sd_id, |
|
|
const char * | sds_name ) |
◆ get_srcdir()
| const char * get_srcdir |
( |
void | | ) |
|
◆ get_srcdir_filename()
| const char * get_srcdir_filename |
( |
const char * | filename | ) |
|
◆ make_CompSDS()
◆ make_Ext3D_SDS()
| int32 make_Ext3D_SDS |
( |
int32 | sd_id, |
|
|
char * | sds_name, |
|
|
int32 | type, |
|
|
int32 | rank, |
|
|
int32 * | dim_sizes, |
|
|
void * | written_data, |
|
|
int32 | offset, |
|
|
char * | ext_file_name ) |
◆ make_SDS()
◆ make_sourcepath()
| int make_sourcepath |
( |
char * | src_path, |
|
|
unsigned int | size ) |
◆ verify_datasize()
| int verify_datasize |
( |
int32 | sds_id, |
|
|
int32 | data_size, |
|
|
const char * | sds_name ) |
◆ verify_info_data()
| int verify_info_data |
( |
int32 | sds_id, |
|
|
int32 | expected_dimsize, |
|
|
int16 * | result ) |