MASTmultiphysics / mast-multiphysics

Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST) - Sensitivity-enabled multiphysics FEA for design
https://www.mast-multiphysics.com
GNU Lesser General Public License v2.1
43 stars 24 forks source link

Refactor 1D tests to reduce repetitive code #81

Closed jdeaton closed 4 years ago

jdeaton commented 4 years ago

This pull request refactors some of the Catch2 test code. It introduces some re-usable classes to define basic elements/storage that can be utilized as setup-code so similar storage doesn't need to be created for every test.

There is still a fair amount of replicated code, but it all generally appears inside of Catch SECTIONS that I believe we want to keep separate. Short of writing some macros for this, I'm not sure how we can avoid it at this time.

In addition, this PR introduces the TEST namespace where these test helper classes and other test-methods can be stored. The Doxygen documentation has also been updated to parse the tests directory so that these helper classes/functions can be documented. They are separated from library by being in a different namespace.

@JohnDN90 can you look over this stuff and make sure I am still capturing the spirit of your tests.