-
Notifications
You must be signed in to change notification settings - Fork 546
CXX-2745 refactor test directory structure by ABI namespace #1403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Addressed Evergreen task failures:
|
Related to CXX-2745. Precursor changes to CXX-3233.
Refactors the test directory structure and components to support the introduction of v1 test components by better distinguishing tests by ABI namespace. Additionally applies precursor changes to improve the state of undesirable transitive include dependencies due to headers such as
<bsoncxx/test/catch.hh>
.As a drive-by improvement, Catch2 is updated to the latest release (v3.8.1). This addresses some Catch2-internal compiler warnings as well as a bug which may affect v1 tests on Windows due to use of
StringMaker<std::chrono::time_point<Clock>>
forv1::types::b_date
stringification (as part of CXX-3233).The test directory components are refactored to mirror the structure of the library components which they test (with an exception for the v_noabi directory which is flattened):
Test-specific components reside outside of ABI directories to avoid associating them with library components, e.g.
<bsoncxx/test/catch.hh>
,<mongocxx/test/spec/util.hh>
, etc.Catch stringification (used in decomposition of assertion expressions) is improved with the introduction of
StringMaker<std::error_condition>
and the extractionCatch::StringMaker<T>
specializations out of<bsoncxx/test/catch.hh>
into individual test headers. This is part of a greater effort to avoid "include funnel" test headers such as<bsoncxx/test/catch.hh>
and<bsoncxx/test/v_noabi/to_string.hh>
by using individual component-based "test headers" (e.g.<bsoncxx/test/v1/stdx/string_view.hh
for<bsoncxx/v1/stdx/string_view.hpp>
) to reduce transitive include dependencies and improve test (re)compilation efficiency while continuing to support Catch stringification. This will be explored in greater detail by CXX-3233.