~/talk

Next generation unit testing using static reflection

Talkat CppCon 2019 · 2019-09-15..09-20· [testing, compilers-and-language-design]
links:none on file
slides:none on file

Claims a working unittest proof-of-concept for C++14 that uses compile-time static reflection to discover tests and non‑intrusively mock methods. It wires tinyrefl (a libclang codegen + metadata tool) to generate per-header metadata, uses function-table trampolines to patch method pointers at test time, and runs discovered test methods with automatic mocking. It runs but hits real limits: no global project reflection, no namespace member lists and limited attribute support, so full Python‑style patching depends on future reflection features.

AI-written summary · about

  1. 0:00Introduction
  2. 1:15What is unit testing
  3. 3:25Problems with dependency injection
  4. 8:29Dependency injection for testing
  5. 13:30Unit testing without dependency injection
  6. 18:31Mocking in C++
  7. 20:17Non-intrusive mocking in C++
  8. 25:04Automatic test discovery
  9. 27:15Static reflection with TinyReflect
  10. 33:45Implementing test discovery
  11. 38:25Patching functions with reflection
  12. 40:53Reflection TS limitations
  13. 45:08Future ideas and Q&A
~/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.