From 2d302c1666d4b791e942825290ba89c80c9f3fe4 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 30 Dec 2022 21:57:12 +0200 Subject: [PATCH] Document boost::core::lwt_init --- doc/lightweight_test.qbk | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/doc/lightweight_test.qbk b/doc/lightweight_test.qbk index 9073b08..8c7fa4d 100644 --- a/doc/lightweight_test.qbk +++ b/doc/lightweight_test.qbk @@ -51,8 +51,16 @@ When using `lightweight_test.hpp`, *do not forget* to namespace boost { - int report_errors(); -} + +int report_errors(); + +namespace core +{ + +void lwt_init(); + +} // namespace core +} // namespace boost `` [endsect] @@ -246,6 +254,25 @@ Return the error count from `main`. [endsect] +[section lwt_init] + +`` +void boost::core::lwt_init() +`` + +Performs one-time initialization. Disables the interactive message +boxes displayed by the Microsoft Windows debug runtime library on +`abort`, failing `assert`, and other abnormal program terminations +(to facilitate unattended testing), and ensures that in case +`boost::report_errors` is not called (a common mistake), the program +ends with a nonzero exit code. + +`lwt_init` is automatically called by the test macros. There is +no need to call it explicitly, except in cases where a test fails due +to e.g. an assertion failure before the first test macro is invoked. + +[endsect] + [section Example] ``