next up previous contents Back To Software Index
Next: Getting Started with Up: Creating the CFITSIO Previous: Building the Library

Testing the Library

The CFITSIO library should be tested by building and running the testprog.c program that is included with the release. On Unix systems (assuming the gcc compiler is being used), type:

    % gcc -o testprog testprog.c -L. -lcfitsio -lm
    % testprog > testprog.lis
    % diff testprog.lis testprog.out
    % cmp testprog.fit testprog.std
On VMS systems, (assuming cc is the name of the C compiler command), type:

    $ cc testprog.c
    $ link testprog, cfitsio/lib
    $ run testprog
The testprog program should produce a FITS file called `testprog.fit' that is identical to the `testprog.std' FITS file included with this release. The diagnostic messages (which were piped to the file testprog.lis in the Unix example) should be identical to the listing contained in the file testprog.out. The 'diff' and 'cmp' commands shown above should not report any differences in the files.

The program speed.c that is included with CFITSIO may be used to approximately measure the maximum possible throughput (in MB per second) for writing and reading FITS files with CFITSIO on a particular computer system.