[WIP] Add google test for unittests #360
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this PR, I'd like to introduce Googletest for writing unit tests in ExaDG.
The discussion on whether Googletest is desired is planned to take place in #359. This PR should be an example of what it may look like if we do.
To make the case for Googletest, I have written two test suites with it.
An exact transfer of the test cases for
Elementwise::SolverGMRES
which we already had. Aside from reducing the number of lines, especially duplicated lines, I found that the tests would also run considerably faster with the new framework. The time required for this test suite dropped from about 17 seconds to no more than 10 seconds on my local machine.A typed-test suite for the newly implemented generalized
VariableCoefficients
class (Generalize variable coefficients to arbitrary types #353). A typed-test in this context means that multiple tests are created automatically for templated types. In this case, I testedVariableCoefficients
with three different coefficient types.Part of #359
Follows #353