davidrmiller / biosim4

Biological evolution simulator
Other
3.1k stars 435 forks source link

Proposal to adopt a unit testing framework #94

Open timothy-r opened 12 months ago

timothy-r commented 12 months ago

Looking at the current test coverage of the project, there's a lack of unit tests that test classes in isolation. The integration test framework works to test the entire application, but only testing at this level makes is hard to identify the source of issues.

Adding unit tests at the class level demonstrate that classes behave as expected and designed. They also can identify hidden issues that are costly to detect when testing the entire application.

Examples of the type of unit testing framework I'm proposing are Catch2, DocTest or GoogleTest. I don't have a specific library to recommend, this proposal is about adopting the unit testing practice as an aid to the development of the codebase.

kkm000 commented 6 months ago

GoogleTest can be build as a header-only library, thus no compatibility problems whatsoever, and is very cross-platform.