UFS_UTILS icon indicating copy to clipboard operation
UFS_UTILS copied to clipboard

Create unit test from orog_mask_tools.fd/lake.fd/enclosure_cnvx.F90

Open kgerheiser opened this issue 3 years ago • 2 comments

There is a small test in there that should be converted to a unit test in CMake.

kgerheiser avatar Mar 02 '21 15:03 kgerheiser

How do you link in the source code if we want to create tests? Everything is built as an executable with no intermediate library where we can test the code.

What if the executables were built with an intermediate (static) library? All the source files except the main program could be compiled into a library so that code can be tested, and the executable would be program linked to the library.

kgerheiser avatar Mar 03 '21 16:03 kgerheiser

I believe that is the answer we are looking for.

An easier alternative for me has been to just include the fortran files that I need to compile my test program.

I was not thinking we would do this for orog_mask_tools yet, chgres_cube is the immediate target, since that's where most of the code changes are.

That said, if you want to quickly try this and get it in place, I have no objection...

edwardhartnett avatar Mar 03 '21 17:03 edwardhartnett