Skip to content

Unit Testing #166

@jacob-moore22

Description

@jacob-moore22

Currently, Fierro has limited unit testing coverage. This needs to be remedied for the long-term health of the project. Automated unit testing allows for the safe integration of new features by warning of any unforeseen side effects of the proposed changes. The existing unit testing leverages Google Test, which is great, and I suggest we keep to that moving forward.

Unit testing is great, but it does add some requirements on how you think about structuring your code. These tests require that your functions be broken into small testable units with clearly defined inputs and outputs. Also, the inputs need to be mimicable so that they can be generated inside of the test code.

Some examples of unit tests that Fierro needs.

  • Single element, single time step evolution with well-defined inputs and known expected outputs for evolving each relevant state
  • Test of every step of mesh generation (unit test each connectivity structure)
  • Test of volume and BMatrix calculations in geometry.

We should leave this issue open until we improve code coverage and update it as we work.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions