1 /* This is part of the netCDF package. Copyright 2005 University
2  * Corporation for Atmospheric Research/Unidata. See \ref copyright
3  * file for conditions of use. */
4 /** @internal @file
5  *
6  * Common includes, defines, etc., for test code in the libsrc4 and
7  * nc_test4 directories.
8  *
9  * @author Ed Hartnett, Denis Heimbigner, Ward Fisher
10 */
11 
12 #ifndef _NC_TESTS_H
13 #define _NC_TESTS_H
14 
15 #include "config.h"
16 #include <assert.h>
17 #include <stdio.h>
18 #include <string.h>
19 #include <stdlib.h>
20 #include "nc_logging.h"
21 #ifdef USE_PARALLEL
22 #include "netcdf_par.h"
23 #endif
24 #include "netcdf.h"
25 
26 /** NC_MAX_DIMS for tests.  Allows different NC_MAX_DIMS values
27  * without breaking this test with a heap or stack overflow. */
28 #define NC_TESTS_MAX_DIMS 1024
29 
30 #define MAX_NUM_FORMATS 5 /**< Max number of available binary formats. */
31 
32 /** Useful define for tests. */
33 /** \{ */
34 #define MEGABYTE 1048576
35 #define HALF_MEG (MEGABYTE/2)
36 #define MILLION 1000000
37 #define SIXTEEN_MEG 16777216
38 #define FOUR_MEG (SIXTEEN_MEG/4)
39 #define THIRTY_TWO_MEG (SIXTEEN_MEG * 2)
40 #define SIXTY_FOUR_MEG (SIXTEEN_MEG * 4)
41 #define ONE_TWENTY_EIGHT_MEG (SIXTEEN_MEG * 8)
42 #define TEST_VAL_42 42
43 #define BAD_NAME "dd//d/  "
44 #define NUM_CLASSIC_TYPES 6
45 #define NUM_NETCDF_TYPES 12
46 /** \} */
47 
48 #ifdef USE_PNETCDF
49 #define TEST_PNETCDF 1
50 #else
51 #undef TEST_PNETCDF
52 #endif
53 
54 #endif /* _NC_TESTS_H */
55