tree: abc7adb03da28f5f98eab6fb1e8fc213fe6764c8 [path history] [tgz]
  1. BUILD.gn
  2. README.md
  3. exception-catcher.cc
  4. exception-handling.cc
  5. include/
  6. test/
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 is a replacement for ulib/unittest's RUN_TEST_ENABLE_CRASH_HANDLER mechanism, the differences being:

  • 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 unittest or zxtest
  • uses new channel-based exception APIs