Hegel-cpp does not currently support sending database keys to the Hypothesis server, because it is not easy to get the current name of the test function, which is traditionally what is used for the database key.
Some options:
- On GoogleTest, we can use
testing::UnitTest::GetInstance()->current_test_info();
std::source_location::current() in c++20, but this only gets the caller's source location, and hegel::hegel might be called from a nested location
- Add some kind of
hegel::test macro (like #[hegel::test] in hegel-rust) which parses the decorated function and passes its name through as appropriate
Hegel-cpp does not currently support sending database keys to the Hypothesis server, because it is not easy to get the current name of the test function, which is traditionally what is used for the database key.
Some options:
testing::UnitTest::GetInstance()->current_test_info();std::source_location::current()in c++20, but this only gets the caller's source location, andhegel::hegelmight be called from a nested locationhegel::testmacro (like#[hegel::test]in hegel-rust) which parses the decorated function and passes its name through as appropriate