Closed feltech closed 8 months ago
Improve tests of header location and compilation to catch implicit dependencies between them
Simply having a long list of #includes risks earlier headers inadvertently providing a missing dependency to a later headers, obscuring a bug.
#include
This was prompted by https://github.com/OpenAssetIO/OpenAssetIO-Test-CMake/pull/1#discussion_r1013856218
In the linked ticket, the solution suggested was to have a separate compilation unit per header, and ideally autogenerate the associated .cpp/.c file.
.cpp
.c
This isn't really possible any more, since we stripped down Test-CMake to basic headers to narrow the focus of its testing.
What
Improve tests of header location and compilation to catch implicit dependencies between them
Why
Simply having a long list of
#include
s risks earlier headers inadvertently providing a missing dependency to a later headers, obscuring a bug.This was prompted by https://github.com/OpenAssetIO/OpenAssetIO-Test-CMake/pull/1#discussion_r1013856218
Notes
In the linked ticket, the solution suggested was to have a separate compilation unit per header, and ideally autogenerate the associated
.cpp
/.c
file.