tree: eedf9c7756bc8b571ffc0e24f3e32cbd6dbc5ddf [path history] [tgz]
  1. include/
  2. test/
  3. BUILD.gn
  4. exception-catcher.cc
  5. exception-handling.cc
  6. README.md
zircon/system/ulib/test-exceptions/README.md

ulib/test-exceptions

This library provides utilities to handle exceptions in unittests. Expected exceptions can be registered which will catch and handle them appropriately, whereas unexpected exceptions or failing to catch a registered exception will trigger a test failure.

This replaced the RUN_TEST_ENABLE_CRASH_HANDLER mechanism that used to be provided by the unittest library, both of which have since been removed. The differences from that mechanism were:

  • C++ object instead of macros
  • synchronous behavior for simplicity and predictability
  • not dependent on any particular test library so can be used equally well with the zxtest library or the now-removed unittest library
  • uses new channel-based exception APIs