~/lightning

Mocking C++

Lightningat Meeting C++ 2016 · 2016-11-18..11-19· [testing]
links:none on file
slides:none on file

Creates mocks by overwriting vtable entries and filling a fake vtable with stub function pointers, uses reinterpret_cast hacks to plant member function pointers and a stub that throws exceptions from stubs to signal unexpected calls. Shows how expectations are recorded as argument tuples and validated in destructors, reports working on OS X Linux Windows and embedded ARM with MSVC valgrind and other dynamic checkers, claims cross‑platform reliability, and points to hip amongst and comply for safer C++14/11 implementations.

AI-written summary · about

  1. 0:00Start
  2. 0:01Situation
  3. 0:32Does this work?
  4. 1:22Object layout in memory
  5. 1:48Virtual member function pointer layout
  6. 3:27And then to expect a call
  7. 5:58Mocking C++ made simple
~/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.