The BOOST_FAIL here is used to exit the test based on a condition, but we can use REQUIRE directly. The context string is only printed on failure to my knowledge and this is not called on a child thread so there is no behavior change.
The descriptor_tests uses BOOST_TEST_INFO to add the descriptor if the next condition fails, but there are some other places that also print the public or private descriptor. Seems useful throughout this whole funciton body to attach the private and public descriptor as context.
Found in #35713 as low usage macros
ref:
- https://www.boost.org/doc/libs/latest/libs/test/doc/html/boost_test/utf_reference/testout_reference/test_output_macro_info.html
- https://www.boost.org/doc/libs/latest/libs/test/doc/html/boost_test/utf_reference/testout_reference/test_output_macro_context_sticky.html
- https://www.boost.org/doc/libs/latest/libs/test/doc/html/boost_test/utf_reference/testing_tool_ref/assertion_boost_fail.html