catchorg / Catch2

A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch)
https://discord.gg/4CWS9zD
Boost Software License 1.0
18.51k stars 3.04k forks source link

How to test a custom math library with Catch2 (while catch2 relies on libm) ? #2877

Open Acwok opened 3 months ago

Acwok commented 3 months ago

I'm working on an embedded project where our executable depends on a space qualified math library called libmcs: https://essr.esa.int/project/libmcs-mathematical-library-for-critical-systems This library is a wrapper around the standard math library to only keep the functions which were certified for space applications.

I'd like to build unit tests for my projet but there are conflicts between the standard math library used by Catch2 and libmcs used by my code.

How do you handle such a situation ? Is there a mecanism for that in catch2 ?

NicolasMallent commented 3 months ago

Hello, I have similar problems and I'm interested in the answer (if any).