Unit tests and Mongoose C++ projects


I have an existing Mongoose style project where a lot of the code is in C++, I want to be able to run unit tests against this C++ code, ideally running them on every build.

I don’t really know how to organize my project to do this, I suppose at worst case I could use conditional compilation, and figure out how to share code between the existing mongoose style project, and some completely separate external project, but I feel there must be an accepted pattern to do this kind of thing.

I would like to run the unit tests locally in my dev environment, without having to deploy to a target device to execute them.

Part of my struggle is that so much of the Mongoose build environment is “hidden” inside mos.exe, involving remote build and docker images that I don’t really understand what is going on during the build process.

1 Like