testapi
testapi - Test API i/o methods for any data type
Synopsis
testapi
-Ic|d|f|r|s[/m|v]
-Tc|d|g|i|t
-Wc|d|f|r|s[/m|v]
[ -V[level] ]
Note: No space is allowed between the option flag and the associated arguments.
Description
testapi will test the API for all i/o combinations. In general, data
types (DATASET, TEXTSET, CPT, GRID, and IMAGE) can be read from or
written to 5 different ways (file, stream, file descriptor, copy from
memory, reference from memory). We use this tool to check the various
possibilities, for each data type.
Required Arguments
- -Ic|d|f|r|s[/m|v]
- Set input method; choose from copy from memory, file
descriptor, file, memory reference, or
stream. For methods c|r, optionally append
/m|v. Then, we obtain the values for the input dataset
or grid via either a user matrix (m) or a set of user vectors
(v). We simulate this internally by filling out a matrix or
vectors and pass that as the source instead of a data file. -Td
may take either m|v while -Tg can only take the
m modifier.
- -Tc|d|g|i|t
- Specify data type; choose from cpt, dataset, grid,
image, or textset.
- -Wc|d|f|r|s[/m|v]
- Set output method; choose from copy to memory, file
descriptor, file, memory reference, or
stream. For methods c|r, optionally append
/m|v. Then, we first write the values of the output
dataset or grid via either a user matrix (m) or a set of user
vectors (v). Finally, the matrix or vectors are written out to
file. -Td may take either m|v while -Tg can
only take the m modifier.
Optional Arguments
- -V[level] (more ...)
- Select verbosity level [c].
Examples
To check if reading and writing the test dataset file yields an identical copy, try
To check if reading the test grid from memory and writing it to file
yields an identical copy, try
To read the test grid via user matrix memory and writing it via another
user matrix before saving to a grid file, try
testapi -Tg -Ic/m -Wf/m -V