arcaneframework / alien

Alien: an interface for linear solvers
Apache License 2.0
8 stars 7 forks source link

`ALIEN_EXPORT` is sometimes used ONLY to satisfy unit tests #103

Open cedricchevalier19 opened 2 years ago

cedricchevalier19 commented 2 years ago

Unit tests must access and stress internal components of Alien. Currently, to access these objects, they have to be exported, so they can be called by the consumer test program.

This leads to exposing a lot of internal objects to end-user.

We should rethink the way we make these tests, to integrate them deeper in Alien and avoid leaking private API.

cedricchevalier19 commented 2 years ago

One possible technical solution is to describe Alien as a CMake object library and then consume it twice: for producing a real shared library and for making the unit tests executable. This way the test executable will be in the same "module" as the rest of Alien.