Add main() test methods to reduce test boilerplate.
Simple tests only need to implement register_tests(). Tests that need a custom main() should implement test_main(). This will be wrapped in a main() that performs common setup/teardown (currently crypto-mdebug). Note that for normal development, enable-asan is usually sufficient for detecting leaks, and more versatile. enable-crypto-mdebug is stricter as it will also insist that all static variables be freed. This is useful for debugging library init/deinit; however, it also means that test_main() must free everything it allocates. Reviewed-by: NRichard Levitte <levitte@openssl.org> Reviewed-by: NRich Salz <rsalz@openssl.org>
Showing
test/test_main.c
0 → 100644
test/test_main.h
0 → 100644
test/test_main_custom.c
0 → 100644
test/test_main_custom.h
0 → 100644
想要评论请 注册 或 登录