add googletest harness and update CI#93
Conversation
|
Reviewer requests @colemanjs: Can you review to check that these tests make sense to you? I think they cover the basic intended behavior of the scan path logic (at least how it is in v1.* releases). I can also add in coverage here if there are glaring holes. @streeve: Does |
I agree with you; I try very hard to avoid embedding external code. But I understand why you want to do it here |
After looking into GoogleTest implementation a little more, honestly it wasn't much more work to implement it and include some brief instructions for installing it. The syntax is pretty much identical to doctest, with some minor vocabulary swaps. Current version of the PR is now with |
While we had an integration/smoke test in the CI by running the tutorial case, there are no unit tests for AdditiveFOAM. This adds a
doctestframework for unit test.I chosedoctestbecause it is lightweight enough to not add much of a burden on compiling and can be compiled easily withwmake. This does mean that AdditiveFOAM would vendor (i.e., distribute) the doctest header and associated MIT License file to be compatible with the doctest license, which is common practice.After further consideration, GoogleTest (
gtest) was fairly easy to integrate and doesn't require a great deal of overhead in terms of installing for developers without vendoring it. While I don't think vendoring an MIT license code (doctest) is a bad thing, avoiding it does sidestep any licensing questions down the line.New features:
gtest) initial framework to provide a place to add unit testsMinor change to solver source code:
Foam::string.replacecall toFoam::string.replaceAllin graph utility to have expected behavior on string normalizationAI usage statement: AIA Human-AI blend, Content edits, Human-initiated, Reviewed, GPT 5.4 v1.0