~/talk

Noexcept? Enabling Testing of Contract Checks in C++

Talkat CppCon 2023 · on Wednesday, 2023-10-04· at 09:00· Cottonwood 8/9, 6700 North Gaylord Rockies Boulevard· [rust]
links:none on file
slides:none on file

Argument: marking narrow precondition-bearing functions with noexcept breaks the practical workflow of unit-testing contract checks because thrown-test exceptions hit the specifier and call terminate. Demonstration uses assert-style contract checks, an exception-based test harness, and a small Vector implementation (about 10% of vector implemented) to show the failure. Alternatives (longjmp, threads, signals) fail; death tests work but are slow and nonportable. Proposal: a throws nothing annotation that is not observable via the noexcept operator, enabling exception-based testing without terminate.

AI-written summary · about

  1. 0:00Welcome
  2. 1:09Contracts in software
  3. 4:04noexcept specifier
  4. 12:13Software contracts types
  5. 23:39Unit testing contracts
  6. 33:09Lakos Rule and noexcept
  7. 48:59Alternatives to exceptions
  8. 50:25Contract annotation testing
  9. 55:06Purpose of noexcept
  10. 1:00:00Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.