Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

add unit test functionality using the Fortan package manager #8

Open
JorgeG94 wants to merge 10 commits intoACCESS-NRI:gtracersfrom
JorgeG94:feat/nci/unit_tests
Open

add unit test functionality using the Fortan package manager #8
JorgeG94 wants to merge 10 commits intoACCESS-NRI:gtracersfrom
JorgeG94:feat/nci/unit_tests

Conversation

@JorgeG94
Copy link
Collaborator

This PR adds unit testing functionality to the mocsy library using test-drive. This will enable easier refactors of the library in case they are needed. Some routines are a bit...monolithic.

The FPM build system lives independently of the CMake and the Make builds systems. The tests are taken form the examples/ directory and ran using the Makefile built system to obtain the reference values.

The main purpose of this PR is to get a CMake independent testing framework for mocsy before adding a linking stage to it in the CMake. The options for this are:

  • Spack package for test-drive to install it as a dependency
  • Build the unit testing framework on the fly similar to how I include it in a personal project here

When testing I ran into a FPE in the numerical derivatives module, where there was an uncatched division by 0 if an input was poor. I fixed this by simply cycling, since setting it to a very small number caused other issues. This would need testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant