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
44 stars 24 forks source link

Catch2 unit testing capability, a few example/basic unit tests, and tests running on Travis CI. #60

Closed jdeaton closed 4 years ago

jdeaton commented 4 years ago

This pull request introduces unit test capability initially developed primarily by @JohnDN90 using the Catch2 framework. A small number of basic unit tests are included as examples of how to add them based on our current understanding of Catch2 and CTest.

Also, in this PR the Travis CI system is setup to run the unit tests using ctest after building the Debug and Release versions of the MAST library. This architecture should automatically pick-up any new unit tests that are added inside the tests directory.

jdeaton commented 4 years ago

@manavbhatia Since catch2 is header only we've just included it in the repo. John originally stuck it in the tests folder. Do you want it in there or should I move it over with the other external files in a contrib/catch2 directory.

manavbhatia commented 4 years ago

@manavbhatia Since catch2 is header only we've just included it in the repo. John originally stuck it in the tests folder. Do you want it in there or should I move it over with the other external files in a contrib/catch2 directory.

It would be best to keep all external packages in contrib.

jdeaton commented 4 years ago

@manavbhatia @JohnDN90 Once the last commit clears the CI, I'm going to go ahead and merge this first increment of unit test capability into master. It is running on Travis CI and any new tests should also just get added on.

We can then start implementing other changes/features that have tests defined. We also have code that is just pure unit tests for existing capability that we will put into another PR so it doesn't hold things up.

JohnDN90 commented 4 years ago

@jdeaton Sounds good to me.