OpenAssetIO / OpenAssetIO-Test-CMake

Simple test project that consumes OpenAssetIO as a CMake package
Apache License 2.0
0 stars 3 forks source link

Improve coverage of C/C++ header tests #2

Closed feltech closed 8 months ago

feltech commented 1 year ago

What

Improve tests of header location and compilation to catch implicit dependencies between them

Why

Simply having a long list of #includes 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.

feltech commented 8 months ago

This isn't really possible any more, since we stripped down Test-CMake to basic headers to narrow the focus of its testing.