csdms-contrib / cem

"Master" version of CEM, including rocks/sea cliffs & coupling with SWAN
http://csdms.colorado.edu/wiki/Model:CEM
MIT License
3 stars 1 forks source link

Add unit tests #8

Closed mcflugen closed 7 years ago

mcflugen commented 7 years ago

This pull request adds a testing folder to hold unit tests for CEM. I've added tests only for BMI-related stuff but more tests could be added here in the future. The testing framework I'm using is from glib.

If cmake can't find an installed glib, the tests will be ignored and not built.

glib I believe comes with most Linux distributions. On Mac, glib can be a pain to install. I suggest using either Homebrew or conda.

These tests are now run as part of our CI builds on Travis and (should be!) passing.

mcflugen commented 7 years ago

@haileyajohnson: I hate to merge my own pull requests but this doesn't touch much code outside of the testing folder so I'm going to merge it. Please let me know if you have any questions.