ccpp-framework
ccpp-framework copied to clipboard
Create unit tests for reading Fortran modules
capgen reads information from each Fortran CCPP interface and creates a metadata interface.
- Create unit tests that read correct and incorrect Fortran headers (subroutine statement and associated dummy argument declaration statements) to test for correct reading and correct error detection.
There are plenty of examples of CCPP Fortran interfaces in test/capgen_test and in doc/HelloWorld. Reading of a Fortran module looks something like:
fheaders = parse_fortran_file(fort_file, preproc_defs=preproc_defs,
logger=logger)
(see call in ccpp_capgen.py)